Entering edit mode
alyssahz
•
0
@aa933c99
Last seen 4.0 years ago
Hello!
I am trying to apply snpgdsLDpruning
to data from the UK Biobank but am running into an error saying, "The GDS node "genotype/data" does not exist." I have converted the downloaded bgen files to gds and tried the code below.
Code:
library(SeqArray)
library(SAIGEgds)
library(SNPRelate)
# gds_fn is the path to our chromosome 22 gds file.
gds <- seqOpen(gds_fn)
set.seed(1000)
snpset <- snpgdsLDpruning(gds)
Output:
Loading required package: gdsfmt
Loading required package: Rcpp
SNPRelate -- supported by Streaming SIMD Extensions 2 (SSE2)
SNV pruning based on LD:
Calculating allele counts/frequencies ...
Error in seqApply(f, "genotype", margin = "by.variant", as.is = "list", :
The GDS node "genotype/data" does not exist.
Calls: snpgdsLDpruning ... eval -> <Anonymous> -> seqParallel -> FUN -> seqApply
Execution halted
I am new to the GDS file type, so any help and insight would be greatly appreciated. Thanks!
Alyssa
If you used the "gds2bgen" package to convert bgen files to gds, you would need "geno=TRUE" in seqBGEN2GDS(). SNPRelate does not work on dosages, and it needs genotypes.