+ if names_match(entry1, entry2)
+ entry2.type = :dna
+ entry2.reverse!.complement!
+
+ merged = Assemble.pair(
+ entry1,
+ entry2,
+ mismatches_max:options[:mismatches],
+ overlap_min:options[:overlap_min],
+ overlap_max:options[:overlap_max]
+ )
+
+ if merged
+ new_record = merged.to_bp
+
+ if merged.seq_name =~ /overlap=(\d+):hamming=(\d+)$/
+ new_record[:OVERLAP_LEN] = $1
+ new_record[:HAMMING_DIST] = $2
+ end
+
+ output.puts new_record
+ end
+ else
+ raise "name mismatch: #{entry1.seq_name} != #{entry2.seq_name}"