Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

snpgdsLDpruning gives an empty snp dataset #102

Open
GabryS3 opened this issue Nov 6, 2023 · 4 comments
Open

snpgdsLDpruning gives an empty snp dataset #102

GabryS3 opened this issue Nov 6, 2023 · 4 comments

Comments

@GabryS3
Copy link

GabryS3 commented Nov 6, 2023

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

@zhengxwen
Copy link
Owner

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
...

@GabryS3
Copy link
Author

GabryS3 commented Nov 7, 2023

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?

@GabryS3
Copy link
Author

GabryS3 commented Nov 8, 2023

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

@zhengxwen
Copy link
Owner

Sorry, I don't know how to fix the problem based on your description.
If possible, send me your data file.

Best wishes,

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants