add_phylogroup_color: Add color variable for phylogroups

View source: R/enhancers.R

add_phylogroup_colorR Documentation

Add color variable for phylogroups

Description

This function adds a variable phylogroup_color to the phylogroup table that can be used to plot phylogroup colors in cases where there are too many phylogroups for the color scale you want to use.

Usage

add_phylogroup_color(tg, n = 12)

Arguments

tg

A tidygenomes object

n

The number of colors

Details

The variable phylogroup_color assigns a number to each phylogroup, in order of the ladderized tree. If there are more phylogroups than numbers, the numbers will be recycled. The goal is that two phylogroups that are directly next to each other in the tree labels will never have the same color.

Value

A tidygenomes object


SWittouck/tidyorthogroups documentation built on Feb. 2, 2023, 12:45 a.m.