TreeSwift: Fast tree module for Python 2 and 3
Project description
# TreeSwift [![Build Status](https://travis-ci.org/niemasd/TreeSwift.svg?branch=master)](https://travis-ci.org/niemasd/TreeSwift)
TreeSwift is a Python library for parsing, manipulating, and iterating over (rooted) tree structures. TreeSwift places an emphasis on speed.
## Installation
TreeSwift can be installed using `pip`:
```bash
sudo pip install treeswift
```
If you are using a machine on which you lack administrative powers, TreeSwift can be installed locally using `pip`:
```bash
pip install --user treeswift
```
## Usage
Typical usage should be as follows:
1. Import the `treeswift` package
2. Use `treeswift.read_tree_newick` to load your Newick tree
3. Use the various `Tree` class functions on the resulting object as you need
```python
import treeswift
tree = treeswift.read_tree_newick(my_newick_string)
for node in tree.traverse_postorder():
print(node)
```
Full documentation can be found at [https://niemasd.github.io/TreeSwift/](https://niemasd.github.io/TreeSwift/), and more examples can be found in the [TreeSwift Wiki](https://github.com/niemasd/TreeSwift/wiki).
TreeSwift is a Python library for parsing, manipulating, and iterating over (rooted) tree structures. TreeSwift places an emphasis on speed.
## Installation
TreeSwift can be installed using `pip`:
```bash
sudo pip install treeswift
```
If you are using a machine on which you lack administrative powers, TreeSwift can be installed locally using `pip`:
```bash
pip install --user treeswift
```
## Usage
Typical usage should be as follows:
1. Import the `treeswift` package
2. Use `treeswift.read_tree_newick` to load your Newick tree
3. Use the various `Tree` class functions on the resulting object as you need
```python
import treeswift
tree = treeswift.read_tree_newick(my_newick_string)
for node in tree.traverse_postorder():
print(node)
```
Full documentation can be found at [https://niemasd.github.io/TreeSwift/](https://niemasd.github.io/TreeSwift/), and more examples can be found in the [TreeSwift Wiki](https://github.com/niemasd/TreeSwift/wiki).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
treeswift-1.0.26.tar.gz
(21.6 kB
view hashes)
Built Distribution
Close
Hashes for treeswift-1.0.26-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6278998f87a8a46c0342cac9b3408472ab1f199c43732d66fb30cf7bfecaf203 |
|
MD5 | 6a8042095ff16ec6acd3f3af74ca984b |
|
BLAKE2b-256 | 36436f2e02ab3304b27bc04fd4981d34b5b6a52c90c5912f5dd648848571cca8 |