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[key]
+ seq = Seq.new_bp(record)
+
if fh_hash.has_key? record[key].to_sym
fasta_io = fh_hash[record[key].to_sym]
else
- mid_file = File.join(options[:dir], record[key] + ".fasta")
- fasta_io = Fasta.open(mid_file, "w")
+ fasta_file = File.join(options[:dir], record[key] + ".fasta")
+ fasta_io = Fasta.open(fasta_file, "w")
fh_hash[record[key].to_sym] = fasta_io
end
- fasta_io.puts record
+ fasta_io.puts seq.to_fasta
end
output.puts record unless options[:no_stream]