Python package for inference and analysis of mutation trees.
PYggdrasil implements the Single Cell Inference of Tumor Evolution (SCITE) algorithm by Kuipers J et al. (2015).
It was designed to quantify the MCMC exploration of tumour progression tree spaces, in particular to investigate Initialisation Strategies, Convergence Diagnostics, & Multi-modalities.
import pyggdrasil as yg
To build the package and maintain dependencies, we use Poetry. In particular, it's good to install it and become familiar with its basic functionalities by reading the documentation.
To set up the environment (together with development tools), run:
$ poetry install --with dev
$ poetry run pre-commit install
Then, you will be able to run tests:
$ poetry run pytest
... or check the types:
$ poetry run pyright
Alternatively, you may prefer to work with the right Python environment using:
$ poetry shell
$ pytest
The code quality checks run on GitHub can be seen in .github/workflows/test.yml
.
We are using:
- Ruff to lint the code.
- Black to format the code.
- Pyright to check the types.
- Pytest to run the unit tests.
- Interrogate to check the documentation.
We use Feature Branch Workflow, in which modifications of the code should happen via small pull requests.
We recommend submitting small pull requests and starting with drafts outlining proposed changes.
- The package code is in
src/pyggdrasil/
and is partitioned into subpackages. - The unit tests are in
tests/
, and the structure of this directory should reflect the one of the package. - Experimental workflows are in
workflows/
, with a description of how to set up the Conda environment inworkflows/README.md
This package originates from Gordon J Köhn's MSc Thesis: Quantifying MCMC Exploration of Tumour Progression Tree Spaces in 2023 at ETH Zürich. Paweł Czyż and Prof. Dr Niko Beerenwinkel supervised this project as part of the Computational Biology Group at the Department of Biosystems Science and Engineering.