Methods for Function camera_score in Package gCMAP

Description

These methods provide a wrapper for the 'Competitive Gene Set Test Accounting for Inter-gene Correlation' function camera See 'limma' documention for details.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## S4 method for signature 'eSet,CMAPCollection'
camera_score(experiment,sets,predictor=NULL,
design.matrix=NULL, element="exprs",keep.scores=FALSE,...)

## S4 method for signature 'matrix,CMAPCollection'
camera_score(experiment, sets,...)

## S4 method for signature 'matrix,GeneSet'
camera_score(experiment,sets,...)

## S4 method for signature 'eSet,GeneSet'
camera_score(experiment, sets, element="exprs",...)

## S4 method for signature 'matrix,GeneSetCollection'
camera_score(experiment,sets,...)

## S4 method for signature 'eSet,GeneSetCollection'
camera_score(experiment, sets, element="exprs",...)

Arguments

sets

A CMAPCollection, GeneSetCollection or GeneSet object containing gene sets, with which to query the experiment object.

experiment

An eSet or data matrix with numeric data to compare the query object to.

predictor

A character vector or factor indicating the phenotypic class of the experiment data columns. Either the 'predictor' or 'design' parameter must be supplied.

design.matrix

A design matrix for the experiment. Either the 'predictor' or 'design' parameter must be supplied. If both are supplied, the 'design' is used.

element

Character vector specifying which channel of an eSet to extract (defaults to "exprs", alternatives may be e.g. "z", etc.)

keep.scores

Logical: keep gene-level scores for all gene sets (Default: FALSE) ? The size of the generated CMAPResults object increases with the number of contained gene sets. For very large collections, setting this parameter to 'TRUE' may require large amounts of memory.

...

Additional arguments passed to downstream methods.

Value

A CMAPResults object.

References

Wu, D, and Smyth, GK (2012). Camera: a competitive gene set test accounting for inter-gene correlation. Submitted.

Goeman, JJ, and Buhlmann, P (2007). Analyzing gene expression data in terms of gene sets: methodological issues. Bioinformatics 23, 980-987.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
data(gCMAPData)
gene.set.collection <- induceCMAPCollection(gCMAPData, "z", higher=2, lower=-2)
sampleNames( gene.set.collection ) <- c("set1", "set2", "set3")

## random score matrix
y <- matrix(rnorm(1000*6),1000,6, dimnames=list(featureNames(gCMAPData), 1:6))

## set1 is differentially regulated
effect <- as.vector(members(gene.set.collection[,1]) * 2)
y[,4:6] <- y[,4:6] + effect

predictor <- c( rep("Control", 3), rep("Case", 3))

res <- camera_score(y, gene.set.collection, predictor = predictor, keep.scores=TRUE)
res 

## heatmap of expression scores for set1
set1.expr <- geneScores(res)[["set1"]]
heatmap(set1.expr, scale="none", Colv=NA, labCol=predictor,
        RowSideColors=ifelse( attr(set1.expr, "sign") == "up", "red", "blue"),
        margin=c(7,5))
legend(0.35,0,legend=c("up", "down"),
       fill=c("red", "blue"),
       title="Annotated sign",
       horiz=TRUE, xpd=TRUE)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.