pretty.dend {made4} | R Documentation |
Function which performs a hierarchical cluster analysis of data, drawing a dendrogram, with colorbars for different sample covariate beneath the dendrogram
pretty.dend(dataset, labels = NULL, title = "", classvec = NULL,covars=1,returnTree=FALSE, ...)
dataset |
a matrix , data.frame ,
ExpressionSet 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. |
The hierarchical plot is produced using average linkage cluster analysis with 1- Pearson's correlation metric.
Aedin Culhane
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 = cellType=sapply((strsplit(colnames(khan$train), "\.")), function(x) substr(x[[2]],1,1)) khanAnnot= cbind(as.character(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)