]> git.donarmstrong.com Git - biopieces.git/blobdiff - bp_bin/assemble_pairs
refactoring of assemble_pairs
[biopieces.git] / bp_bin / assemble_pairs
index 66c2a7bd68015572df1cb530746e539005027cce..a101f3e16d0b0f09aa2f9dd9380c44bb1ef46231 100755 (executable)
@@ -55,7 +55,7 @@ end
 
 casts = []
 casts << {:long=>'mismatches',  :short=>'m', :type=>'uint', :mandatory=>false, :default=>5,   :allowed=>nil, :disallowed=>nil}
-casts << {:long=>'overlap_min', :short=>'o', :type=>'uint', :mandatory=>false, :default=>nil, :allowed=>nil, :disallowed=>"0"}
+casts << {:long=>'overlap_min', :short=>'o', :type=>'uint', :mandatory=>false, :default=>1,   :allowed=>nil, :disallowed=>"0"}
 casts << {:long=>'overlap_max', :short=>'p', :type=>'uint', :mandatory=>false, :default=>nil, :allowed=>nil, :disallowed=>"0"}
 
 options = Biopieces.options_parse(ARGV, casts)
@@ -92,9 +92,8 @@ Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output|
           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
+            if merged.seq_name =~ /overlap=(\d+)$/
+              new_record[:OVERLAP_LEN] = $1
             end
 
             output.puts new_record