Dated phylogenies of DNA barcode reference libraries, for phylogenetic diversity of metabarcoding samples.
timegraft builds a time-calibrated tree with barcode reference units at the tips (BINs for COI, UNITE species hypotheses for ITS), places metabarcoding sequences on it, and computes phylogenetic diversity per sample. Deep relationships and ages come from Open Tree of Life and TimeTree; barcodes are used only within genera, where they carry reliable signal. Branch lengths are in millions of years, so diversity is comparable across sites, studies and markers.
Documentation · Quick start · How it works · Roadmap · Issues
- Reads BOLD data packages (TSV or Parquet) or plain record tables
- Builds a dated genus-level backbone from Open Tree of Life release files and TimeTree, with the Catalogue of Life as identifier hub
- Checks the backbone before dating: genera that the Open Tree of Life misplaces are found and moved, and conflicting TimeTree ages are fitted together by their evidence
- One dated subtree per genus, in parallel, then grafted onto the backbone without any global tree search
- Marker plug-ins for filtering, distances, crown ages and dating; COI and ITS settings included
- Screens reference units that do not fit their genus, with a reason for every decision
- Matches metabarcoding ASVs to reference units and places unmatched ones on the tree
- Faith's PD, MPD, UniFrac and PhyloSor per sample and per pair of samples
- Validation of barcode distances against a reference tree, per taxonomic stratum
- Every age and placement traceable to its source in output tables
git clone https://github.com/naturalis/timegraft.git
cd timegraft
conda env create -f environment.yml # once; afterwards: conda env update -n timegraft -f environment.yml --prune
conda activate timegraft
snakemake --cores 4 # runs the toy example in config/config.yaml(Or, without conda, pip install -e ".[dev]" and snakemake --cores 4 --use-conda do the same (installation).)
The dated tree is written to results/toy/timegraft.tre. To run on your own data, see running timegraft.
- Technical - Installation · Configuration · Running and outputs · Development · Roadmap
- Scientific - Background · Prior art · How it works · Assumptions and limitations · First results · Benchmark
- Manuscript - Draft preprint
A preprint is in preparation (draft). Until then, please cite this repository.
Code: Apache-2.0. Trees and tables produced by timegraft: CC0 1.0.
Developed at the Naturalis Biodiversity Center. The design includes lessons learned from bactria, evospaice, and MDDB-phylogeny.