Description Usage Arguments Details 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.
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 30 31 32 33 34 35 36 | ## Not run:
# 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 <- 10000
alpha <- 0.4
pmat <- matrix( NA, nsnp, 5 )
pmat[,1] <- simulator( c(1:2000), nsnp=nsnp, alpha=alpha )
pmat[,2] <- simulator( c(501:2500), nsnp=nsnp, alpha=alpha )
pmat[,3] <- simulator( c(4001:6000), nsnp=nsnp, alpha=alpha )
pmat[,4] <- simulator( c(4501:7500), nsnp=nsnp, alpha=alpha )
pmat[,5] <- simulator( c(8001:10000), nsnp=nsnp, alpha=alpha )
# Fit GPA for all possible pairs of GWAS datasets
out <- fitAll( pmat )
# Run the ShinyGPA app using the ouput from fitAll()
shinyGPA(out)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.