Metadata-Version: 2.5
Name: damicore-tree-builder
Version: 0.2.0
Summary: Neighbor-Joining tree builder for the DAMICORE pipeline.
Project-URL: Homepage, https://github.com/Delbem-Research-and-Innovation/damicore
Project-URL: Repository, https://github.com/Delbem-Research-and-Innovation/damicore
Project-URL: Issues, https://github.com/Delbem-Research-and-Innovation/damicore/issues
Project-URL: Documentation, https://github.com/Delbem-Research-and-Innovation/damicore/blob/main/docs/quickstart.md
Project-URL: Changelog, https://github.com/Delbem-Research-and-Innovation/damicore/blob/main/CHANGELOG.md
Author-email: Ennio Politi Lopes <enniolopes@users.noreply.github.com>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: damicore,neighbor-joining,newick,phylogenetics,tree
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Typing :: Typed
Requires-Python: <3.15,>=3.11
Requires-Dist: numpy<3,>=1.26
Requires-Dist: pydantic<3,>=2.10
Description-Content-Type: text/markdown

# damicore-tree-builder

damicore-tree-builder builds a deterministic Neighbor Joining tree from a
distance matrix and its labels. It is the third stage of the DAMICORE pipeline;
most users install the aggregate `damicore` distribution, which runs all four
stages end to end. Install this package alone to build trees without the rest of
the pipeline.

```bash
pip install damicore-tree-builder
```

## Python

```python
from damicore_tree_builder import build_tree

result = build_tree("run/distance.npy", "run/labels.json", "run")
```

`distance.npy` and `labels.json` are produced by the sibling `damicore-distance`
distribution; the call writes `tree.json` plus Newick, and `tree.json` is the
input the sibling `damicore-clusterizer` distribution consumes. The path API
copies into a temporary memory map, reuses slots, evaluates Q pairwise without
materializing it, and preserves negative branches. `neighbor_joining(matrix,
labels)` is available for small in-memory matrices.

## Links

- Repository: <https://github.com/Delbem-Research-and-Innovation/damicore>
- Issues: <https://github.com/Delbem-Research-and-Innovation/damicore/issues>
- Documentation:
  <https://github.com/Delbem-Research-and-Innovation/damicore/blob/main/docs/quickstart.md>

Licensed under Apache-2.0.
