add_phylogroups: Add phylogroups to a tidygenomes object

add_phylogroupsR Documentation

Add phylogroups to a tidygenomes object

Description

Phylogroups are defined as clades in a phylogenetic tree. This function will add user-defined phylogroups to a tidygenomes object containing a tree.

Usage

add_phylogroups(tg, phylogroups, genome_identifier = genome)

Arguments

tg

A tidygenomes object

phylogroups

A table specifying phylogroups

genome_identifier

The name of a variable from the genomes table that is used to identify genomes in the phylogroups table

Details

The phylogroup table should consist of one row per phylogroup and should contain the following variables:

  • phylogroup: the name of the phylogroup

  • genome_type: the type genome of the phylogroup

  • genome_peripheral: a peripheral genome of the phylogroup (optional)

If peripheral genomes are supplied, a phylogroup is defined as all descendants of the most recent common ancestor of the type and peripheral genomes. If peripheral genomes are not supplied, a phylogroup is defined as all descendants of the oldest ancestor of the type genome that is not also an ancestor of any other type genomes.

The following will be added to the tidygenomes object:

  • A variable phylogroup in the nodes table.

  • A variable is_phylogroup_ancestor in the nodes table.

  • A variable is_phylogroup_type in the genomes table.

Value

A tidygenomes object


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