hardingnj / xpclr

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

decide window size or maxsnps #68

Open laolanllx opened 3 years ago

laolanllx commented 3 years ago

Hi,

When I try to use xpclr to detect whether trait-associated SNPs are under selection. I'm confused about the definition of window size, step size for sliding window and maxsnps. How can I set the appropriate parameters to test one SNP, because xpclr calculates a region which includes multiple SNPs? My command looks like this, xpclr -Sa GBR.txt -Sb FIN.txt -C 22 --phased -I vcffile -O output.txt --size 100(or 1000 or 5000 or 50000) --start 16000000 I tried several different parameters of window size showed in the command and the results are pretty different that the highest score are showed in the different regions and the SNPs I wanted may not be selected.

Thanks, Lan

hardingnj commented 3 years ago

the xpclr statistic is not designed test individual SNPs. Any difference in allele frequency in the two groups can be explaned by a_ drift, b) sampling error. It's only when you get a block of snps with different allele frequencies you can begin to make inferences about selection.