Description Usage Arguments Details
Taxonomic method of phyndr that works with generalised sets of
taxonomic information. Requires a nested set of taxonomic classes
(e.g, genus, family, order, etc) but does not assume that these
classes are necessarily monophyletic. phyndr_genus
does
this for the genus level only but attempts to automatically detect
genera from the tree (assuming that tips are all genus/species
pairs, with genus and species separated by either an underscore or
space).
1 2 3 | phyndr_taxonomy(phy, data_species, taxonomy)
phyndr_genus(phy, data_species)
|
phy |
An ape phylogeny |
data_species |
A vector of species names for which we have trait data. Species names in both the tree and in this vector must be separated with underscores, not with spaces. |
taxonomy |
A data.frame with taxonomic information. Row
names must be present and must list every species in |
The algorithm (not including recursion and substitute whatever taxonomic level for genus).
1: drop genera if there is a species match for that genus, but don't drop the actual matches.
2: work out which genera can be collapsed to a single tip due to monophyly.
2a. For each genus, determine if they are monophyletic
2b. Then, for genera that are not monophyletic determine which can be made monophyletic by dropping groups that are not represented in the data set.
2c. Collapse each genus down, dropping only genera that are required to achieve monophyly.
3. For each collapsed node we'll mangle the name to "genus::name"
and then make a list of suitable species in the tree and data set;
for now stored as clades
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.