https://github.com/cbg-ethz/pmhn
Personalised mutual hazard networks: fixed effects in cancer progression modeling
https://github.com/cbg-ethz/pmhn
cancer-evolution probabilistic-models
Last synced: 10 months ago
JSON representation
Personalised mutual hazard networks: fixed effects in cancer progression modeling
- Host: GitHub
- URL: https://github.com/cbg-ethz/pmhn
- Owner: cbg-ethz
- License: mit
- Created: 2023-06-04T13:56:02.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-05-09T18:40:57.000Z (over 1 year ago)
- Last Synced: 2025-09-09T23:08:31.836Z (11 months ago)
- Topics: cancer-evolution, probabilistic-models
- Language: Python
- Homepage: https://cbg-ethz.github.io/pMHN/
- Size: 4.26 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.repostatus.org/#wip)
[](https://github.com/cbg-ethz/pMHN/actions/workflows/test.yml)
[](https://github.com/charliermarsh/ruff)
[](https://github.com/psf/black)
# Personalised Mutual Hazard Networks
Principled probabilistic modelling with Mutual Hazard Networks.
- **Documentation:** [https://cbg-ethz.github.io/pMHN](https://cbg-ethz.github.io/pMHN)
- **Source code:** [https://github.com/cbg-ethz/pMHN](https://github.com/cbg-ethz/pMHN)
- **Bug reports:** [https://github.com/cbg-ethz/pMHN/issues](https://github.com/cbg-ethz/pMHN/issues)
## Running the workflows
To facilitate reproducibility we use [Snakemake](https://snakemake.readthedocs.io/).
We recommend creating a new virtual environment (e.g., using [Micromamba](https://mamba.readthedocs.io/en/latest/user_guide/micromamba.html)) and installing Snakemake as described in their documentation.
Once the environment is set, the package can be installed using
```bash
$ pip install -e . # Note -e which will allow modifying the code when needed
```
## Contributing
We use [Poetry](https://python-poetry.org/) to control dependencies.
When Poetry is installed, clone the repository and type
```bash
$ poetry install --with dev
```
to install the package with the dependencies used for development.
At this stage you should be able to use [Pytest](https://docs.pytest.org/) to run unit tests:
```bash
$ poetry run pytest
```
Alternatively, you may want to work inside Poetry environment:
```bash
$ poetry shell
$ pytest
```
When you submit a pull request, automated continuous integration tests will be run.
They include unit tests as well as code quality checks.
To run the code quality checks automatically at each commit made, we use [pre-commit](https://pre-commit.com/).
To activate it run:
```bash
$ poetry shell # If it is not already active
$ pre-commit install
```
## Acknowledgements
This package is built around [LearnMHN](https://github.com/spang-lab/LearnMHN) (the backend for Mutual Hazard Networks) and [PyMC](https://www.pymc.io/) (probabilistic programming framework).