Newick Tree Validator and Formatter
Simple utility to validate and format Newick trees.
The main use of this utility is to validate constraint trees used with IQtree2.
IQtree2 can throw hard to understand errors when using constraint trees even if the tree is technically a valid Newick tree.
This utility will catch many of those errors and provide a more detailed error message.
Installation
You can install the utility using pip:
pip install nwkfmt
Usage
Validation without formatting:
./main.py <tree.nwk>
In place formatting:
./main.py <tree.nwk> --inplace
Outputting formatted tree to a separate file:
./main.py <tree.nwk> --outfile <output.nwk>
Outputting list of terminal nodes into a text file:
./main.py <tree.nwk> --terminals <terminals.txt>
Formatting even if validation fails:
./main.py <tree.nwk> --inplace --no-validate
Release
This project uses Poetry for dependency management and packaging.
To build a release, run:
poetry build
To publish a release to PyPI, run:
poetry publish
To publish the release to Github, run:
gh release create 0.4.1 dist/*
Metadata
Release files for nwkfmt 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| nwkfmt-0.4.1.tar.gz | 3.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nwkfmt-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.4 kB
Release files / nwkfmt-0.4.1.tar.gz
| Download URL | nwkfmt-0.4.1.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
93d3ef8f0e74ddcdeadc62ec835b68481fced6da8dd2e1dc5807f74e6dd62f39
|
|
BLAKE2b-256 checksum How to use checksums |
9a2ada8b2e1f775cf8ccdf4c6523ec78b7296c849dc4df2193e43a032e0ae740
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.12.11 Darwin/24.5.0
|
Release files / nwkfmt-0.4.1-py3-none-any.whl
| Download URL | nwkfmt-0.4.1-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9e6f41f8f565aa0d91b386e32dbfe7a3b4eec99a36af96d297d78633fa59303d
|
|
BLAKE2b-256 checksum How to use checksums |
79261e344c5562377b4e76b11e12376c412da4c7b716e5c2b516fe39f8674100
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.12.11 Darwin/24.5.0
|
Security for nwkfmt 0.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.