Entering edit mode
7.4 years ago
Cindy
▴
70
Dear all,
I got a error when output VCF file.
"in VCFoutput
i.INFO['AC'][index] += 1
IndexError: list index out of range"
Here is the part where error from:
for x in xrange(len(variant[3])):
if variant[3][x] in i.ALT and variant[1][x] in i.REF:
index=i.REF.index(variant[1][x])
**i.INFO['AC'][index] += 1**
i.INFO['AN']+=1
aplotype=index+1
genotype=[aplotype]
Anyone knows how to fix it? Thanks ahead
I added code markup to your post for increased readability. You can do this by selecting the text and clicking the 101010 button. When you compose or edit a post that button is in your toolbar, see image below:
The obvious answer is that it is telling you that the position in the list does not exist. Is this your script? Or taken from somewhere else? Without more of the code, or a brief description in pseudocode explaining what you're doing, it's hard to tell what everything is.