hanchenphd / GMMAT

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

glmm.wald producing NA output #30

Closed mfknie closed 3 years ago

mfknie commented 3 years ago

I have had a recurring issue running glmm.wald where results are all NA, looking something like this: image.

The data I was testing is of the following format - https://www.cog-genomics.org/plink/2.0/formats#traw. I wanted to gauge the runtime of the GMMAT for my current data, so there is just a single SNP in this file.
Here are the parameters I am using:

glmm.wald(
    fixed = as.formula(paste("case", paste(covars, collapse = "+"), sep = "~")), 
    data = cov_nona, 
    kins = list(ARM, study),
    id = "id",
    family = binomial(link="logit"),
    #select = sel,
    snps = snps[, V1],
    infile = p_args$dose, 
    infile.nrow.skip = 1,
    infile.ncol.skip = 6,
    infile.sep = "\t",
    infile.ncol.print = c(1, 2, 4, 5, 6),
    infile.header.print = c("SNP", "CHR", "POS", "REF", "ALT"),
    verbose = TRUE
)

Note that p_args$dose is the name of the file I mentioned above. I have used the same formula, covariate/phenotype data files, ARM matrix files and study block matrix files (the last two representing random components and being input into as the kins argument) to run glmmkin and glmm.score, and I have thus far not experienced any similar issues there. I have tried to preprocess the data to make sure everything is the right order beforehand.

In general, what would trigger this type of output? I feel like I have missed something simple.

hanchenphd commented 3 years ago

If the second column (instead of the first) of your infile is the SNP column, then you would want to add snp.col=2 to specify that.

Best, Han

mfknie commented 3 years ago

Thank you for the response. It seems like that was the simple thing I missed.