A gene-set test asks a question of a pathway or a signature as a whole, for one contrast of the linear model fitted to every gene. Two questions differ Goeman & Bühlmann, 2007:
Self-contained: are the genes of the set differentially expressed at all?
fry,roastandmroast.Competitive: are they more differentially expressed than the other genes?
cameraandromer.
A self-contained test finds a set significant when its genes respond, however many other genes respond too: in a response that touches thousands of genes, many sets are. A competitive test asks whether a set stands out from the other genes, and so suits ranking many sets, such as a pathway collection. Every test here works on the linear model, so it allows any design and contrast and does not permute samples; all but romer take voom’s precision weights.
The effects of each gene¶
All five tests start from the same decomposition Wu et al., 2010, section 4.1. The design is reparametrized so that the contrast is its last coefficient, and the QR decomposition of that design turns each gene’s data into a contrast effect and residual effects , independent with variance under the model. The contrast effect over the residual standard deviation is the gene’s t-statistic.
camera¶
Genes are correlated, so a set’s genes are not independent evidence. camera turns each gene’s moderated t-statistic into a z-score and compares the mean z-score of the set’s genes with that of the other genes by a two-sample t-test, with the variance of the set’s mean inflated by
for an inter-gene correlation Wu & Smyth, 2012. The default is limma’s;
inter_gene_correlation=None estimates it for each set from its residual effects.
use_ranks=True gives the rank version, a correlation-adjusted Wilcoxon-Mann-Whitney
test.
fry¶
fry averages each gene’s standardized effects over the set into a vector of values. Under the null hypothesis a random rotation of the residual space leaves the data’s distribution unchanged, so
follows a t distribution on degrees of freedom: the p-value that roast with the mean statistic would give with infinitely many rotations Giner & Smyth, 2016. fry is fast enough for thousands of sets and gives a directional and a mixed p-value for each.
roast and mroast¶
roast draws random rotations of the residual space and compares a set statistic with its values under them Wu et al., 2010Langsrud, 2005. The statistic summarizes the genes’ z-scores: their mean (the default), which detects sets in which most genes change in the same direction, or a floored mean, the mean of the top half or the mean square, which detect sets in which fewer genes change, the mean square the fewest. With of rotations at least as extreme as the observed statistic, the p-value is
Phipson & Smyth, 2010, so it is never zero; each rotation also gives its mirror image for the
up and down alternatives. roast reports the proportion of the set’s genes that are
active in each direction. mroast tests many sets with the same rotations and
adjusts their p-values. Rotations come from a seeded numpy generator, so a seed gives
the same p-values every time; they agree with limma’s within Monte Carlo error.
romer¶
romer ranks every gene’s moderated t-statistic among all genes and compares a set’s mean rank with its values when every gene’s rotated statistics are ranked again Majewski et al., 2010. Like gene set enrichment analysis Subramanian et al., 2005 it pits the sets against each other, but by rotating the residual space instead of permuting samples, so it works for any contrast with residual degrees of freedom. Before rotating, each gene’s contrast effect is shrunk by its posterior probability of being differentially expressed, so that strongly responding genes do not inflate the rotated statistics.
Choices¶
Competitive or self-contained. Rank a collection with camera; ask about one set chosen in advance, such as an interferon signature in an interferon stimulation, with fry or roast.
Correlation. camera’s small default correlation ranks co-regulated sets higher; an estimated correlation controls the error rate strictly for each set.
Rotations. roast’s smallest p-value is ; use enough rotations for the number of sets adjusted for.
Weights. Pass a voom result to use its precision weights; romer takes sample weights only.
- Goeman, J. J., & Bühlmann, P. (2007). Analyzing gene expression data in terms of gene sets: methodological issues. Bioinformatics, 23(8), 980–987. 10.1093/bioinformatics/btm051
- Wu, D., Lim, E., Vaillant, F., Asselin-Labat, M.-L., Visvader, J. E., & Smyth, G. K. (2010). ROAST: rotation gene set tests for complex microarray experiments. Bioinformatics, 26(17), 2176–2182. 10.1093/bioinformatics/btq401
- Wu, D., & Smyth, G. K. (2012). Camera: a competitive gene set test accounting for inter-gene correlation. Nucleic Acids Research, 40(17), e133. 10.1093/nar/gks461
- Giner, G., & Smyth, G. K. (2016). FRY: a fast approximation to ROAST gene set test with mean aggregated set statistics. F1000Research 5, 2605 (slides). 10.7490/f1000research.1113351.1
- Langsrud, �yvind. (2005). Rotation tests. Statistics and Computing, 15(1), 53–60. 10.1007/s11222-005-4789-5
- Phipson, B., & Smyth, G. K. (2010). Permutation p-values should never be zero: calculating exact p-values when permutations are randomly drawn. Statistical Applications in Genetics and Molecular Biology, 9(1), Article 39. 10.2202/1544-6115.1585
- Majewski, I. J., Ritchie, M. E., Phipson, B., Corbin, J., Pakusch, M., Ebert, A., Busslinger, M., Koseki, H., Hu, Y., Smyth, G. K., Alexander, W. S., Hilton, D. J., & Blewitt, M. E. (2010). Opposing roles of polycomb repressive complexes in hematopoietic stem and progenitor cells. Blood, 116(5), 731–739. 10.1182/blood-2009-12-260760
- Subramanian, A., Tamayo, P., Mootha, V. K., Mukherjee, S., Ebert, B. L., Gillette, M. A., Paulovich, A., Pomeroy, S. L., Golub, T. R., Lander, E. S., & Mesirov, J. P. (2005). Gene set enrichment analysis: A knowledge-based approach for interpreting genome-wide expression profiles. Proceedings of the National Academy of Sciences, 102(43), 15545–15550. 10.1073/pnas.0506580102