R: Plot the bi-graph determined by the branches in the tree and...
drawTreeGraph
R Documentation
Plot the bi-graph determined by the branches in the tree and the
flat clusters
Description
drawTreeGraph plots both a hierarchical tree, either complete or
pruned, and a flat clustering, connected with edges whose thickness is
proportional to the number of elements shared by branches and clusters, to
form a weighted bi-graph. Its usage is mainly internal, as part of the
visualisation of the hierarchical.look.ahead function. The size of
each cluster is also displayed.
a contingency matrix containing the intersection sizes
(edge weights) between branches in the tree and clusters from the flat
partitioning.
current.order
a list of two components; the first one is a vector
with the branches (rows of the matrix weight) in the ordering in
which they are drawn; the second one provides the ordering for flat
clusters (columns of weight). Both are drawn from bottom upwards.
coordinates
a list of two components; the first one is a vector
providing the Y-coordinates, from bottom upwards, for the branches, whereas
the second one provides the Y-coordinates, from bottom upwards, for the
flat clusters.
tree
a list with two components: $heights, a vector
describing the heights at which the different branches in the tree are
agglomerated, and $branches, a matrix of 3 columns; the i-th row
contains as first element the branch split at the i-th allowed splitting,
and as second and third elements, the corresponding children.
dot
a Boolean parameter; if TRUE then the last split in the
children-tree is shown with a red open circle.
line.wd
a number indicating the width of the thickest edge(s) in
the bigraph.
main
a character string for the plot title.
expanded
a Boolean parameter indicating whether the hierarchical
tree should be plotted complete or with its branches collapsed.
hclust.obj
an hclust object describing the how the leaves are
merged and the ordering of the branches, which might have been changed by
the gravity-centre algorithm.
labels
a vector indicating the labels for the leaves in the
expanded tree.
cex.labels
a number indicating the magnification used for the
labels of the leaves.
Details
The drawTreeGraph allows visualising the comparison of a
hierarchical clustering, drawn on the left hand side of the plot, and a
flat clustering, represented on the right hand side.
The tree branches are labelled by their original labels preceded by 'B'; if
the function is called as part of the flatVShier algorithm, then the
standard notation for initial branch labels is that of hclust
objects: if the label is a negative integer it corresponds to a leaf; if it
is a positive integer, then it corresponds to a branch that agglomerates at
least two elements, and the number represent the stage at which the branch
was formed.
The last splitting can be optionally highlighted with a red open circle
upon the parent-node.
The flat clusters are labelled by their original labels preceded by 'F'.
Value
a list of components including:
b.coord
a vector indicating the Y coordinates of the nodes in
the bi-graph representing the branches of the hierarchical tree.
f.coord
a vector indicating the Y coordinates of the nodes in
the bi-graph representing the flat clusters.
x.coords
a vector of two components indicating the X coordinates
at which each layer of the bi-graph is represented.
Torrente, A. et al. (2005). A new algorithm for comparing and
visualizing relationships between hierarchical and flat gene expression
data clusterings. Bioinformatics, 21 (21), 3993-3999.