Skip to content

Latest commit

 

History

History
93 lines (60 loc) · 2.13 KB

File metadata and controls

93 lines (60 loc) · 2.13 KB

Lint Typecheck types - Mypy Ruff

Tree Maker

Tree Maker is a Python script that allows you to create and visualize phylogenetic trees in a simple and automated way.

Features

  • Produces phylogenetic trees in PDF format.
  • Customizable label colors and styles.
  • Supports Python 3.10 and higher.

Installation

Option 1: Clone the repository

git clone https://github.com/cfe-lab/make_tree.git
uv tool install .

Option 2: Install directly from the repository

uv tool install git+https://github.com/cfe-lab/make_tree

Usage

Note: tree_maker requires trees be generated from Clustal!

To use Tree Maker, run the following command:

make_tree input.newick output.pdf

Alternatively, import it into your own project:

from make_tree import load_tree, export_tree

t = load_tree("A,B,C;")
export_tree(t, "/tmp/tree.pdf", "My tree")

This will generate a PDF file containing the phylogenetic tree.

Contributing

Contributions to Tree Maker are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository.

Development

Use uv to manage the environment.

Install all dev dependencies:

uv sync --extra test --extra dev

Test:

uv run pytest

Lint:

uv run ruff check

Format:

uv run ruff format

Type-check:

uv run mypy make_tree tests

License

Tree Maker is licensed under the GNU General Public License v3.0. See the LICENSE file for more details.