For the limma/voom RNAseq analysis pipeline, when we control false discovery
rate by using the Benjamini and Hochberg step-up procedure (1995)
and/or Storey and Tibshirani's q-value procedure (Storey et al, 2004),
`check.power`

calculates average power and true FDR for given sample
size, user-specified proportions of non-differentially expressed genes,
number of iterations, FDR level to control, mean counts in control group,
dispersion, and fold change.

1 2 | ```
check.power(nGenes = 10000, pi0 = 0.8, m, mu, disp, fc, up = 0.5,
replace = TRUE, fdr = 0.05, sims = 100)
``` |

`nGenes` |
total number of genes, the default value is |

`pi0` |
proportion of non-differentially expressed genes,
the default value is |

`m` |
sample size per treatment group. |

`mu` |
a vector (or scalar) of mean counts in control group from which to simulate. |

`disp` |
a vector (or scalar) of dispersion parameter from which to simulate. |

`fc` |
a vector (or scalar, or a function that takes an integer n and generates a vector of length n) of fold change for differentially expressed (DE) genes. |

`up` |
proportion of up-regulated genes among all DE genes,
the default value is |

`replace` |
sample with or without replacement from given parameters. See Details for more information. |

`fdr` |
the false discovery rate to be controlled. |

`sims` |
number of simulations to run when computing power and FDR. |

`pow_bh_ave` |
average power when controlling FDR by Benjamini and Hochberg (1995) method. |

`fdr_bh_ave` |
true false discovery rate when controlling FDR by Benjamini and Hochberg (1995) method. |

`pow_bh_ave` |
average power when controlling FDR by q-value procedure (Storey et al., 2004). |

`fdr_bh_ave` |
true false discovery rate when controlling FDR by q-value procedure (Storey et al., 2004). |

Ran Bi biran@iastate.edu, Peng Liu pliu@iastate.edu

Benjamini, Y. and Hochberg, Y. (1995)
Controlling the false discovery rate: a practical and
powerful approach to multiple testing.
*J. R. Stat. Soc. B*, 57, 289-300.

Storey, J. D., Taylor, J. E. and Siegmund, D. (2004)
Strong control, conservative point estimation and
simultaneous rates: a unified approach.
*J. R. Stat. Soc. B*, 66, 187- 205.

1 2 3 4 5 6 7 8 | ```
library(limma)
library(qvalue)
m <- 14 ## sample size per treatment group
mu <- 10 ## mean read counts in control group
disp <- 0.1 ## dispersion for all genes
fc <- 2 ## 2-fold change for DE genes
check.power(m = m, mu = mu, disp = disp, fc = fc, sims = 2)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.