| camera.DGEList {edgeR} | R Documentation |
Test whether a set of genes is highly ranked relative to other genes in terms of differential expression, accounting for inter-gene correlation.
## S3 method for class 'DGEList' camera(y, index, design, contrast=ncol(design), weights=NULL, use.ranks=FALSE, allow.neg.cor=TRUE, trend.var=FALSE, sort=TRUE)
y |
|
index |
an index vector or a list of index vectors. Can be any vector such that |
design |
design matrix. |
contrast |
contrast of the linear model coefficients for which the test is required. Can be an integer specifying a column of |
weights |
can be a numeric matrix of individual weights, of same size as |
use.ranks |
do a rank-based test ( |
allow.neg.cor |
should reduced variance inflation factors be allowed for negative correlations? |
trend.var |
logical, should an empirical Bayes trend be estimated? See |
sort |
logical, should the results be sorted by p-value? |
This function implements a method proposed by Wu and Smyth (2012) for the digital gene expression data, eg. RNA-Seq data.
camera performs a competitive test in the sense defined by Goeman and Buhlmann (2007).
It tests whether the genes in the set are highly ranked in terms of differential expression relative to genes not in the set.
It has similar aims to geneSetTest but accounts for inter-gene correlation.
See roast.DGEList for an analogous self-contained gene set test.
The function can be used for any sequencing experiment which can be represented by a Negative Binomial generalized linear model.
The design matrix for the experiment is specified as for the glmFit function, and the contrast of interest is specified as for the glmLRT function.
This allows users to focus on differential expression for any coefficient or contrast in a model by giving the vector of test statistic values.
camera estimates p-values after adjusting the variance of test statistics by an estimated variance inflation factor.
The inflation factor depends on estimated genewise correlation and the number of genes in the gene set.
A data.frame. See camera for details.
Yunshun Chen, Gordon Smyth
Wu, D, and Smyth, GK (2012). Camera: a competitive gene set test accounting for inter-gene correlation. Nucleic Acids Research 40, e133. http://nar.oxfordjournals.org/content/40/17/e133
Goeman, JJ, and Buhlmann, P (2007). Analyzing gene expression data in terms of gene sets: methodological issues. Bioinformatics 23, 980-987.
mu <- matrix(10, 100, 4) group <- factor(c(0,0,1,1)) design <- model.matrix(~group) # First set of 10 genes that are genuinely differentially expressed iset1 <- 1:10 mu[iset1,3:4] <- mu[iset1,3:4]+10 # Second set of 10 genes are not DE iset2 <- 11:20 # Generate counts and create a DGEList object y <- matrix(rnbinom(100*4, mu=mu, size=10),100,4) y <- DGEList(counts=y, group=group) # Estimate dispersions y <- estimateDisp(y, design) camera(y, iset1, design) camera(y, iset2, design) camera(y, list(set1=iset1,set2=iset2), design)