plot_heatmapsOnSel | R Documentation |
This function plots the heatmaps representing the measured values of the contributing features/genes on each component. It also plots the sample annotations above each heatmap using colours.
plot_heatmapsOnSel(icaSet, selCutoff = 4,
level = c("features", "genes"), samplesOrder,
featuresOrder, selectionByComp, keepVar,
keepComp = indComp(icaSet), doSamplesDendro = TRUE,
doGenesDendro = TRUE,
heatmapCol = maPalette(low = "blue", high = "red", mid = "yellow", k = 44),
file = "", path = "", annot2col, ...)
icaSet |
The IcaSet object |
selCutoff |
A numeric threshold used to select the contributing genes based on their projection values. Must be either of length 1 and the same treshold is applied to all components, or of length equal to the number of components and one specific threshold is used for each component. |
samplesOrder |
A list providing the order of the samples, per component, to be used in the heatmaps. If missing, the contribution values of the samples are used to rank the columns of the heatmaps. |
featuresOrder |
A list providing the order of the genes, per component, to be used in the heatmaps. If missing, the projection values of the genes are used to rank the rows of the heatmaps. |
selectionByComp |
A list of gene projections per component already restricted to the contributing genes, if missing is computed by the function. |
level |
A character indicating which data level is
used to plot the heatmaps: either |
keepVar |
The variable labels to be considered, i.e
a subset of the column labels of the pheno data of icaSet
available in ( |
keepComp |
A subset of components, must be included
in |
doSamplesDendro |
A logical indicating whether a hierarchical clustering has to be performed on the data matrix restricted to the contributing features/genes, and whether the corresponding dendrogram has to be plotted, default is TRUE. |
doGenesDendro |
A logical indicating if the dendrogram of features/genes has to be plotted, default is FALSE. |
heatmapCol |
A list of colors used to for heatmap
coloring (see argument |
file |
A character to add to each pdf file name.
This function creates one file by component named
"index-of-component_ |
path |
A directory for the output pdf files, must end with "/". Default is current directory. |
annot2col |
A vector of colours indexed by the
levels of the variables of |
... |
Additional parameters for function
|
This function restricts the data matrix of an
IcaSet
object to the contributing
genes/features, and order features/genes and samples
either as asked by the user or according to their values
in the ICA decomposition.
The heatmap is plotted using a slightly modified version
of the function heatmap.plus
from the package of
the same name. By default in this function, the
hierarchical clustering is calculated using the function
agnes
with euclidean metric and
Ward's method.
A list with one element per component, each of them being a list consisting of three elements:
the matrix represented by the heatmap
,
the breaks used for the colours of the heatmap
,
the dendrogram
.
Anne Biton
heatmap.plus
, image
,
annot2Color
,
build_sortHeatmap
## Not run:
## load an example of IcaSet object
data(icaSetCarbayo)
## check which variables you would like to use in the heatmap
varLabels(icaSetCarbayo)
keepVar <- c("STAGE","SEX")
## Use only component 1
keepComp <- 1
## For each component, select contributing *genes* using a threshold of 2 on the absolute projection values,
## and plot heatmaps of these contributing genes by ordering genes and samples according to their contribution values
plot_heatmapsOnSel(icaSet = icaSetCarbayo, selCutoff = 2, level = "genes", keepVar = keepVar,
keepComp=1, doSamplesDendro = TRUE, doGenesDendro = TRUE,
heatmapCol = maPalette(low = "blue",high = "red", mid = "yellow", k=44),
file = "heatmapWithoutDendro_zval3.pdf")
## For each considered component, select contributing *features* using a threshold of 2 on the absolute projection values,
## and plot heatmaps of these contributing genes with dendrograms
plot_heatmapsOnSel(icaSet = icaSetCarbayo, selCutoff = 2, level = "features", keepVar = keepVar,
keepComp=1, doSamplesDendro = TRUE, doGenesDendro = TRUE,
heatmapCol = maPalette(low = "blue",high = "red", mid = "yellow", k=44),
file = "heatmapWithDendro_zval3.pdf")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.