plots: Plot the stratified curves for power-related quantities

Description Usage Arguments Author(s) See Also Examples

Description

These are a group of functions to generate plot to visualize the stratified power metrics, including stratified power, FDR, true discoveries, false discoveries, false discovery cost, and type I error. There will be a line for each sample size. X-axis are strata and y-axis are the metrics. Error bars will be plotted if requested.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
plotPower(powerOutput, cols = 1:ncol(powerOutput$FD),
    lty = 1:ncol(powerOutput$power), main = "", ylab = "Power",
    leg = TRUE, error.bar=TRUE)

plotFDR(powerOutput, cols = 1:ncol(powerOutput$FDR), lty=1:ncol(powerOutput$FDR),
    main = "", ylab="FDR", leg = TRUE, error.bar=TRUE)

plotPowerTD(powerOutput, cols = 1:ncol(powerOutput$TD),
    lty=1:ncol(powerOutput$TD), main="", ylab = "# True Discoveries",
    leg = TRUE, error.bar=TRUE)

plotPowerFD(powerOutput, cols = 1:ncol(powerOutput$FD), lty=1:ncol(powerOutput$FD),
    main = "", ylab = "# False Discoverie", leg = TRUE, error.bar=TRUE)

plotFDcost(powerOutput, cols = 1:ncol(powerOutput$FD), lty=1:ncol(powerOutput$FD),
    main="", ylab = "False discovery cost", leg = TRUE, error.bar=TRUE) 

plotPowerAlpha(powerOutput, cols = 1:ncol(powerOutput$alpha), lty=1:ncol(powerOutput$alpha),
    main = "", ylab = "False positive rate", leg = TRUE, error.bar=TRUE)

plotAll(powerOutput)

Arguments

powerOutput

Result object from "comparePower" function.

cols, lty

Colors and line types of the TD curves.

main

Figure title.

ylab

Y-axis label.

leg

Indicator for having figure legend or not.

error.bar

Indicator for whether plotting error bars in the figures.

Author(s)

Hao Wu <[email protected]>

See Also

comparePower

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
simOptions = RNAseq.SimOptions.2grp()
## run a few simulations
simRes = runSims(Nreps=c(3,5,7), sim.opts=simOptions, nsims=5,
                 DEmethod="edgeR")

## using FDR 0.1 to call DE, then look at power curves and summary
powers = comparePower(simRes)
## plot 
par(mfrow=c(2,3))
plotPower(powers)
plotPowerTD(powers)
plotFDR(powers)
plotFDcost(powers)
plotPowerAlpha(powers)

## in one figure
par(mfrow=c(2,3))
plotAll(powers)

## End(Not run)

Bioconductor-mirror/PROPER documentation built on May 31, 2017, 9:41 p.m.