Skip to content

Error: There is no SNP! #107

@jane-edgeloe

Description

@jane-edgeloe

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions