gtdb_tree
A library for parsing Newick format files, especially GTDB tree files.
Features
- Parse Newick formatted strings into a structured representation of trees.
- Handle various formats of Newick strings, including those with bootstrap values and distances.
Installation
Add this crate to your Cargo.toml:
[]
= "0.1.9"
Usage
Here's a simple example of how to use the library:
use parse_tree;
Python Usage
A Python package for parsing GTDB trees using Rust.
Installation
pip install gtdb_tree
=
Advanced Usage
Custom Node Parser
You can provide a custom parser function to handle special node formats:
# Custom parsing logic
, =
return , 100.0, # name, bootstrap, length
=
Working with Node Objects
Each Node object in the result has the following attributes:
- id: Unique identifier for the node
- name: Name of the node
- bootstrap: Bootstrap value (if available)
- length: Branch length
- parent: ID of the parent node