Package 'ggtreeDendro'

Title: Drawing 'dendrogram' using 'ggtree'
Description: Offers a set of 'autoplot' methods to visualize tree-like structures (e.g., hierarchical clustering and classification/regression trees) using 'ggtree'. You can adjust graphical parameters using grammar of graphic syntax and integrate external data to the tree.
Authors: Guangchuang Yu [aut, cre, cph] , Shuangbin Xu [ctb] , Chuanjie Zhang [ctb]
Maintainer: Guangchuang Yu <[email protected]>
License: Artistic-2.0
Version: 1.7.0
Built: 2024-07-22 05:33:40 UTC
Source: https://github.com/bioc/ggtreeDendro

Help Index


geom_line_cutree

Description

geom_line_cutree

Usage

geom_line_cutree(group, linetype = "dashed", offset = 0, ...)

Arguments

group

output of cutree or number of subtree

linetype

linetype

offset

offset of the line

...

additional parameters to set the line (e.g., color, size, etc.)

Value

line layer

Examples

d <- dist(USArrests)
hc <- hclust(d, "ave")
autoplot(hc) + geom_line_cutree(4)

geom_rect_subtree

Description

geom_rect_subtree

Usage

geom_rect_subtree(group = NULL, color = "red", ...)

Arguments

group

output of cutree or number of subtree

color

border color to highlight subtrees

...

additional parameters pass to 'ggtree::hilight()'

Value

rect layer

See Also

geom_hilight;

Examples

d <- dist(USArrests)
hc <- hclust(d, "ave")
autoplot(hc) + geom_rect_subtree(4)

providing autoplot methods for many hierarchical clustering results based on ggtree.

Description

This package implements a set of 'autoplot()' methods to display tree structure. The output of it is a 'ggtree' object, which can be annotated by adding layers using 'ggplot2' syntax. Users also can integrate associated data to annotate the tree using 'ggtree' and 'ggtreeExtra' packages.


scale_color_subtree

Description

scale tree color by subtree (e.g., output of cutree, kmeans, or other clustering algorithm)

Usage

scale_color_subtree(group)

scale_colour_subtree(group)

Arguments

group

taxa group information

Value

updated tree view

Author(s)

Guangchuang Yu

Examples

d <- dist(USArrests)
hc <- hclust(d, "ave")
autoplot(hc) + scale_color_subtree(3)