hardingnj / xpclr

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

A bug of output file. #62

Closed zhiquanyang closed 3 years ago

zhiquanyang commented 3 years ago

Dear author, Hello! I got an error message as following: $ xpclr --format vcf --input bna210_maf0.01_miss0.5.het0.5.phase2.vcf --samplesA Wids.txt --samplesB Sids.txt --phased --ld 0.95 --maxsnps 200 --size 50000 --step 50000 --rrate 0.000002175168 --chr scaffoldA01 -O W_S.txt Error. nthreads cannot be larger than environment variable "NUMEXPR_MAX_THREADS" (64)Traceback (most recent call last): File "/home/zqyang/miniconda3/envs/snp/bin/xpclr", line 196, in main() File "/home/zqyang/miniconda3/envs/snp/bin/xpclr", line 88, in main "No permission to write in the specified directory: {0}".format(outdir) AssertionError: No permission to write in the specified directory:

But I found no problems when I run it like this: $ xpclr --format vcf --input bna210_maf0.01_miss0.5.het0.5.phase2.vcf --samplesA Wids.txt --samplesB Sids.txt --phased --ld 0.95 --maxsnps 200 --size 50000 --step 50000 --rrate 0.000002175168 --chr scaffoldA01 -O ./W_S.txt Error. nthreads cannot be larger than environment variable "NUMEXPR_MAX_THREADS" (64)2020-09-03 17:44:17 : INFO : running xpclr v1.1.2 2020-09-03 17:44:17 : INFO : Loading VCF 2020-09-03 17:44:51 : INFO : VCF loading complete 2020-09-03 17:44:52 : INFO : 136,292 SNPs in total are in the provided input files 2020-09-03 17:44:52 : INFO : 0 SNPs excluded as multiallelic 2020-09-03 17:44:52 : INFO : 0 SNPs excluded as missing in all samples in a population 2020-09-03 17:44:52 : INFO : 13,576 SNPs excluded as invariant or singleton in population 2 2020-09-03 17:44:52 : INFO : 122,716/136,292 SNPs included in the analysis (90.04%) 2020-09-03 17:44:52 : INFO : Done dropping above SNPs from analysis. XP-CLR algorithm starting. 2020-09-03 17:44:52 : INFO : No genetic distance provided; using rrate of 2.175168e-06/bp 2020-09-03 17:44:52 : INFO : Omega estimated as : 0.577093 2020-09-03 17:46:29 : INFO : Analysis complete. Output file ./W_S.txt So, I think you can optimize it when it identify output file :).

hardingnj commented 3 years ago

Hi,

This bug was fixed in https://github.com/hardingnj/xpclr/pull/58 by @xuzhougeng

If you install from master, this should have the fix implemented.

Thanks!

zhiquanyang commented 3 years ago

OK! I see. I install from conda. Thank you!