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]