hanchenphd / GMMAT

Generalized linear Mixed Model Association Tests
Other
36 stars 22 forks source link

error in glmm.wald : the condition has length > 1 #64

Open mgarrett1020 opened 1 month ago

mgarrett1020 commented 1 month ago

I have successfully run glmm.score, but am getting the following error with glmm.wald (using gds): Error in if (is.gds) { : the condition has length > 1

R version 4.4.1 (2024-06-14) -- "Race for Your Life" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu

pheno <- read.table("pheno.txt", sep="\t", header=T) rownames(pheno) <- pheno$ID

GRM <- as.matrix(read.table("test.rel",header=F)) header <- readLines("header.txt") rownames(GRM) <- header colnames(GRM) <- header

seqVCF2GDS(test.recode.vcf", "test.gds", fmt.import="GT", storage.option="LZMA_RA", verbose=FALSE) gds <- seqOpen("test.gds")

snps <- c("SNP1","SNP2") #actually used SNP names stored in annotation/id - just providing dummy name here glmm.wald(fixed = pheno1 ~ age + sex, data=pheno, kins=GRM, id="ID", family=binomial(link="logit"), infile=gds, snps=snps) Error in if (is.gds) { : the condition has length > 1

Thanks in advance for any advice you can provide!

hanchenphd commented 1 month ago

You should use infile="test.gds" instead.

Best, Han

mgarrett1020 commented 1 month ago

Thank you!