prsPlot: Plot PRS performance (R-squared)

Description Usage Arguments Details Value Author(s) Examples

Description

Plot PRS performance (R-squared) with a confidence band.

Usage

1
prsPlot(pv, r, confInt)

Arguments

pv, r

Vectors of p-value thresholds and asymptotic correlations with phenotype, as produced by prsInf.

confInt

Upper and lower boundaries of the confidence band, as returned by rConfInt.

Details

The plot uses reverse log10 scale for the p-value threshold axis (horizontal).

Value

The function returns nothing.

Author(s)

Andrey A Shabalin andrey.shabalin@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
NTotalSNPs = 10000
NSignalSnps = 100
heritability = 0.2
signalDistr = "Same"
Ntrain = 10000
Ntest = 3000

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)

andreyshabalin/simPRS documentation built on May 21, 2019, 2 p.m.