]> git.donarmstrong.com Git - biopieces.git/commitdiff
added keys to assemble_pairs2
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 12 Mar 2013 21:33:40 +0000 (21:33 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 12 Mar 2013 21:33:40 +0000 (21:33 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@2135 74ccb610-7750-0410-82ae-013aeee3265d

bp_bin/assemble_pairs2

index bd3c7fac3e18792c55762200804f1bc84ce3bdd4..f6d2f28594056689190bbb5e34d66ae183132836 100755 (executable)
@@ -64,11 +64,22 @@ Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output|
           overlap_max:options[:overlap_max]
         )
 
-        output.puts merged.to_bp if merged
+        if merged
+          new_record = merged.to_bp
+
+          if merged.seq_name =~ /overlap=(\d+):hamming=(\d+)$/
+            new_record[:OVERLAP]      = $1
+            new_record[:HAMMING_DIST] = $2
+          end
+
+          output.puts new_record
+        end
 
         entry1 = nil
         entry2 = nil
       end
+    else
+      output.puts record
     end
   end
 end