ANI.dendrogram: Construct a dendrogram using pairwise ANI values and identity...

View source: R/anitools.R

ANI.dendrogramR Documentation

Construct a dendrogram using pairwise ANI values and identity medoid genomes

Description

This function constructs a dendrogram using pairwise ANI values calculated between genomes and the dissimilarity metric described by Carroll, Wiedmann, and Kovac (2019), yielding medoid genomes and cluster assignments at an ANI coalescence threshold (if supplied by the user).

Usage

ANI.dendrogram(
  bactaxRObject,
  ANI_threshold = 95,
  hclust.method = "average",
  label_size = 1e-10,
  color_palette = magma(1000, begin = 0.2),
  xline = NULL,
  xlinecol = "#20A387FF",
  xlinetype = "dashed"
)

Arguments

bactaxRObject

A bactaxRObject

ANI_threshold

ANI threshold at which to assign genomes to clusters and identify medoid genomes. Defaults to 95.

hclust.method

Agglomeration method to pass to hclust. Defaults to "average".

label_size

Size of dendrogram tip labels. Defaults to an arbitrarily small number (i.e., 1e-10), so that tip labels are hidden.

color_palette

Color palette to use for dendrogram. Defaults to magma(1000, begin = 0.2).

xline

Numeric value (or vector of numeric values) at which to draw vertical line(s) along the dendrogram X-axis (i.e., ANI values). Defaults to NULL (no vertical lines).

xlinecol

Character (or vector of characters) corresponding to ggplot2 color(s) for xline. Defaults to "#20A387FF".

xlinetype

Character (or vector of characters) corresponding to ggplot2 line type(s) for xline. Defaults to "dashed".

Value

medoid_genomes A data frame of medoid genomes detected at an ANI threshold (ANI_threshold). If an ANI threshold of NULL supplied, this will be NULL.

cluster_assignments A data frame containing all genomes and the genomospecies clusters to which they are assigned at an ANI threshold (ANI_threshold). If an ANI threshold of NULL is supplied, this will be NULL.


lmc297/bactaxR documentation built on Feb. 6, 2024, 7:41 p.m.