plot_heatmapsOnSel: Plot heatmap associated with each component

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

Description

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.

Usage

1
2
3
4
5
6
7
  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, ...)

Arguments

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 'features' to represent the data at the feature levels (e.g expression profiles of probe sets), or 'genes' to represent the data at the annotated-features level (e.g gene expression profiles).

keepVar

The variable labels to be considered, i.e a subset of the column labels of the pheno data of icaSet available in (varLabels(icaSet))

keepComp

A subset of components, must be included in indComp(icaSet). By default, all components are used.

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 col of the function image).

file

A character to add to each pdf file name. This function creates one file by component named "index-of-component_file.pdf" .

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 icaSet (i.e all the annotation values available in pData(icaSet)). If missing the colours are generated automatically using the function annot2Color

...

Additional parameters for function heatmap.plus

Details

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.

Value

A list with one element per component, each of them being a list consisting of three elements:

x

the matrix represented by the heatmap

,

breaks

the breaks used for the colours of the heatmap

,

dendro

the dendrogram

.

Author(s)

Anne Biton

See Also

heatmap.plus, image, annot2Color, build_sortHeatmap

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
## 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)

MineICA documentation built on Nov. 8, 2020, 5:35 p.m.