CMAPResults-class: Class '"CMAPResults"'

Description Details Objects from the Class Slots Methods Author(s) See Also Examples

Description

This class serves as a container for the output of different gene-set enrichment analysis methods. It directly extends the AnnotatedDataFrame class by adding two additional slots ('docs' and 'errors' to store information about the analysis raun. Data for each queried gene set are stored in the 'data' slot of the AnnotatedDataFrame. Additional information about the data columns, e.g. the definition of 'effect' for the chosen analysis method, is available in the varMetadata slot of the AnnotatedDataFrame and can also be accessed through the 'labels' accessor function.

Details

The AnnotatedDataFrame 'table' is populated by gene set enrichment analysis methods as needed. Explicit accessor and replacement methods exist for the following columns:

In addition, gene set annotations can be included in further columns of the 'table' AnnotatedDataFrame, e.g. retrieved from the phenoData slot of a CMAPCollection.

Objects from the Class

Objects can be created by calls of the form new("CMAPResults", ...). CMAPResults objects are usually created as output by gene set enrichment analysis methods.

Slots

data:

A data.frame containing results for different gene sets (rows), with method-specific output stored in the columns.

dimLabels:

A character vector of length 2 that provides labels for the rows and columns.

varMetadata:

A data.frame with the number of rows equal to the number of columns in 'data' and at least one column, named 'labelDescription', containing additional information about each result column.

.__classVersion__:

A 'Versions' object describing the R and Biobase version numbers used to created the instance. Intended for developer use.

docs:

Object of class "character" Additional information about the analysis run, usually populated by the gene set enrichment method.

errors:

Object of class "list" Intented for warnings or error messages associated with the results.

Methods

cmapTable

signature(object = "CMAPResults"): Returns data and labels stored in the 'table' AnnotatedDataFrame. If no additional parameters are supplied, this method is synonymous with pData(object@table).

Optional parameters: n (integer): the number of rows to return. columns (character): indicating which columns of the 'table' slot to include in the output.

docs

signature(object = "CMAPResults"): Accessor method for the 'docs' slot.

docs<-

signature(x = "CMAPResults"): Replacement method for the 'docs' slot.

effect

signature(object = "CMAPResults"): Accessor method for the 'effect' column of the 'table' slot.

effect<-

signature(x = "CMAPResults"): Replacement method for the 'effect' column of the 'table' slot.

errors

signature(object = "CMAPResults"): Accessor method for the 'docs' slot.

errors<-

signature(x = "CMAPResults"): Replacement method for the 'docs' slot.

labels

signature(object = "CMAPResults"): Returns information about the data columns of the 'table' slot. Synonymous with varMetadata(object@table).

labels<-

signature(x = "CMAPResults"): Replacement method for the varMetdata slot of the 'table' AnnotatedDataFrame. Replacement value must be a data.frame with as many rows as there are columns in 'table' and contain the column 'labelDescription'. See AnnotatedDataFrame for details.

nFound

signature(object = "CMAPResults"): Accessor method for the 'nFound' column of the 'table' slot.

nFound<-

signature(x = "CMAPResults"): Replacement method for the 'nFound' column of the 'table' slot.

nSet

signature(object = "CMAPResults"): Accessor method for the 'nSet' column of the 'table' slot.

nSet<-

signature(x = "CMAPResults"): Replacement method for the 'nSet' column of the 'table' slot.

padj

signature(object = "CMAPResults"): Accessor method for the 'padj' column of the 'table' slot.

padj<-

signature(x = "CMAPResults"): Replacement method for the 'padj' column of the 'table' slot.

plot

signature(x = "CMAPResults", y = "ANY"): Returns an overview of the results stored in a CMAPResults object: 1. the distribution of scores across all results and 2. a heatmap of rank-ordered effect sizes.

  • strip.effect: String specifying the CMAPResults column to retrieve scores from. Default:"effect"

  • strip.pval: String specifying the CMAPResults column to transform into unsigned z-scores. Only evaluated if 'density.effect' column is not present or is set to 'NULL'.Default:"padj"

  • strip.cutoffs: Numeric vector of length 2. Scores between strip.cutoffs[1] and strip.cutoffs[2] will be displayed in strip.col[2]. Default:c(-3,3)

  • strip.bounds: Numeric vector of length 2 specifying the end points of the color gradient. Scores < strip.cutoffs[1] or > strip.cutoffs[2] will not be distinguishable.Default:c(-6,6)

  • strip.col: Vector of length 3, specifying the colors used in the heatmap strip: strip.col[1] = low scores, strip.col[2] = medium score (excluded from gradient), strip.col[3] = high scores. Default:c("blue","white","red")

  • set.inf: Numerical replacing Inf/-Inf scores in the density plot (default:+/-20)

  • col.upRug plot color for positively correlated instances

  • col.downRug plot color for negatively correlated instances

pval

signature(object = "CMAPResults"): Accessor method for the 'pval' column of the 'table' slot.

pval<-

signature(x = "CMAPResults"): Replacemant method for the 'pval' column of the 'table' slot

set

signature(object = "CMAPResults"): Accessor method for the 'set' column of the 'table' slot.

set<-

signature(x = "CMAPResults"): Replacement method for the 'set' column of the 'table' slot.

show

signature(object = "CMAPResults"): Returns a summary of the CMAPResult object, including the number rows in the 'table' slot and shows the top five results with the smallest p-values.

trend

signature(object = "CMAPResults"): Accessor method for the trend' column of the 'table' slot.

trend<-

signature(x = "CMAPResults"): Replacement method for the geneScores' column of the 'table' slot.

geneScores

signature(object = "CMAPResults"): Accessor method for the geneScores' column of the 'table' slot. When available, this column stores a list of matrices, one for each row of the CMAPResults object, with raw per-gene scores for all members of the gene set. While the 'show' method displays only a brief summary of the available data, the geneScores method retrieves the full list of score matrices.

zscores

signature(x = "CMAPResults"): Transforms adjusted p-values stored in a CMAPResults into z-scores based on the standard normal distribution.

Author(s)

Thomas Sandmann, sandmann.thomas@gene.com

See Also

AnnotatedDataFrame

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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
## create random score profile
set.seed(123)
z <- rnorm(1000)
names(z) <- paste("g", 1:1000, sep="")

## generate random incidence matrix of gene sets
m <-replicate(1000, {
  s <- rep(0,1000)
  s[ sample(1:1000, 20)] <-  1
  s[ sample(1:1000, 20)] <- -1
  s
  })
dimnames(m) <- list(names(z), paste("set", 1:1000, sep=""))

## Set1 is up-regulated
z <- z + m[,1]*2

## create CMAPCollection
cmap <- CMAPCollection(m, signed=rep(TRUE,1000))

## gene-set enrichment test
res <- gsealm_jg_score(z, cmap)
class(res)
res

## overview plot
plot(res)

## rerun, this time store gene-level scores
res <- gsealm_jg_score(z, cmap, keep.scores=TRUE)
res
m <- geneScores(res)
m[["set1"]] ## scores for set1

## stripplot for set1, colored by annotated sign
gene.signs <- factor( attr(m[["set1"]], "sign"))
boxplot( m[["set1"]] ~ gene.signs, 
  ylab="z-score", 
  main="Set1", 
  col=c("blue", "red"))

gCMAP documentation built on April 29, 2020, 3:54 a.m.