Simulation of Polygenic Risk Score calculations allows to
Simulations are performed without direct simulations of the genotype and phenotype data. Instead, genome-wide association study (GWAS) summary statistics are generated directly from their finite sample distributions.
simPRS
onlineTo try simPRS
via an online shiny interface
click here.
To install simPRS
directly from GitHub, run
if(!requireNamespace("devtools", quietly = TRUE))
install.packages("devtools")
devtools::install_github("andreyshabalin/simPRS")
# Parameters
NTotalSNPs = 10000
NSignalSnps = 100
heritability = 0.2
signalDistr = "Same"
Ntrain = 10000
Ntest = 10000
signal = genSignal(
NSignalSnps = NSignalSnps,
NTotalSNPs = NTotalSNPs,
heritability = heritability,
signalDistr = signalDistr)
gwas = gwasFast(signal = signal, N = Ntrain)
prs = prsInf(
gwasPV = gwas$pv,
gwasBt = gwas$beta,
signal = signal)
rci = rConfInt(r = prs$r, N = Ntest)
prsPlot(pv = prs$pv, r = prs$r, rci)
Let's use the parameters and signal
defined above
Nsim = 1000
prsA = prsMultitest(signal = signal, N = Ntrain, Nsim = Nsim)
rci = rConfInt(r = prsA$r, N = Ntest)
prsPlot(pv = prsA$pv, r = prsA$r, rci)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.