mhn : a Python package for analyzing cancer progression with Mutual Hazard Networks
Open Access
- 10 November 2025
- journal article
- Published by Oxford University Press (OUP) in Bioinformatics Advances
- Vol. 6 (1)
Abstract
Summary: Mutual Hazard Networks (MHNs) are statistical models for analyzing (genetic) cancer progression. Many cancers develop silently and are only noticeable when they have significantly progressed, creating an observational gap until diagnosis. MHNs bridge this gap by reconstructing the underlying dynamics of disease progression. We present mhn, a Python package for dynamic cancer progression analysis using MHNs. It trains an MHN model from tumor genotypes. mhn overcomes challenges of numerical efficiency in model training by making use of state space restriction, allowing training MHNs with >100 mutational events, 5 times more than was possible before. The package offers (i) reconstruction of the most likely evolutionary history of tumors, (ii) sampling of artificial tumor histories, and (iii) visualization of genomic interactions and likely progression trajectories. These features substantially extend earlier implementations, providing a fast and user-friendly framework for researchers and clinicians to study cancer dynamics. Availability and implementation: mhn can be installed from PyPI using pip and is available under the MIT License on GitHub (https://github.com/spang-lab/LearnMHN). Installation instructions and package functionalities are detailed on GitHub and PyPI, with a comprehensive guide on Read the Docs (https://learnmhn.readthedocs.io/en/latest/index.html) and a Jupyter notebook on GitHub to help users explore the package.Keywords
Funding Information
- Deutsche Forschungsgemeinschaft (TRR-305)
- Deutsche Forschungsgemeinschaft (GR-3179/6–1)
- Schweizerischer Nationalfonds zur Förderung der Wissenschaftlichen Forschung (179518)
- Swiss Cancer League (KFS-2977-08-2012)
This publication has 8 references indexed in Scilit:
- A Picture Guide to Cancer Progression and Evolutionary Accumulation Models: Systematic Critique, Plausible Interpretations, and Alternative UsesIEEE Access, 2025
- Modeling metastatic progression from cross-sectional cancer genomics dataBioinformatics, 2024
- Overcoming Observation Bias for Cancer Progression Modeling2024
- Timed hazard networks: Incorporating temporal difference for oncogenetic analysisPLOS ONE, 2023
- Array programming with NumPyNature, 2020
- Modelling cancer progression using Mutual Hazard NetworksBioinformatics, 2019
- Cancer Evolution: Mathematical Models and Computational InferenceSystematic Biology, 2014
- Data Structures for Statistical Computing in PythonProceedings of the Python in Science Conference, 2010