nexwick 0.1.0

Parser for Nexus files and Newick strings
Documentation
  • Coverage
  • 100%
    249 out of 249 items documented24 out of 182 items with examples
  • Size
  • Source code size: 274.19 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 15.83 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • joklawitter/nexwick
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • joklawitter

Nexwick

Rust library providing Nexus and Newick parsers to read in phylogenetic tree files and strings.

Installation

cargo add nexwick or add to your Cargo.toml:

[dependencies]

nexwick = "0.1"  

Quick Start

use nexwick::{parse_newick_str, parse_nexus_file};
// Parse a Newick string
let tree = parse_newick_str("((A:0.1,B:0.2):0.3,C:0.4);").unwrap();
assert_eq!(tree.num_leaves(), 3);
// Parse a Nexus file
let (trees, labels) = parse_nexus_file("phylo.trees").unwrap();

Documentation

See https://docs.rs/nexwick for full documentation, including:

  • Tree types ([CompactTree] vs [SimpleTree])
  • Parser configuration (burnin, lazy/eager mode)
  • Custom tree builders

License

Licensed under either of Apache License 2.0 or MIT license at your option.