Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why does BUGWAS calculate another p-values instead of using the raw GEMMA output p-values? #10

Open
Owen-haha opened this issue Jul 26, 2017 · 0 comments

Comments

@Owen-haha
Copy link

Hi developer,
I realized that BUGWAS converts GEMMA output to another p-value instead of using the original one. Can you explain why do we need to do this conversion? Why do it in different ways for biallelic and tritetra allelic SNPs?

The relevant codes are as below.
############################################

For biallelic SNPs

LH1 <- lmm$logl_H1
D <- sapply(LH1, get_deviance, lognull=lambda.lognull["lognull"], USE.NAMES=FALSE)
pvals <- pchisq(as.numeric(D), 1, low=F)

For tritetra allelic SNPs

LH1 <- as.numeric(sapply(lmm, getLH1, USE.NAMES=FALSE))
D <- sapply(LH1, get_deviance, lognull=lognull, USE.NAMES=FALSE)
pvals <- apply(data.frame("D" = D, "num.alleles" = num.alleles), 1, get_pvals)
############################################

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant