Skip to main content

Generate phylogenetic datasets with minimal setup effort

Project description


AliSim PyPI version PyPI downloads

Phylogenie is a Python package designed to easily simulate phylogenetic datasets—such as trees and multiple sequence alignments (MSAs)—with minimal setup effort. Simply specify the distributions from which your parameters should be sampled, and Phylogenie will handle the rest!

✨ Features

Phylogenie comes packed with useful features, including:

  • Simulate tree and multiple sequence alignment (MSA) datasets from parameter distributions 🌳🧬
    Define distributions over your parameters and sample a different combination of parameters for each dataset sample.

  • Automatic metadata management 🗂️
    Phylogenie stores each parameter combination sampled during dataset generation in a .csv file.

  • Generalizable configurations 🔄
    Easily apply the same configuration across multiple dataset splits (e.g., train, validation, test).

  • Multiprocessing support ⚙️💻
    Simply specify the number of cores to use, and Phylogenie handles multiprocessing automatically.

  • Pre-implemented parameterizations 🎯
    Include canonical, fossilized birth-death, epidemiological, birth-death with exposed-infectious (BDEI), birth-death with superspreading (BDSS), and contact tracing (CT).

  • Skyline parameter support 🪜
    Support for piece-wise constant parameters.

  • Arithmetic operations on parameters 🧮
    Perform flexible arithmetic operations between parameters directly within the config file.

📦 Installation

Phylogenie 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 pyenv.

Once you have Python set up, you can install Phylogenie directly from PyPI:

pip install phylogenie

Or install from source:

git clone https://github.com/gabriele-marino/phylogenie.git
cd phylogenie
pip install .

🛠 Backend dependency

Phylogenie relies on AliSim for simulating multiple sequence alignments (MSAs). AliSim is a powerful MSAs simulation tool distributed with IQ-TREE, and requires separate installation to use it as a simulation backend.

🚀 Quick Start

Once you have installed Phylogenie, check out the examples folder.
It includes a collection of thoroughly commented configuration files, organized as a step-by-step tutorial. These examples will help you understand how to use Phylogenie in practice and can be easily adapted to fit your own workflow.

For quick start, pick your favorite config file and run Phylogenie with:

phylogenie examples/config_file.yaml

This command will create the output dataset in the folder specified inside the configuration file, including data directories and metadata files for each dataset split defined in the config.

Tip: Can’t choose just one config file? You can run them all at once by pointing Phylogenie to the folder! Just use: phylogenie examples. In this mode, Phylogenie will automatically find all .yaml files in the folder you specified and run for each of them!

📖 Documentation

  • The examples folder contains many ready-to-use, extensively commented configuration files that serve as a step-by-step tutorial to guide you through using Phylogenie. You can explore them to learn how it works or adapt them directly to your own workflows.
  • A complete user guide and API reference are under development. In the meantime, feel free to reach out if you have any questions about integrating Phylogenie into your workflows.

📄 License

This project is licensed under MIT License.

📫 Contact

For questions, bug reports, or feature requests, please, consider opening an issue on GitHub, or contact me directly.

If you need help with the configuration files, feel free to reach out — I am always very available and happy to assist!

Project details


Release history Release notifications | RSS feed

This version

2.0.7

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

phylogenie-2.0.7.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phylogenie-2.0.7-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

File details

Details for the file phylogenie-2.0.7.tar.gz.

File metadata

  • Download URL: phylogenie-2.0.7.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.14 Darwin/24.3.0

File hashes

Hashes for phylogenie-2.0.7.tar.gz
Algorithm Hash digest
SHA256 d4bcc3dfb3c4d048aafdd1aff2a8804b8b89e1a1391df44a4181876614f94fea
MD5 9910f981dd6bd343abd82ee453c7deeb
BLAKE2b-256 d9f7bddceab5e0a9b2b58765b42c55205db58cdcc5c98b6f8e5bd303af79bdeb

See more details on using hashes here.

File details

Details for the file phylogenie-2.0.7-py3-none-any.whl.

File metadata

  • Download URL: phylogenie-2.0.7-py3-none-any.whl
  • Upload date:
  • Size: 26.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.14 Darwin/24.3.0

File hashes

Hashes for phylogenie-2.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 e6b921c766208bf2c9b87dd5888ba11d9d154099c4ec4f524b2258e3101c12db
MD5 cf6e37742d08471b927fc2f1af876466
BLAKE2b-256 531e37ba2f0288b3be038f0ec0040614b8ba152814a01dbb9f6457e6ab589298

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page