dendro_plot {TOmicsVis} | R Documentation |
Dendrograms for multiple samples/groups clustering.
Description
Dendrograms for multiple samples/groups clustering.
Usage
dendro_plot(
data,
dist_method = "euclidean",
hc_method = "ward.D2",
tree_type = "rectangle",
k_num = 5,
palette = "npg",
color_labels_by_k = TRUE,
horiz = FALSE,
label_size = 1,
line_width = 1,
rect = TRUE,
rect_fill = TRUE,
xlab = "Samples",
ylab = "Height",
ggTheme = "theme_light"
)
Arguments
data |
Dataframe: All genes in all samples expression dataframe of RNA-Seq (1st-col: Genes, 2nd-col~: Samples). |
dist_method |
Character: distance measure method. Default: "euclidean", options: "euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowski". |
hc_method |
Character: hierarchical clustering method. Default: "ward.D2", options: "ward.D", "ward.D2", "single", "complete","average" (= UPGMA), "mcquitty" (= WPGMA), "median" (= WPGMC) or "centroid" (= UPGMC). |
tree_type |
Character: plot tree type. Default: "rectangle", options: "rectangle", "circular", "phylogenic". |
k_num |
Numeric: the number of groups for cutting the tree. Default: 3. |
palette |
Character: color palette used for the group. Default: "npg", options: "npg", "aaas", "lancet", "jco", "ucscgb", "uchicago", "simpsons" and "rickandmorty". |
color_labels_by_k |
Logical: labels colored by group. Default: TRUE, options: TRUE or FALSE. |
horiz |
Logical: horizontal dendrogram. Default: FALSE, options: TRUE or FALSE. |
label_size |
Numeric: tree label size. Default: 0.8, min: 0. |
line_width |
Numeric: branches and rectangle line width. Default: 0.7, min: 0. |
rect |
Logical: add a rectangle around groups. Default: TRUE, options: TRUE or FALSE. |
rect_fill |
Logical: fill the rectangle. Default: TRUE, options: TRUE or FALSE. |
xlab |
Character: title of the xlab. Default: "". |
ylab |
Character: title of the ylab. Default: "Height". |
ggTheme |
Character: ggplot2 theme. Default: "theme_light", options: "theme_default", "theme_bw", "theme_gray", "theme_light", "theme_linedraw", "theme_dark", "theme_minimal", "theme_classic", "theme_void". |
Value
Plot: dendrogram for multiple samples clustering.
Author(s)
wei dong
Examples
# 1. Library TOmicsVis package
library(TOmicsVis)
# 2. Use example dataset gene_expression
data(gene_expression)
head(gene_expression)
# 3. Default parameters
dendro_plot(gene_expression)
# 4. Set palette = "aaas"
dendro_plot(gene_expression, palette = "aaas")
# 5. Set tree_type = "circular"
dendro_plot(gene_expression, tree_type = "circular")