Learn R Programming

pctax (version 0.1.7)

plot_gtdb_tr: Plot GTDB-Tk Phylogenetic Tree with Taxonomic Coloring

Description

This function creates a circular phylogenetic tree visualization from GTDB-Tk results, with tips colored by specified taxonomic level. It can optionally represent only one genome per species.

Usage

plot_gtdb_tr(
  gtdb_res,
  tree,
  tax_level = "Phylum",
  represented = TRUE,
  layout = "fan",
  branch_size = 0.2,
  color_na = "black"
)

Value

A ggplot object containing the phylogenetic tree visualization.

Arguments

gtdb_res

A data frame containing GTDB-Tk classification results, typically the output from pre_gtdb_tk function.

tree

A phylogenetic tree object (phylo class) containing all genomes.

tax_level

Character specifying the taxonomic level for coloring tips. Default is "Phylum". Other options include "Class", "Order", "Family", "Genus", "Species".

represented

Logical indicating whether to include only one representative genome per species. Default is TRUE.

layout

Character specifying the tree layout. Options include "fan", "circular", "rectangular", etc. Default is "fan".

branch_size

Numeric value for branch line width. Default is 0.2.

color_na

Character specifying color for tips with missing taxonomic information. Default is "black".