Rule-based Programmatic Quantitative Systems Pharmacology Modeling in Python.
Project description
QSPy: Quantitative Systems Pharmacology in Python
QSPy ('Cue Ess Pie') is a Python-based framework for the programmatic construction of rule-based mathematical models that describe drugs and their interactions with biological systems. Built on PySB, it enables modular modeling and simulation of quantitative systems pharmacology (QSP) models.
:pill: :computer:
What's new in
version 0.1.0
- First release!
Table of Contents
- Install
- License
- Change Log
- Documentation and Usage
- Contact
- Contributing
- Supporting
- Other Useful Tools
Install
| ! Note |
|---|
| qspy is still in version zero development so new versions may not be backwards compatible. |
qspy has been developed with Python 3.11.9 and PySB 1.15.0.
Dependencies
QSPy has the following core dependencies:
Installation
conda install -c alubbock pysb
OR
mamba install -c alubbock pysb
- Install qspy with pip:
pip install cueesspie
Testing and Coverage
For automated testing and coverage analysis:
pip install pytest coverage nose
License
This project is licensed under the BSD 2-Clause License - see the LICENSE file for details
Change Log
See: CHANGELOG
Documentation and Usage
Full documentation is available at:
https://borealis-biomodeling.github.io/qspy/
Built With:
Quick Start Example
from qspy import Model, parameters, monomers, rules, initials, observables
from qspy.functionaltags import PROTEIN, DRUG
from qspy.validation import ModelMetadataTracker, ModelChecker
Model(name="SimpleQSP").with_units(concentration='nM', time='1/s', volume='L')
with parameters():
k_f = (1.0, "1/min")
k_r = (0.5, "1/min")
L_0 = (100.0, "nM")
R_0 = (10.0, "nM")
with monomers():
L = (["b"], {}, DRUG.AGONIST)
R = (["b", 'active'], {'active':[False, True]}, PROTEIN.RECEPTOR)
with rules():
bind = (L(b=None) + R(b=None, active=False) | L(b=1) % R(b=1, active=True), k_f, k_r)
with initials():
L(b=None) << L_0
R(b=None, active=False) << R_0
with observables():
L() > "L_total"
R() > "R_total"
R(active=True) > "R_active"
# Track and export model metadata
ModelMetadataTracker(version="1.0.0", author="Alice", export_toml=True)
# Run model validation checks
ModelChecker()
# Generate a Markdown summary of the model
model.markdown_summary()
Contact
- Issues :bug: : Please open a GitHub Issue to report any problems/bugs with the code or its execution, or to make any feature requests.
- Discussions :grey_question: : If you have questions, suggestions, or want to discuss anything else related to the project, feel free to use the Discussions board.
- Support :question: : For any other support inquiries you can send an email to blakeaw1102@gmail.com.
Contributing
Interested in contributing to this project? See CONTRIBUTING for details.
Supporting
I'm very happy that you've chosen to use qspy. This add-on is a project that I develop and maintain on my own time, independently of the core PySB library, and without external funding. If you've found it helpful, here are a few ways you can support its ongoing development:
- Star :star: : Show your support by starring the GitHub repository. It helps increase the project's visibility and lets others know it's useful. It also benefits my motivation to continue improving the package!
- Share :mega: : Sharing
qspyon your social media, forums, or with your network is another great way to support the project. It helps more people discoverqspy, which in turn motivates me to keep developing! - Cite :books: : Citing or mentioning this software in your work, publications, or projects is another valuable way to support it. It helps spread the word and acknowledges the effort put into its development, which is greatly appreciated!
- Sponsor :dollar: : Even small financial contributions, such as spotting me the cost of a tea through Ko-fi so I can get my caffeine fix, can make a big difference! Every little bit can help me continue developing this and other open-source projects.
Acknowledegments
Special thanks for Martin Breuss's MkDocs tuorial, which served as the template for setting up and generating documentation using Mkdocs.
AI Acknowledgement
This package was developed with AI assistance. This inlcudes the generative AI tools ChatGPT, Microsoft Copilot, and GitHub Copilot, which were used to brainstorm features and implementation details, draft initial code snippets and boilerplate, and support documentation through outlining, editing, and docstring generation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cueesspie-0.1.0.tar.gz.
File metadata
- Download URL: cueesspie-0.1.0.tar.gz
- Upload date:
- Size: 39.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b02a903f25c205c4c523beaa80a23736b2677f1a48cddb69b2fecbfa38d4e089
|
|
| MD5 |
a7dcfe504a28177f7914abf81702fbbd
|
|
| BLAKE2b-256 |
5b0cbba35cfbbe2a1e012ffbb0897b344379284c1324df95a430b05f4ef4dfaf
|
Provenance
The following attestation bundles were made for cueesspie-0.1.0.tar.gz:
Publisher:
python-publish-pypi.yml on Borealis-BioModeling/qspy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cueesspie-0.1.0.tar.gz -
Subject digest:
b02a903f25c205c4c523beaa80a23736b2677f1a48cddb69b2fecbfa38d4e089 - Sigstore transparency entry: 326003115
- Sigstore integration time:
-
Permalink:
Borealis-BioModeling/qspy@f3115c10e4a9cd8355def276746bc64bf6a34392 -
Branch / Tag:
refs/tags/v0.1.0c - Owner: https://github.com/Borealis-BioModeling
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish-pypi.yml@f3115c10e4a9cd8355def276746bc64bf6a34392 -
Trigger Event:
release
-
Statement type:
File details
Details for the file cueesspie-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cueesspie-0.1.0-py3-none-any.whl
- Upload date:
- Size: 47.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71a0fd7bd28afbc16f373e7290249911cdd48b1e06a2565be4ef1ebaeede1172
|
|
| MD5 |
f94ba404f30accc860dfc8af6e1f4b72
|
|
| BLAKE2b-256 |
2c417ad071f0eccee2b0e1916e365d8572b097892b88ac74d135b1faf75b8fb5
|
Provenance
The following attestation bundles were made for cueesspie-0.1.0-py3-none-any.whl:
Publisher:
python-publish-pypi.yml on Borealis-BioModeling/qspy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cueesspie-0.1.0-py3-none-any.whl -
Subject digest:
71a0fd7bd28afbc16f373e7290249911cdd48b1e06a2565be4ef1ebaeede1172 - Sigstore transparency entry: 326003139
- Sigstore integration time:
-
Permalink:
Borealis-BioModeling/qspy@f3115c10e4a9cd8355def276746bc64bf6a34392 -
Branch / Tag:
refs/tags/v0.1.0c - Owner: https://github.com/Borealis-BioModeling
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish-pypi.yml@f3115c10e4a9cd8355def276746bc64bf6a34392 -
Trigger Event:
release
-
Statement type: