heatmapPhenoTest: Produce heatmap from phenotype data.

Description Usage Arguments Details Author(s) Examples

Description

Show the associations between clusters that each sample belongs to and each phenotype in a heatmap and/or a Kaplan-Meier plot.

Usage

1
2
3
4
5
heatmapPhenoTest(x, signatures, vars2test, probes2genes = FALSE,
filterVar, filteralpha = 0.05, distCol = "pearson", nClust = 2, distRow
= "cor", p.adjust.method = "none", simulate.p.value = FALSE, B = 10^5,
linkage = "average", equalize = FALSE, center = TRUE, col, survCol,
heat.kaplan="both", ...)

Arguments

x

ExpressionSet with phenotype information stored in pData(x).

signatures

Either character vector or list of character vectors with gene sets to be used to draw heatmaps (gene names should match those in featureNames(x)). A separate heatmap will be produced for each element in the list.

vars2test

list with components 'continuous', 'categorical', 'ordinal' and 'survival' indicating which phenotype variables should be tested. 'continuous', 'categorical' and 'ordinal' must be character vectors, 'survival' a matrix with columns named 'time' and 'event'. The names must match names in names(pData(x)).

probes2genes

If set to TRUE a single probe is selected for each gene. nsFilter is used to select the probe with highest inter-quartile range.

filterVar

If specified, only genes with significant differences in the variable filterVar will be displayed in the heatmap. Note that this option will not affec the sample clustering, as this is obtained using both significant and non-significant genes.

filteralpha

Significance level for the filtering based on filterVar.

distCol

Distance metric used to cluster columns (e.g. patients/samples). Can take any value accepted by dist. Pearson and Spearman correlations are also allowed. Write 'spearman' or 'pearson' to use them.

nClust

Number of desired clusters.

distRow

Distance metric used to cluster rows (e.g. genes). Can take any value accepted by distancematrix.

p.adjust.method

Method for P-value adjustment, passed on to p.adjust.

simulate.p.value

If set to FALSE the chi-square test p-values are computed using asymptotics, otherwise a simulation is used (see chisq.test for details).

B

An integer specifying the number of replicates used in the chi-square Monte Carlo test (passed on to chisq.test).

linkage

Linkage used for clustering. Must be either 'complete', 'average' or 'minimum'.

equalize

Should color codes be equalized between genes, i.e. all genes present the same range of colors. Passed on to heatmap_plus.

center

centering is done by subtracting the column means (omitting NAs).

col

Color scheme to be used for heatmap. Defaults to a green/red scheme designed to look nice for microarray data.

survCol

Colors for the Kaplan-Meier survival curves.

heat.kaplan

can be "heat" if we want to plot a heatmap, "kaplan" if we want to plot a kaplan-meier or "both" if we want both of them.

...

Other arguments for the survival plot, e.g. lty etc.

Details

Makes two clusters of samples based on the expression levels of the genes from the given signature and plots a heatmap and/or a Kaplan-Meier showing the association between belonging to one cluster or the other and each phenotype.

For variables in vars2test\$continuous and vars2test\$ordinal a Kruskal-Wallis Rank Sum test is used; for vars2test\$categorical a chi-square test (with exact p-value if simulate.p.value is set to TRUE); for var2test\$survival a Cox proportional hazards likelihood-ratio test.

Author(s)

David Rossell

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#load data
data(eset)  
eset

#construct vars2test
survival <- matrix(c("Relapse","Months2Relapse"),ncol=2,byrow=TRUE)
colnames(survival) <- c('event','time')
vars2test <- list(survival=survival)
vars2test

#construct a signature
sign <- sample(featureNames(eset))[1:20]

#make plot
heatmapPhenoTest(eset,sign,vars2test=vars2test,heat.kaplan='heat')
heatmapPhenoTest(eset,sign,vars2test=vars2test,heat.kaplan='kaplan')

phenoTest documentation built on Nov. 17, 2017, 1:49 p.m.