ClusterPlot: Plot a dendrogram with leaves colored by a result of choice

Description Usage Arguments Details Value Author(s) Examples

View source: R/Clusterplot.R

Description

The above described function ClusterCols is used in the function Clusterplot which actually plots the dendrogram made by ClusterCols. Further, given the outputs of any other functions, it is capable of selecting the elements needed for ClusterCols.

Usage

1
2
ClusterPlot(Data1, Data2=NULL, nrclusters = NULL, cols = NULL,plottype="new",
location=NULL,ColorComps = NULL, ...)

Arguments

Data1

The resulting clustering of a method which contains the dendrogram to be colored.

Data2

Optional. The resulting clustering of another method , i.e. the resulting clustering on which the colors should be based.

nrclusters

Optional. The number of clusters to cut the dendrogram in. If not specified the dendrogram will be drawn without colors to discern the different clusters.

cols

The colors for the clusters if nrclusters is specified.

plottype

Should be one of "pdf","new" or "sweave". If "pdf", a location should be provided in "location" and the figure is saved there. If "new" a new graphic device is opened and if "sweave", the figure is made compatible to appear in a sweave or knitr document.

location

If plottype is "pdf", a location should be provided in "location" and the figure is saved there.

ColorComps

If only a specific set of compounds need to be highlighted, this can be specified here. The compounds should be given in a character vector. If specified, all other compound labels will be colored black.

...

Other options which can be given to the plot function.

Details

This function relies on the internal ClusterCols function.

Value

A plot of the dendrogram of the first clustering result with colored leaves. If a second clustering result is given in Data2, the colors are based on this clustering result.

Author(s)

Marijke Van Moerbeke

Examples

1
2
3
4
5
6
7
8
9
data(fingerprintMat)
data(targetMat)
data(Colors1)

MCF7_T = Cluster(targetMat,type="data",distmeasure="tanimoto",normalize=FALSE,
method=NULL,clust="agnes",linkage="ward",gap=FALSE,maxK=55,StopRange=FALSE)

ClusterPlot(MCF7_T ,nrclusters=7,cols=Colors1,plottype="new",location=NULL,
main="Clustering on Target Predictions: Dendrogram",ylim=c(-0.1,1.8))

IntClust documentation built on May 2, 2019, 5:23 p.m.