hardingnj / xpclr

Code to compute the XP-CLR statistic to infer natural selection
MIT License
85 stars 26 forks source link

RuntimeError: VCF file is missing mandatory header line ("#CHROM...") #81

Open erya-song opened 2 years ago

erya-song commented 2 years ago

I am getting an error when I run a new xpclr command, it shows that

Traceback (most recent call last): File "/opt/miniconda3/bin/xpclr", line 4, in import('pkg_resources').run_script('xpclr==1.1.2', 'xpclr') File "/opt/miniconda3/lib/python3.7/site-packages/pkg_resources/init.py", line 665, in run_script self.require(requires)[0].run_script(script_name, ns) File "/opt/miniconda3/lib/python3.7/site-packages/pkg_resources/init.py", line 1470, in run_script exec(script_code, namespace, namespace) File "/opt/miniconda3/lib/python3.7/site-packages/xpclr-1.1.2-py3.7.egg/EGG-INFO/scripts/xpclr", line 196, in File "/opt/miniconda3/lib/python3.7/site-packages/xpclr-1.1.2-py3.7.egg/EGG-INFO/scripts/xpclr", line 102, in main File "/opt/miniconda3/lib/python3.7/site-packages/xpclr-1.1.2-py3.7.egg/xpclr/util.py", line 133, in load_vcf_format_data File "/opt/miniconda3/lib/python3.7/site-packages/xpclr-1.1.2-py3.7.egg/xpclr/util.py", line 117, in load_vcf_wrapper File "/home/hoo/.local/lib/python3.7/site-packages/allel/io/vcf_read.py", line 308, in read_vcf samples=samples, transformers=transformers File "/home/hoo/.local/lib/python3.7/site-packages/allel/io/vcf_read.py", line 1138, in iter_vcf_chunks fields, samples, headers, it = _iter_vcf_stream(stream, kwds) File "/home/hoo/.local/lib/python3.7/site-packages/allel/io/vcf_read.py", line 1636, in _iter_vcf_stream headers = _read_vcf_headers(stream) File "/home/hoo/.local/lib/python3.7/site-packages/allel/io/vcf_read.py", line 1763, in _read_vcf_headers raise RuntimeError('VCF file is missing mandatory header line ("#CHROM...")') RuntimeError: VCF file is missing mandatory header line ("#CHROM...")**

but the vcf file is well formated. image

hardingnj commented 2 years ago

Seems to be the same issue as described here: https://github.com/cggh/scikit-allel/issues/376

Workaround: https://github.com/cggh/scikit-allel/issues/376#issuecomment-1132116452