input.each_record do |record|
output.puts record
- if record.has_key? :SEQ_NAME and record.has_key? :SEQ and record.has_key? :SCORES
+ if record[:SEQ_NAME] and record[:SEQ] and record[:SCORES]
entry = Seq.new_bp(record)
io_fq.puts entry.to_fastq
Sam.open(tmp_sam, 'r') do |io_sam|
io_sam.each do |entry|
- output.puts Sam.to_bp(entry)
+ output.puts Sam.to_bp(entry) unless entry[:RNAME] == '*'
end
end
end