Skip to content

Commit cbd458b

Browse files
committed
vcf2mutation deal with variants with single GT
some GT GT:AD:DP:GQ:PL 0:3,0:3:99:0,104
1 parent 0727e9a commit cbd458b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/vcf2mutation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,10 @@ def getMutationsFromVCF(file_vcf, outprefix = None, individual=None, filter_PASS
161161

162162
if '|' in genotype:
163163
GTs = genotype.split('|')
164-
else:
164+
elif '/' in genotype:
165165
GTs = genotype.split('/')
166+
else:
167+
GTs = [genotype, '.']# some GTs like "GT:AD:DP:GQ:PL 0:3,0:3:99:0,104"
166168
GTs = [int(e) if e != '.' else 0 for e in GTs]
167169
alternatives = [reference] + alternatives
168170
alternative1, alternative2 = alternatives[GTs[0]], alternatives[GTs[1]]

0 commit comments

Comments
 (0)