nexwick

Crates.ionexwick
lib.rsnexwick
version0.1.0
created_at2026-01-25 19:49:59.647583+00
updated_at2026-01-25 19:49:59.647583+00
descriptionParser for Nexus files and Newick strings
homepagehttps://github.com/joklawitter/nexwick/
repositoryhttps://github.com/joklawitter/nexwick/
max_upload_size
id2069408
size274,190
Jonathan Klawitter (joklawitter)

documentation

README

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.

Commit count: 21

cargo fmt