-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Hello, I am running SNPrelate on my genlight file from DART, and converting it to a gds. Using the code bellow, I get an error at the SNP pruning step. It says I have No SNP. Is this a known bug currently or have you got any troubleshooting ideas? see code bellow. Thanks
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("SNPRelate")
gl2gds(gl.secondaries.filtered, outfile = "glsecondariesfiltered7.gds", outpath = "C:/Users/21981245/Desktop/DaRT workshop")
gds <- snpgdsOpen("glsecondariesfiltered7.gds")
gds
str(gds)
names(gds)
gl.secondaries.filtered
gds.pruned <-snpgdsLDpruning(gds, sample.id=NULL, snp.id=NULL, autosome.only=TRUE,
remove.monosnp=TRUE, maf=NaN, missing.rate=NaN,
method=c("composite", "r", "dprime", "corr"), slide.max.bp=500000L,
slide.max.n=NA, ld.threshold=0.1, start.pos=c("random", "first", "last"),
num.thread=1L, verbose=TRUE)
ERROR: SNP pruning based on LD: Excluding 4,984 SNPs on non-autosomes
Error in .InitFile2(cmd = paste(ifelse(inherits(gdsobj, "SeqVarGDSClass"), :
There is no SNP!