Automatic Phylogenetic Tree Generator

Christophe Benjamin

May 6th 2020

Use of aptg

The aptg package is used to generate phylogenetic trees from a vector of species names or a tree of a taxon down to whatever taxon that is included in the first one. The phylogenetic tree are generated from brranching::phylomatic based on the program of the same name accessible there :

When the tree is generated from a vector of species names, distance matrices are given.


The function needs a vector or list of strings of species name as an input and will give phylogenetic trees and distance matrices as an output. Let's do an example with a mixed list of mammal and angiosperm species.

taxa.tree(species = c("Canis lupus", "Canis latrans", "Acer saccharum", "Castor canadensis", "Alces alces", "Acer rubrum", "Vulpes vulpes", "Salix babylonica", "Odocoileus virginianus", "Betula alleghaniensis", "Rangifer tarandus","Juniperus occidentalis"))

As you can see the taxa have been sorted by reference trees; mammals and angiosperms. The distance matrices are also an output (not shown here).


This function creates a phylogenetic tree from a taxon down to another one. For now, only the input species gives a result, but any higher taxon can be choosed.

downto.tree("Cervidae", "species")