Description Usage Arguments Details Value Author(s) References See Also Examples
Run ShinyGPA app.
1 |
out |
output of |
shinyGPA
runs the ShinyGPA app. It takes the output of the fitAll
function, which fits the GPA model for all possible pairs of GWAS datasets, as input.
Provides visualization to investigate pleiotropic architecture using GWAS results.
Dongjun Chung, Emma Kortemeier
Kortemeier E, Ramos PS, Hunt KJ, Kim HJ, Hardiman G, and Chung D (2018), "ShinyGPA: An interactive and dynamic visualization toolkit for genetic studies," PLOS One, 13(1): e0190949.
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 30 31 32 33 | # 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.3
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 )
# Run the ShinyGPA app using the ouput from fitAll()
# shinyGPA(out)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.