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
---
REC_TYPE: SNP
S_ID: gi|48994873|gb|U00096.2|
-POS: 632937
+POS: 3000
EVENT: ->A
SNP_COUNT: 1
TYPE: INSERTION
---
REC_TYPE: SNP
S_ID: gi|48994873|gb|U00096.2|
-POS: 8993
+POS: 1001
EVENT: G>C
SNP_COUNT: 2
TYPE: MISMATCH
---
REC_TYPE: SNP
S_ID: gi|48994873|gb|U00096.2|
-POS: 615440
+POS: 5501
EVENT: G>-
SNP_COUNT: 3
TYPE: DELETION