Description Usage Arguments Details Value Author(s) See Also Examples
Given either an AffyBatch
draw a heatmap.
1 |
x |
The |
probesets |
What probesets to plot, defaults to all of them |
samples |
Which samples to plot |
scluster |
The function to use to cluster the samples by. Can also be a dendrogram object. |
pcluster |
The function to use to cluster the probesets by. Can also be a dendrogram object. |
slabs |
Labels for the sample axis |
plabs |
Labels for the probeset axis defaults to geneNames(x) |
col |
Vector of colour values to use (see below) |
min.val |
The minimum intensity to plot |
max.val |
The maximum intensity to plot |
scale |
Scale each gene's clouring based on standard deviation (See below) |
spread |
If the data is scaled, how many standard deviations (or fold changes) either way should we show. If no scaling, then does nothing |
by.fc |
If the data is scaled, scale by s.d. or by fold.change? |
sdev |
A vector of standard deviaitions for each gene to be plotted. If no value is supplied these are worked out from the data. |
show.legend |
Draw a scale on the graph and show the title if supplied |
title |
The title of the graph |
cex |
Character expansion |
Takes an AffyBatch
object and plots a heatmap. At its simplest, all that is required is an AffyBatch object (as calculated by call.exprs
) and a vector supplying the probesets to plot. These can be specified by name, as an integer index or as a vector of TRUEs and FALSES. The function will try to do something sensible with the labels. If it fails you will need to specify this with plabs. The function will then draw a heatmap, coloured blue-white-red in increasing intensity, scaled so that 100
Col can be used to change the colouring. "bwr" specifies blue-white-red, "rbg" specifies red-black-green, and "ryw" specifies red-yellow-white. Alternatively, a vector of arbitrary colours can be supplied (try rainbow(21)
, for example).
The clustering method can also be changed by supplying, either, a function that takes a matrix of expression values and returns an hclust
or dendrogram
object, or alternatively, an hclust
or dendrogram
object itself. Setting either of these to NULL will stop the heatmap being clustered on that axis.
Scaling is somewhat more complex. If scale is TRUE, then each gene is coloured independently, on a scale based on its standard deviation. By default this is calculated for the samples that are being plotted, unless a value is supplied for sdev – in which case this should be a vector of standard deviations, one for each probeset being plotted (and in the same order). This scaling is done after the clustering. For more details on how all of this works see the website http://bioinf.picr.man.ac.uk/simpleaffy and also look at hmap.pc
which uses the scaling to plot transcripts identified as being differentially expressed.
Returns an (invisible) list containing the dendrograms used for samples and probesets
Crispin J Miller
hmap.pc
blue.white.red.cols
standard.pearson
1 2 3 4 5 | ## Not run:
eset.mas <- call.exprs(eset,"mas5")
hmap.eset(eset.mas,1:100,1:6,col="rbg")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.