enrichMatrix: Extract chosen enrichment values to a matrix.

Description Usage Arguments Value Examples

Description

Extract enrichment values from multiple samples, i.e. AnnotatedDataFrame objects. Note that the samples should contain annotations of the same type (i.e. the same ontology). The data in matrix format can be easily used in different types of downstream analyses, such as GAGE, and visualised, e.g. using a heatmap.

Usage

1
2
3
4
enrichMatrix(x, variable, replace.na = TRUE)

## S4 method for signature 'list'
enrichMatrix(x, variable, replace.na = TRUE)

Arguments

x

A named list of AnnotatedDataFrame objects.

variable

Character, indicating the statistic values to extract from AnnotatedDataFrame objects in x, must be one of c("enrich","M","A").

replace.na

logical, whether to replace NA values in the output. If 'TRUE' (default), NAs will be replaced by 0. Alternatively, if numueric, NAs will be replaced by that given value.

Value

matrix with sequences' annotations as rows, and variable values for different samples as columns.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
require(Biobase)

# create contingency table
s <- getKO(LD94)
v <- as.numeric(MELP(LD94, ribosomal = TRUE))
ct <- crossTab(s, v, percentiles = 0.2)

# enrichment analysis
enr <- enrichment(ct)
enr # for help, see `?Biobase::AnnotatedDataFrame`
head(pData(enr$top_0.2), 10)
head(pData(enr$gt_1), 10)
enrm <- enrichMatrix(enr, "M")
head(enrm)

BioinfoHR/coRdon documentation built on May 6, 2019, 8:35 p.m.