Problem reading vcf file. #71

Closed
CanadianGPD opened this Issue Sep 4, 2012 · 3 comments

Comments

Projects
None yet
2 participants

Hi

I'm having trouble reading my vcf file with PyVCF. Any help would be useful the file I'm trying to read was created by vcf tools.

Here is the code:

import vcf
vcf_reader = vcf.Reader(open('all.mergedSNPs.vcf','r'))
for rec in vcf_reader:
print rec

But I get this error
Traceback (most recent call last):
File "", line 1, in
File "/Library/Python/2.7/site-packages/PyVCF-0.6.0-py2.7-macosx-10.7-intel.egg/vcf/parser.py", line 443, in next
pos = int(row[1])
IndexError: list index out of range

Owner

jamescasbon commented Sep 23, 2012

Is there an extra trailing blank line in the file?

Owner

jamescasbon commented Sep 25, 2012

Can you try again with HEAD?

Owner

jamescasbon commented Dec 5, 2012

No response from OP and PR merged, closing

jamescasbon closed this Dec 5, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment