Last data update: 2014.03.03

R: Creates heatmap array CGH objects
heatmapR Documentation

Creates heatmap array CGH objects

Description

Clusters samples and produces heatmapp of the observed log2ratios.

Usage

heatmap(x, imp = TRUE, Rowv = NA, Colv = NULL, distfun = dist,
        hclustfun = hclust, add.expr, symm = FALSE,
        revC = identical(Colv, "Rowv"), scale = "none",
        na.rm = TRUE, margins = c(5, 5), ColSideColors,
        RowSideColors, cexRow = 0.2 + 1 / log10(nr),
        cexCol = 0.2 + 1 / log10(nc), labRow = NULL,
        labCol = NULL, main = NULL, xlab = NULL, ylab = NULL,
        verbose = getOption("verbose"), methodR = "ward",
        methodC = "ward", zlm = c(-0.5, 0.5), ...)

Arguments

x

object of the aCGH object

imp

logical variable indicating whether log2.ratios.imputed or log2.ratios slot of aCGH should be used. Defaults to imputed value (TRUE).

Rowv

determines if and how the row dendrogram should be computed and reordered. Either a 'dendrogram' or a vector of values used to reorder the row dendrogram or 'NA' to suppress any row dendrogram (and reordering) or by default, 'NULL'

Colv

determines if and how the column dendrogram should be reordered. Has the same options as the Rowv argument above and additionally when x is a square matrix, Colv = "Rowv" means that columns should be treated identically to the rows.

distfun

function used to compute the distance (dissimilarity) between both rows and columns. Defaults to 'dist'.

hclustfun

function used to compute the hierarchical clustering when 'Rowv' or 'Colv' are not dendrograms. Defaults to 'hclust'

add.expr

expression that will be evaluated after the call to 'image'. Can be used to add components to the plot.

symm

logical indicating if 'x' should be treated *symm*etrically; can only be true when 'x' is a square matrix.

revC

logical indicating if the column order should be 'rev'ersed for plotting, such that e.g., for the symmetric case, the symmetry axis is as usual.

scale

character indicating if the values should be centered and scaled in either the row direction or the column direction, or none. The default is "row" if symm false, and "none" otherwise.

na.rm

logical indicating whether 'NA”s should be removed.

margins

numeric vector of length 2 containing the margins (see 'par(mar= *)') for column and row names, respectively.

ColSideColors

(optional) character vector of length 'ncol(x)' containing the color names for a horizontal side bar that may be used to annotate the columns of 'x'.

RowSideColors

(optional) character vector of length 'nrow(x)' containing the color names for a vertical side bar that may be used to annotate the rows of 'x'.

cexRow, cexCol

positive numbers, used as 'cex.axis' in for the row or column axis labeling. The defaults currently only use number of rows or columns, respectively.

labRow, labCol

character vectors with row and column labels to use; these default to 'rownames(x)' or 'colnames(x)', respectively.

main, xlab, ylab

main, x- and y-axis titles;

verbose

logical indicating if information should be printed.

methodR

method to use for clustering rows. defaults to "ward"

methodC

method to use for clustering columns. defaults to "ward"

zlm

all the values greater or equal than zlm are set to zlm - 0.01. a;; value less or equal to -zlm are set to -zlm + 0.01

...

additional arguments passed on to 'image', e.g., 'col' specifying the colors.

Details

This function is almost identical to the heatmap in base R. The slight modifications are that (1) a user can specify clustering method for rows and columns; (2) all the values outside specified limits are floored to be 0.01 less than a limit; (3) default values are different. Note that using default option of imp (TRUE) produces nicer looking plots as all missing values are removed.

Value

Invisibly, a list with components

crowInd

row index permutation vector as returned by order.dendrogram

colInd

row index permutation vector as returned by order.dendrogram

References

heatmap function in base R

See Also

aCGH clusterGenome

Examples


#default plotting method for the aCGH object
data(colorectal)
plot(colorectal)

#to produce smoother looking heatmap, use imp = T: this will use imputed
#slot of aCGH object

plot(colorectal, imp = TRUE)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(aCGH)
Loading required package: cluster
Loading required package: survival
Loading required package: multtest
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.


Attaching package: 'aCGH'

The following object is masked from 'package:stats':

    heatmap

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/aCGH/heatmap.Rd_%03d_medium.png", width=480, height=480)
> ### Name: heatmap
> ### Title: Creates heatmap array CGH objects
> ### Aliases: heatmap
> ### Keywords: hplot cluster
> 
> ### ** Examples
> 
> 
> #default plotting method for the aCGH object
> data(colorectal)
> plot(colorectal)
> 
> #to produce smoother looking heatmap, use imp = T: this will use imputed
> #slot of aCGH object
> 
> plot(colorectal, imp = TRUE)
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>