Phyloom is a flexible Python framework for designing and running stochastic phylogenetic tree and network simulators with minimal boilerplate. By handling core network/tree construction, the simulation loop, and data pipelines under the hood, Phyloom lets you focus directly on defining your biological models.
You can work with pre-built model families, extend existing ones with custom event rules and rate functions, or implement brand-new models from scratch, all fully configurable via YAML or the Python API. Out of the box, Phyloom supports:
- Birth-death-sampling-hybridization (BDSH) models for forward-in-time branching processes with unbounded population growth, lineage sampling, and reticulation;
- Coalescent models to trace population ancestry backward in time;
- Compartment-based epidemic models for simulating the spread of infectious diseases in structured populations (such as SIR, SEIR and SEIRS).
✨ Features
Phyloom comes packed with features, including:
-
Effortless tree and network simulation 🌳🕸️
Simulate complex phylogenetic trees, networks, and population dynamics forward or backward in time with simple configuration setups. -
Modular model design 🧩
Combine event rules and rate functions seamlessly, and easily extend pre-built models or craft entirely custom architectures from scratch. -
Arbitrary event rates ⏱️
Apply constant, skyline, exponential, or arbitrary time-dependent rate functions, enhanced by customizable, model-dependent multipliers. -
Flexible run controls 🎛️
Enjoy complete flexibility over your simulations: set custom stopping conditions, time horizons, and acceptance criteria to generate tailored, high-quality datasets. -
Parameter-driven dataset generation 🎲
Define prior distributions over parameters to draw unique configurations for every dataset sample, and write flexible, in-line mathematical expressions directly inside your config file. -
Automatic metadata management 🗂️
Track sampled parameters, execution details, and custom log values automatically alongside your generated datasets for easy post-processing and result verification. -
Multiprocessing support ⚙️💻
Run independent simulations across worker processes, with a configurable worker count. -
Plugin extensibility 🔌
Package and register custom models and components as plugins that Phyloom can discover when running YAML configurations.
📦 Installation
Phyloom requires Python 3.10+ to be installed on your system. There are several ways to install Python and managing different Python versions. One popular option is to use uv.
Once you have Python set up, you can install Phyloom directly from PyPI:
pip install phyloom
Or install from source:
git clone https://github.com/gabriele-marino/phyloom.git
cd phyloom
pip install .
🚀 Quick start
For a quick start, check out the bundled examples: every built-in model example comes as a YAML configuration and as an equivalent Python script, and the plugin projects show how to add your own custom models and make them available from YAML.
Pick your favorite config file and run Phyloom with:
phyloom path/to/config.yaml
This command creates the output dataset in your configured folder, setting up data directories and metadata files for every split automatically.
📖 Examples and documentation
The Phyloom documentation site provides a comprehensive reference detailing configuration options, models, and usage examples. It includes full Python API docs as well as step-by-step tutorials for building custom plugins and extending the framework.
📄 License
This project is licensed under MIT License.
📫 Contact
For questions, bug reports, or feature requests, consider opening an issue on GitHub, or contact me directly. Please, don’t hesitate to reach out, I’m always happy to assist!
Metadata
Release files for phyloom 0.1.0
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 | Actions |
|---|---|---|---|---|
| phyloom-0.1.0.tar.gz | 59.6 kB | Without provenance | Details for phyloom-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| phyloom-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for phyloom-0.1.0-py3-none-any.whl |
Total release size: 142.1 kB
Release files / phyloom-0.1.0.tar.gz
| Download URL | phyloom-0.1.0.tar.gz |
|---|---|
| Size | 59.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
444cfc93697dfe23201a02827f1fe33a552ee9cd4aa5d72d42273254b3ae1879
|
|
BLAKE2b-256 checksum How to use checksums |
caa9c32c6d592950d27ac90270215403ac45801beab517c0c26a33e232da98a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.5
|
Release files / phyloom-0.1.0-py3-none-any.whl
| Download URL | phyloom-0.1.0-py3-none-any.whl |
|---|---|
| Size | 82.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9e9f9f61d852158e2a49c54b880024557927992c63cb62c27102219b8b26fe41
|
|
BLAKE2b-256 checksum How to use checksums |
edf42044fc6a1b6193ed99a6569f8f3d140434d9b5bca605347a4712bdc7d865
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.5
|
Security for phyloom 0.1.0
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.