Fasta.open(infile, mode="w") do |fasta_output|
Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output|
input.each_record do |record|
- if record.has_key? :SEQ
+ if record[:SEQ]
+ seq = Seq.new_bp(record)
+
total += record[:SEQ].length
lengths << record[:SEQ].length
end
output.puts record unless options[:no_stream]
- fasta_output.puts record
+ fasta_output.puts seq.to_fasta
end
end
end