pretty.dend {made4}R Documentation

Draw hierarchical tree of gene expression data with a colorbar for numerous class vectors

Description

Function which performs a hierarchical cluster analysis of data, drawing a dendrogram, with colorbars for different sample covariate beneath the dendrogram

Usage

pretty.dend(dataset, labels = NULL, title = "", classvec = NULL,covars=1,returnTree=FALSE, ...)

Arguments

dataset a matrix, data.frame, exprSet or marrayRaw. If the input is gene expression data in a matrix or data.frame. The rows and columns are expected to contain the variables (genes) and cases (array samples) respectively.
labels Vector, labels to be placed on samples in plots. Default is rownames(dataset)
title Character, label to be placed on plots. Default is NULL
classvec A factor or vector or matrix or data.frame which describes the classes in columns of the dataset. Default is NULL.
covars Numeric. The columns of the data.frame classve to be used as class vectors. These will be displayed as color bars under the dendrogram. The default is 1 (column 1)
returnTree Logical. Return the hieracrhical cluster analysis results. Default is FALSE
... further arguments passed to or from other methods

Details

The hierarchical plot is produced using average linkage cluster analysis with Eisen's correlation metric.

Value

Note

Author(s)

Aedin Culhane

References

See Also

See also as overview, hclust

Examples

  data(khan)
  logkhan<-log2(khan$train)
  pretty.dend(logkhan, classvec=khan$train.classes, labels=khan$train.classes)
 
 # Get a character vector which defines which khan samples are cell lines or tissue sample
  cellType = sapply((strsplit(colnames(khan$train), "\.")), function(x) substr(x[[2]],1,1))
  khanAnnot= cbind(khan$train.classes,cellType)
  print(khanAnnot[1:3,])

# Add 2 color bar, one for cancer subtype, another for cell type under dendrogram
  pretty.dend(logkhan, classvec=khanAnnot, covars = c(1,2), labels=khan$train.classes, title="Dendrogram with color bars on 2 co-variates")


[Package made4 version 1.12.1 Index]