From 65c95436db284e007aca606472d535137980bd55 Mon Sep 17 00:00:00 2001 From: martinahansen Date: Wed, 12 Oct 2011 18:42:52 +0000 Subject: [PATCH] added crufty puts method to fastq.rb git-svn-id: http://biopieces.googlecode.com/svn/trunk@1551 74ccb610-7750-0410-82ae-013aeee3265d --- code_ruby/lib/maasha/fastq.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- 2.39.2