Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output|
input.each_record do |record|
if record[:SEQ_NAME] and record[:SEQ] and record[:SCORES] and record[key]
+ seq = Seq.new_bp(record)
+
if fh_hash.has_key? record[key].to_sym
fastq_io = fh_hash[record[key].to_sym]
else
fh_hash[record[key].to_sym] = fastq_io
end
- fastq_io.puts record
+ fastq_io.puts seq.to_fastq
end
output.puts record unless options[:no_stream]
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