plotDendrogram,ClusterExperiment-method {clusterExperiment} | R Documentation |
Plots the dendrogram saved in a ClusterExperiment object
## S4 method for signature 'ClusterExperiment' plotDendrogram(x, whichClusters = "dendro", leafType = c("samples", "clusters"), plotType = c("colorblock", "name", "ids"), mergeInfo = "none", main, sub, clusterLabelAngle = 45, removeOutbranch = TRUE, legend = c("side", "below", "none"), nodeColors = NULL, ...)
x |
a |
whichClusters |
only used if |
leafType |
if "samples" the dendrogram has one leaf per sample, otherwise it has one per cluster. |
plotType |
one of 'name', 'colorblock' or 'id'. If 'Name' then dendrogram
will be plotted, and name of cluster or sample (depending on type of value
for |
mergeInfo |
What kind of information about merge to plot on dendrogram.
If not equal to "none", will replicate the kind of plot that
|
main |
passed to the |
sub |
passed to the |
clusterLabelAngle |
angle at which label of cluster will be drawn. Only
applicable if |
removeOutbranch |
logical, only applicable if there are missing samples
(i.e. equal to -1 or -2), |
legend |
character, only applicable if |
nodeColors |
named vector of colors to be plotted on a node in the
dendrogram. Names should match the name of the node (calls
|
... |
arguments passed to the |
If leafType="clusters"
, the plotting function will work best
if the clusters in the dendrogram correspond to the primary cluster. This
is because the function colors the cluster labels based on the colors of
the clusterIds of the primaryCluster
A dendrogram is plotted. Returns (invisibly) a list with elements
plottedObject
the phylo
object that is plotted.
originalObject
the phylo
object before adjusting the
node/tip labels.
mergeClusters
,plot.phylo
,
nodelabels
,tiplabels
data(simData) #create a clustering, for 8 clusters (truth was 3) cl <-clusterSingle(simData, subsample=FALSE, sequential=FALSE, mainClusterArgs=list(clusterFunction="pam", clusterArgs=list(k=8))) #create dendrogram of clusters and then # merge clusters based ondendrogram: cl <- makeDendrogram(cl) cl <- mergeClusters(cl,mergeMethod="adjP",cutoff=0.1,plot=FALSE) plotDendrogram(cl) plotDendrogram(cl,leafType="samples",whichClusters="all",plotType="colorblock")