plotTreeCategorical: Plot a phenotype tree generated by 'char2TreeCategorical'...

View source: R/plottingFuncs.R

plotTreeCategoricalR Documentation

Plot a phenotype tree generated by char2TreeCategorical with the branches colored by category

Description

Plot a phenotype tree generated by char2TreeCategorical with the branches colored by category

Usage

plotTreeCategorical(
  tree,
  category_names = NULL,
  master = NULL,
  node_states = NULL
)

Arguments

tree

The phenotype tree returned by char2TreeCategorical

category_names

The names of the categories in order of the corresponding numerical labels

master

If provided, the tree will be plotted using the branch lengths of that tree, coloring branches by the phenotype in the phenotype tree. The master tree and phenotype tree should have the same topology and the same species. If not provided, use.edge.length is set to FALSE.

node_states

A vector of the phenotype state at each node in the tree (in order of the nodes). If provided, vertical lines representing nodes in the tree are colored by state. It must be numerical and the integers must have the same mapping to the category names as in the phenotype tree.

Value

A plot of a phylogenetic tree with branches colored by phenotype category.


nclark-lab/RERconverge documentation built on March 2, 2024, 8:51 a.m.