]> git.donarmstrong.com Git - biopieces.git/blobdiff - bp_bin/find_SNPs
polished read_sam
[biopieces.git] / bp_bin / find_SNPs
index 6671144cc3a70066e0a221f66e4a08ff9e638a54..2b40f32d408d55abcea7b436015ec9b5c2ec6e9c 100755 (executable)
@@ -48,9 +48,9 @@ Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output|
        record[:ALIGN].split(',').each do |snp|
          pos, event = snp.split(':')
 
-         pos += record[:S_BEG]
+         pos = pos.to_i + record[:S_BEG].to_i
 
-         snp_hash[record[:S_ID].to_sym][pos.to_sym][event.to_sym] += 1
+         snp_hash[record[:S_ID].to_sym][pos][event.to_sym] += 1
        end
     end
   end