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