single.chip.enrichment: Calculate enrichment of a list of genesets in an array

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/single.chip.enrichment.R

Description

Function to assess enrichment of gene sets in an array or matrix of arrays using various summary statistics

Usage

1
2
3
4
5
6
single.chip.enrichment(exprs,
    geneset,
    transformation = "rank",
    statistic = "mean",
    normalizedScore = FALSE,
    progressBar = TRUE)

Arguments

exprs

An expression matrix, rownames correspond to gene ids used in the list of genesets

geneset

list of pathways or genesets over which to assess statistic

transformation

Initial transformation applied to each column of exprs, can be one of "rank", "squared.rank" or "log.rank"

statistic

Summary statistic to be applied, either "mean" or "median"

normalizedScore

Logical. If statistic = "mean" and normalizedScore = TRUE, option to calculate a parametric significance score based on the expected distribution of scores. Other summary statistics currently not supported

progressBar

Logical. Shows progress of script, good to check running okay, set to FALSE for possible faster running

Details

This is the worker function for exprs2fingerprint, in conjuction with an exprs based on Entrez Gene IDs and the standard pathprint genesets e.g. pathprint.Hs.gs. The (un-normalized) results are passed onto thresholdFingerprint to produce the Pathway Fingerprint scores

Value

Matrix containing pathway enrichment scores for each sample in the exprs input matrix. Rownames are genesets and colnames are the columns of the exprs matrix.

Author(s)

Gabriel Altschuler

References

Altschuler, G. M., O. Hofmann, I. Kalatskaya, R. Payne, S. J. Ho Sui, U. Saxena, A. V. Krivtsov, S. A. Armstrong, T. Cai, L. Stein and W. A. Hide (2013). "Pathprinting: An integrative approach to understand the functional basis of disease." Genome Med 5(7): 68.

See Also

exprs2fingerprint

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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
require(pathprintGEOData)
library(SummarizedExperiment)

# load  the data
data(SummarizedExperimentGEO)

# Compare continuous pathway enrichment values to Pathway Fingerprint scores

# Use ALL dataset as an example

require(ALL)
data(ALL)
annotation(ALL)

ds = c("chipframe","pathprint.Hs.gs","genesets","platform.thresholds")
data(list = ds)


# The chip used was the Affymetrix Human Genome U95 Version 2 Array
# The correspending GEO ID is GPL8300

# Analyze patients with ALL1/AF4 and BCR/ABL translocations
ALL.eset <- ALL[, ALL$mol.biol %in% c("BCR/ABL", "ALL1/AF4")]
ALL.exprs<-exprs(ALL.eset)

patient.type<-as.character(ALL$mol.biol[
    ALL$mol.biol %in% c("BCR/ABL", "ALL1/AF4")])

# Process fingerprints
ALL.fingerprint<-exprs2fingerprint(exprs = ALL.exprs,
    platform = "GPL8300",
    species = "human",
    progressBar = TRUE
    )

color.map <- function(mol.biol) {
    if (mol.biol=="ALL1/AF4") "#00FF00" else "#FF00FF"
    }
patientcolors <- sapply(ALL$mol.biol[
    ALL$mol.biol %in% c("BCR/ABL", "ALL1/AF4")],
    function(x){
    if (x == "ALL1/AF4") "#00FF00" else "#FF00FF"
    })


# define list of differentially activated pathways between the two groups
signif.pathways<-diffPathways(ALL.fingerprint,
    fac = patient.type,
    threshold = 0.6)

# draw heatmap
heatmap(ALL.fingerprint[signif.pathways,],
    ColSideColors = patientcolors,
    col = c("blue", "white", "red"),
    scale = "none", mar = c(10,20),
    cexRow = 0.75)
title(sub = "Pathways differentially activated in patients
    with ALL1/AF4 (green) and BCR/ABL(purple) translocations",
        cex.sub = 0.75)

######
# Compare to continous values
ALL.exprs.entrez <- customCDFAnn(ALL.exprs, chipframe$GPL8300$ann)
ALL.enrichment <- single.chip.enrichment(exprs = ALL.exprs.entrez,
    geneset = pathprint.Hs.gs,
    transformation = "squared.rank",
    statistic = "mean",
    normalizedScore = FALSE,
    progressBar = TRUE
    )

heatmap(ALL.enrichment[signif.pathways,],
    ColSideColors = patientcolors,
    col = colorRampPalette(c("blue", "white", "red"))(100),
    scale = "row", mar = c(10,20),
    cexRow = 0.75)
title(sub = "Continuous pathway enrichment scores for patients
    with ALL1/AF4 (green) and BCR/ABL(purple) translocations",
        cex.sub = 0.75)

pathprint documentation built on April 28, 2020, 7:54 p.m.