https://github.com/pasmopy/pasmopy
Patient-Specific Modeling in Python
https://github.com/pasmopy/pasmopy
biochemical-networks cancer computational-biology digital-twin in-silico-clinical-trial kinetic-modeling patient-specific-modeling personalized-medicine precision-medicine precision-oncology python systems-biology systems-biology-simulation
Last synced: 2 months ago
JSON representation
Patient-Specific Modeling in Python
- Host: GitHub
- URL: https://github.com/pasmopy/pasmopy
- Owner: pasmopy
- License: apache-2.0
- Created: 2021-02-01T06:28:00.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2026-03-16T19:26:59.000Z (3 months ago)
- Last Synced: 2026-03-28T16:19:57.203Z (3 months ago)
- Topics: biochemical-networks, cancer, computational-biology, digital-twin, in-silico-clinical-trial, kinetic-modeling, patient-specific-modeling, personalized-medicine, precision-medicine, precision-oncology, python, systems-biology, systems-biology-simulation
- Language: Python
- Homepage: https://pasmopy.readthedocs.io
- Size: 5.04 MB
- Stars: 19
- Watchers: 3
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Citation: CITATION.cff
Awesome Lists containing this project
README
[](https://pypi.python.org/pypi/pasmopy)
[](https://github.com/pasmopy/pasmopy/actions)
[](https://pasmopy.readthedocs.io/en/latest/?badge=latest)
[](https://opensource.org/licenses/Apache-2.0)
[](https://pepy.tech/project/pasmopy)
[](https://pypi.python.org/pypi/pasmopy)
[](https://results.pre-commit.ci/latest/github/pasmopy/pasmopy/master)
[](https://github.com/psf/black)
[](https://pycqa.github.io/isort/)
[](https://doi.org/10.1016/j.isci.2022.103944)
**Pasmopy** is a scalable toolkit to identify prognostic factors for cancers based on intracellular signaling dynamics generated from personalized kinetic models. It is compatible with [biomass](https://github.com/biomass-dev/biomass) and offers the following features:
- Construction of mechanistic models from text
- Personalization of the model using transcriptome data
- Prediction of patient outcome based on _in silico_ signaling dynamics
- Sensitivity analysis for prediction of potential drug targets
## Documentation
Online documentation is available at https://pasmopy.readthedocs.io.
You can also build the documentation locally by running the following commands:
```shell
$ cd docs
$ make html
```
The site will live in `_build/html/index.html`.
## Installation
The latest stable release (and required dependencies) can be installed from [PyPI](https://pypi.python.org/pypi/pasmopy):
```
$ pip install pasmopy
```
Pasmopy requires Python 3.8+ to run.
## Example
### Building mathematical models of biochemical systems from text
This example shows you how to build a simple Michaelis-Menten two-step enzyme catalysis model with Pasmopy.
> E + S ⇄ ES → E + P
_An enzyme, E, binding to a substrate, S, to form a complex, ES, which in turn releases a product, P, regenerating the original enzyme._
```python
import os
from pasmopy import Text2Model, create_model, run_simulation
# Prepare a text file describing the biochemical reactions (e.g., `michaelis_menten.txt`)
reactions = """\
E + S ⇄ ES | kf=0.003, kr=0.001 | E=100, S=50
ES → E + P | kf=0.002
"""
observables = """
@obs Substrate: u[S]
@obs E_free: u[E]
@obs E_total: u[E] + u[ES]
@obs Product: u[P]
@obs Complex: u[ES]
"""
simulation_condition = """
@sim tspan: [0, 100]
"""
with open("michaelis_menten.txt", mode="w") as f:
f.writelines(reactions)
f.writelines(observables)
f.writelines(simulation_condition)
# Convert the text into an executable model
description = Text2Model("michaelis_menten.txt")
description.convert()
assert os.path.isdir("michaelis_menten")
# Run simulation
model = create_model("michaelis_menten")
run_simulation(model)
```
[](https://pasmopy.readthedocs.io/en/latest/model_development.html#michaelis-menten-enzyme-kinetics)
For more examples, please refer to the [Documentation](https://pasmopy.readthedocs.io/en/latest/).
### Personalized signaling models for cancer patient stratification
Using Pasmopy, we built a mechanistic model of ErbB receptor signaling network, trained with protein quantification data obtained from cultured cell lines, and performed _in silico_ simulation of the pathway activities on breast cancer patients using The Cancer Genome Atlas (TCGA) transcriptome datasets. The temporal activation dynamics of Akt, extracellular signal-regulated kinase (ERK), and c-Myc in each patient were able to accurately predict the difference in prognosis and sensitivity to kinase inhibitors in triple-negative breast cancer (TNBC).
For further details, please see https://pasmopy.readthedocs.io/en/latest/personalized_model.html.
## References
- Imoto, H., Yamashiro, S. & Okada, M. A text-based computational framework for patient -specific modeling for classification of cancers. _iScience_ **25**, 103944 (2022). https://doi.org/10.1016/j.isci.2022.103944
- Imoto, H., Yamashiro, S., Murakami, K. & Okada, M. Protocol for stratification of triple-negative breast cancer patients using _in silico_ signaling dynamics. _STAR Protocols_ **3**, 101619 (2022). https://doi.org/10.1016/j.xpro.2022.101619
## Author
[Hiroaki Imoto](https://github.com/himoto)
## License
[Apache License 2.0](https://github.com/pasmopy/pasmopy/blob/master/LICENSE)