Description Usage Arguments Details Value Author(s) References See Also Examples
Fit GPA model and the GPA model under H0 for all possible pairs of GWAS datasets.
1 2 3 |
pmat |
p-value matrix from GWAS data, where row and column correspond to SNP and phenotype, respectively. |
maxIter |
Maximum number of EM iteration. Default is 2000. |
stopping |
Stopping rule for EM iteration.
Possible values are |
epsStopLL |
Threshold to stop the EM iteration. Default is 1e-100. |
parallel |
Utilize multiple CPUs for parallel computing
using |
nCore |
Number of CPUs when parallel computing is utilized. |
fitAll
function fits the GPA model and the GPA model under H0 for all possible pairs of GWAS datasets. Its output can be used as an input for the shinyGPA
function.
A list with 6 elements, including
pmat
(original GWAS p-value matrix),
combs
(a matrix of GWAS pair indices),
combList
(a matrix of GWAS pair indices),
pTestPval
(a matrix of pleiotropy test p-values),
fitGPA
(a list of the GPA fit for each pair), and
fitH0
(a list of the GPA fit under H0 for each pair).
Dongjun Chung, Emma Kortemeier
Kortemeier E, Ramos PS, Hunt KJ, Kim HJ, Hardiman G, and Chung D (2017), "ShinyGPA: An interactive and dynamic visualization toolkit for genetic studies."
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | # simulator function
simulator <- function( risk.ind, nsnp=20000, alpha=0.6 ) {
m <- length(risk.ind)
p.sig <- rbeta( m, alpha, 1 )
pvec <- runif(nsnp)
pvec[ risk.ind ] <- p.sig
return(pvec)
}
# run simulation
set.seed(12345)
nsnp <- 1000
alpha <- 0.4
pmat <- matrix( NA, nsnp, 5 )
pmat[,1] <- simulator( c(1:200), nsnp=nsnp, alpha=alpha )
pmat[,2] <- simulator( c(51:250), nsnp=nsnp, alpha=alpha )
pmat[,3] <- simulator( c(401:600), nsnp=nsnp, alpha=alpha )
pmat[,4] <- simulator( c(451:750), nsnp=nsnp, alpha=alpha )
pmat[,5] <- simulator( c(801:1000), nsnp=nsnp, alpha=alpha )
# Fit GPA for all possible pairs of GWAS datasets
out <- fitAll( pmat, maxIter = 100 )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.