Skip to main content

Patient-Specific Modeling in Python

Project description


PyPI version Actions Status Documentation Status License Downloads PyPI pyversions Language grade: Python pre-commit.ci status Code style: black Imports: isort iScience Paper

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 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:

$ 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:

$ 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.

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)

michaelis_menten

For more examples, please refer to the Documentation.

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. All code for model construction, patient-specific simulations, and model-based stratification can be found here: https://github.com/pasmopy/breast_cancer.

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

License

Apache License 2.0

Project details


Download files

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

Source Distribution

pasmopy-0.4.0.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

pasmopy-0.4.0-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file pasmopy-0.4.0.tar.gz.

File metadata

  • Download URL: pasmopy-0.4.0.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for pasmopy-0.4.0.tar.gz
Algorithm Hash digest
SHA256 5be451ab3ba2b2b7494b11ab5885231223094fc63f3e53e5fb0e43f27482a064
MD5 3bcc70d020d2f0c4e1edbb81bc76b6e1
BLAKE2b-256 d3e5a57240ed3700d8faa8e05818f71c557b39044392d6595c9d37a3fd54c61c

See more details on using hashes here.

File details

Details for the file pasmopy-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: pasmopy-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for pasmopy-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 52dc53974795eb2cf9d4ff5ea1a880d2253973bfc96049311a51463c6c1430cb
MD5 a42c786b2fc9374c9e404434577a433d
BLAKE2b-256 3e55e3fefaead9164cd37897d13697950aeacc2209e06b131dbbd939920b80f9

See more details on using hashes here.

Supported by

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