SNPRelate
SNPRelate copied to clipboard
snpgdsLDpruning gives an empty snp dataset
Hi, I tried to use snpgdsLDpruning() for the first time, but I get a pruned snp dataset with no SNPs.
This is the code I used: <pruned_snpset = snpgdsLDpruning(my_GDS_File, autosome.only=FALSE, method="corr", slide.max.bp=10e6, ld.threshold=sqrt(0.1), verbose=FALSE)
View(pruned_snpset) # list of length 0 pruned_snpset # NULL>
My dataset comes for RADseq and contains SNPs data but no chromosome or SNP position information as we have no genome for this species. Is that why it gives no pruned SNPs?
Thanks a lot for your feedback and assistance, best, Gabriella
Could you please show me the output of snpgdsLDpruning()?
The output is something like:
SNP pruning based on LD:
Excluding 8 SNPs (monomorphic: TRUE, MAF: NaN, missing rate: NaN)
# of samples: 279
# of SNPs: 9,080
using 1 thread
sliding window: 500,000 basepairs, Inf SNPs
|LD| threshold: 0.2
method: composite
Chromosome 1: 75.98%, 544/716
Chromosome 2: 72.91%, 541/742
Chromosome 3: 74.38%, 453/609
Chromosome 4: 72.78%, 409/562
...
Dear Dr. Zheng, the output "pruned_snpset" is a list of length 0... so, it seems like the function ran but created no outcome analysis...I am not sure whether this is due to the absence of chromosome/snp position information or the use of the sliding window?
When I type "pruned_snpset" in the R console, I get the following message: list()
But I did not get any error message when running snpgdsLDpruning() with the code I reported below. However, it was incredibly quick (not sure if it is normal as it is the first time that I run this function).
I tried running the function with "verbose = TRUE", and this is the message I obtained:
<SNP pruning based on LD: Excluding 0 SNP (monomorphic: TRUE, MAF: NaN, missing rate: NaN) # of samples: 425 # of SNPs: 8,685 using 1 thread sliding window: 10,000,000 basepairs, Inf SNPs |LD| threshold: 0.316228 method: correlation 0 markers are selected in total>
I am not sure if that is helpful at all! Hopefully it can help you understand where my problem is? Thanks again Best, Gabriella
Sorry, I don't know how to fix the problem based on your description. If possible, send me your data file.
Best wishes,