From: martinahansen Date: Wed, 12 Oct 2011 18:42:52 +0000 (+0000) Subject: added crufty puts method to fastq.rb X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=65c95436db284e007aca606472d535137980bd55;p=biopieces.git added crufty puts method to fastq.rb git-svn-id: http://biopieces.googlecode.com/svn/trunk@1551 74ccb610-7750-0410-82ae-013aeee3265d --- diff --git a/code_ruby/lib/maasha/fastq.rb b/code_ruby/lib/maasha/fastq.rb index a6b3610..37d0bbb 100644 --- a/code_ruby/lib/maasha/fastq.rb +++ b/code_ruby/lib/maasha/fastq.rb @@ -49,6 +49,16 @@ class Fastq < Filesys nil end end + + # TODO - this should be some custom to_s method instead. + def puts(record) + if record[:SEQ_NAME] and record[:SEQ] and record[:SCORES] + @io.print "@#{record[:SEQ_NAME]}\n" + @io.print "#{record[:SEQ]}\n" + @io.print "+\n" + @io.print "#{record[:SCORES]}\n" + end + end end