hardingnj / xpclr

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

Index Error: index 1 is out of bounds for axis 1 with size 1 #82

Open huangl07 opened 2 years ago

huangl07 commented 2 years ago

Hi like the code show error xpclr --input /mnt/ilustre/users/dna/Development/SelectGeneFlow/new/work/71/a224da5aff8422edac251f43d541e5/pop.filtered.vcf.gz --samplesA /mnt/ilustre/users/dna/Development/SelectGeneFlow/new/work/6e/a6013b8945088516617de514b02949/1.txt --samplesB /mnt/ilustre/users/dna/Development/SelectGeneFlow/new/work/6e/a6013b8945088516617de514b02949/3.txt --out ./1_3-sca176.xpclr --chr sca176 --size 100000 2022-06-17 08:01:00 : INFO : running xpclr v1.1.2 2022-06-17 08:01:00 : INFO : Loading VCF 2022-06-17 08:01:01 : INFO : VCF loading complete 2022-06-17 08:01:01 : INFO : 1 SNPs in total are in the provided input files 2022-06-17 08:01:01 : INFO : 0 SNPs excluded as multiallelic 2022-06-17 08:01:01 : INFO : 0 SNPs excluded as missing in all samples in a population Traceback (most recent call last): File "/mnt/ilustre/users/dna/.env/bin/xpclr", line 4, in <module> __import__('pkg_resources').run_script('xpclr==1.1.2', 'xpclr') File "/mnt/ilustre/users/dna/.env/lib/python3.9/site-packages/pkg_resources/__init__.py", line 651, in run_script self.require(requires)[0].run_script(script_name, ns) File "/mnt/ilustre/users/dna/.env/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1455, in run_script exec(script_code, namespace, namespace) File "/mnt/ilustre/users/dna/.env/lib/python3.9/site-packages/xpclr-1.1.2-py3.9.egg/EGG-INFO/scripts/xpclr", line 196, in <module> File "/mnt/ilustre/users/dna/.env/lib/python3.9/site-packages/xpclr-1.1.2-py3.9.egg/EGG-INFO/scripts/xpclr", line 152, in main File "/mnt/ilustre/users/dna/.env/lib/python3.9/site-packages/allel/model/ndarray.py", line 2875, in is_singleton return self.values[:, allele] == 1 IndexError: index 1 is out of bounds for axis 1 with size 1

could you please told How to fix it ? the file is in the attach ,thankyou! test.tar.gz

hardingnj commented 2 years ago

From the above it looks like you only have one SNP in your VCF that meets --chr sca176. I'd start by double checking your VCF is properly formatted and includes the data you think it does!