brentp / cyvcf2

cython + htslib == fast VCF and BCF processing
MIT License
379 stars 72 forks source link

assertion error thrown on bcf.gz #85

Open ingkebil opened 6 years ago

ingkebil commented 6 years ago

Might be related to #46 as I manage to fix the assertion error by renaming the bcf.gz (and bcf.gz.csi) to bcf (and bcf.csi)

Below is the relevant part of the stacktrace:

  File "/mnt/hds/proj/bioinfo/SERVER/miniconda/envs/stage/lib/python3.6/site-packages/genotype/load/vcf.py", line 58, in fetch_snp
    variants = list(vcf(pos_str))
  File "cyvcf2/cyvcf2.pyx", line 371, in __call__
AssertionError: error loading tabix index for b'/mnt/hds/proj/bioinfo/STAGE/bundles/cuddlyoryx/2018-06-14/cuddlyoryx_sorted_md_brecal_haptc_BOTH.bcf.gz'

I know it's not much to go on. In #46 you hint that you would make it more tolerant to this type of naming and I was wondering if you ever got around implementing that?

mbhall88 commented 4 years ago

I am having the same issue. The workaround of dropping the .gz extension is a hack and it would be nice if the library seamlessly supported .bcf.gz