This crate aims to be a general purpose crate to deal with phylogenetic trees and simulate them.
To install this tool you must build it from source with Cargo:
shell
git clone https://github.com/lucblassel/phylotree.git
cd phylotree
cargo build --release
mv target/release/phylotree <somewhere/in/your/PATH>
There is a simple CLI that comes with this package:
``` A simple command line tool to generate a random phylogenetic tree
Usage: phylotree
Commands: generate Generate random tree(s) stats Get statistics about a tree help Print this message or the help of the given subcommand(s)
Options: -h, --help Print help ```
``` Generate random tree(s)
Usage: phylotree generate [OPTIONS] --output
Options:
-t, --tips
``` Get statistics about a tree
Usage: phylotree stats [TREES]...
Arguments: [TREES]... Input newick file of the tree
Options: -h, --help Print help ```
``` Compare two trees
Usage: phylotree compare
Arguments:
Options: -h, --help Print help ```
Rough API ref goes here
Various goals and aims for this project: - [ ] Tree object - [x] Create base tree and node objects - [x] Enforce tip name uniqueness for distance calculations - [x] Rescale tree branch lengths - [x] Traversals: - [x] Pre-order - [x] Post-order - [x] Level-order - [x] In-order (for binary trees only) - [ ] Distances: - [x] LCA - [x] Distance between nodes - [x] RF distance between trees - [x] Weighted RF - [x] Branch score index - [ ] Transfer distance - [ ] Other distances ? - [x] Metrics: - [x] Height of the tree - [x] Diameter of the tree - [x] Sackin index of the tree (with normalized variants) - [x] Colless index of the tree - [x] Number of cherries - [x] Convert to distance matrix - [x] Write to phylip - [x] Read form phylip - [ ] Build from Distance matrix - [ ] UPGMA - [ ] NJ - [ ] BIONJ ? - [ ] Tree simulation - [x] Random binary topology - [x] Caterpillar trees - [x] Add different branch length distributions - [ ] Add birth death simulation - [ ] Add coalescent simulation - [ ] Simulate ultrametric trees - [x] I/O stuff: - [x] Write tree to newick - [x] Read tree from newick (Could be better though...)