Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Unable to fetch records from indexed VCF file #113

DSrcl opened this Issue Aug 2, 2013 · 1 comment


None yet
2 participants

DSrcl commented Aug 2, 2013

Here are my python lines trying to fetch some records from one of the example VCF files in you repo:
vcf_reader = vcf.Reader(filename='tb.vcf.gz')
for record in vcf_reader.fetch('20', 1110696, 1230237):
print record

It prints nothing however.


martijnvermaat commented Aug 2, 2013

Works for me:

martijn@aida:~/projects/PyVCF[:master-]$ python
Python 2.7.3rc2 (default, Apr 22 2012, 22:30:17) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import vcf
>>> vcf_reader = vcf.Reader(filename='vcf/test/tb.vcf.gz')
>>> for r in vcf_reader.fetch('20', 1110696, 1230237):
...     print r
Record(CHROM=20, POS=1110696, REF=A, ALT=[G, T])
Record(CHROM=20, POS=1230237, REF=T, ALT=[None])

Closing this one, but feel free to create a new issue if the problem persists.

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