Description Usage Arguments Details Author(s) Examples
Show the associations between clusters that each sample belongs to and each phenotype in a heatmap and/or a KaplanMeier plot.
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", ...)

x 
ExpressionSet with phenotype information stored in 
signatures 
Either character vector or list of character vectors
with gene sets to be used to draw heatmaps (gene names should match
those in 
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 
probes2genes 
If set to 
filterVar 
If specified, only genes with significant differences
in the variable 
filteralpha 
Significance level for the filtering based on 
distCol 
Distance metric used to cluster columns
(e.g. patients/samples). Can take any value accepted by

nClust 
Number of desired clusters. 
distRow 
Distance metric used to cluster rows (e.g. genes). Can
take any value accepted by 
p.adjust.method 
Method for Pvalue adjustment, passed on to

simulate.p.value 
If set to FALSE the chisquare test pvalues are
computed using asymptotics, otherwise a simulation is used (see

B 
An integer specifying the number of replicates used in the
chisquare Monte Carlo test (passed on to 
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

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 KaplanMeier survival curves. 
heat.kaplan 
can be "heat" if we want to plot a heatmap, "kaplan" if we want to plot a kaplanmeier or "both" if we want both of them. 
... 
Other arguments for the survival plot, e.g. lty etc. 
Makes two clusters of samples based on the expression levels of the genes from the given signature and plots a heatmap and/or a KaplanMeier showing the association between belonging to one cluster or the other and each phenotype.
For variables in vars2test\$continuous and vars2test\$ordinal a KruskalWallis Rank Sum test is
used; for vars2test\$categorical a chisquare test (with exact pvalue
if simulate.p.value
is set to TRUE); for var2test\$survival a Cox proportional hazards likelihoodratio test.
David Rossell
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')

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.