plotDendrogram,ClusterExperiment-method | 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,
colData = NULL,
clusterLegend = NULL,
...
)
x |
a |
whichClusters |
argument that can be either numeric or character vector
indicating the clusterings to be used. See details of |
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 (calls |
colData |
index (by integer or name) the sample data stored as a
|
clusterLegend |
Assignment of colors to the clusters or sample data (as
designated by |
... |
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",DEMethod="limma",
cutoff=0.1,plot=FALSE)
plotDendrogram(cl)
plotDendrogram(cl,leafType="samples",whichClusters="all",plotType="colorblock")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.