synergy
A python package to calculate, analyze, and visualize drug combination synergy and antagonism. Supports multiple models of synergy:
- MuSyC
- Bliss
- Loewe
- Combination Index
- ZIP
- Zimmer
- BRAID
- Schindler
- HSA
Citation
If you use, please cite:
Wooten, David J, and Albert, Réka. synergy - A Python library for calculating, analyzing, and visualizing drug combination synergy. (2020) Bioinformatics. https://doi.org/10.1093/bioinformatics/btaa826
Installation
Using PIP
pip install synergy
From source
git clone git@github.com:djwooten/synergy.git
cd synergy
pip install -e .
Documentation
You can find extensive documentation and examples at http://synergy.readthedocs.io/
Example Usage
The general usage is the same for most synergy models, though refer to the documentation at http://synergy.readthedocs.io/ for specifics.
Fitting models
For this, I assume you have access to a drug response data set that has (at least) the following columns.
| drug1.conc | drug2.conc | effect |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 0.01 | 0.97 |
| 0 | 0.1 | 0.9 |
| 0 | 1 | 0.7 |
| ... | ... | ... |
from synergy.combination import MuSyC # or any other model
import pandas as pd
df = pd.read_csv("/path/to/your_own_drug_response_data.csv")
# Instantiate the model. Bounds are optional for parametric models, and will be used when fitting to data.
# In this case, imagine that the effect data we have is known to fall between 0 and 1. Further, the given h and alpha
# bounds here are reasonable for most datasets, as changing those parameters has the most impact near `1`.
model = MuSyC(E_bounds=(0, 1), h_bounds=(1e-3, 1e3), alpha_bounds=(1e-3, 1e3))
# Prepare the input data to be fit
d1 = df["drug1.conc"]
d2 = df["drug2.conc"]
E = df["effect"]
# Fit the model (bootstrap_iterations is an option for some models to estimate parameter
model.fit(d1, d2, E, bootstrap_iterations=100)
model.summarize()
The last call to model.summarize() will print a table summarizing the synergy findings. This is only available for
parametric synergy models. For example, the table may look like
Parameter | Value | 95% CI | Comparison | Synergy
=====================================================================
beta | 0.261 | (0.175, 0.333) | > 0 | synergistic
alpha12 | 3.54 | (2.67, 4.93) | > 1 | synergistic
alpha21 | 1.29 | (0.845, 2.45) | ~= 1 | additive
gamma12 | 0.947 | (0.762, 1.2) | ~= 1 | additive
gamma21 | 0.722 | (0.487, 1.2) | ~= 1 | additive
Visualization
Many utilities exist under synergy.utils.plots to create heatmaps, 3D interactive dose-response surfaces, and 3D
interactive isosurfaces. These require intsalling matplotlib for the heatmaps, and plotly for the 3d plots. Many
exmaples can be seen at http://synergy.readthedocs.io/models/synergy_models.html/.
The basic approach is
from synergy.utils.plots import plot_heatmap, plot_plotly_surface
plot_heatmap(d1, d2, E, title="Dose response surface", fname="heatmap.png")
plot_surface_plotly(d1, d2, E, title="Dose response surface", fname="surface.html")
License
GNU General Public License v3 or later (GPLv3+)
Metadata
Release files for synergy 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| synergy-1.0.0.tar.gz | 101.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| synergy-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 213.5 kB
Release files / synergy-1.0.0.tar.gz
| Download URL | synergy-1.0.0.tar.gz |
|---|---|
| Size | 101.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57a797b82699ce18ce165ce25c7aab5f15ebb576b8f56b20868e9a6992bb3806
|
|
BLAKE2b-256 checksum How to use checksums |
084609a08bcc41978bc628803cf73f3eaef4218a5ab78b56d73b8f00c437d7c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.14
|
Release files / synergy-1.0.0-py3-none-any.whl
| Download URL | synergy-1.0.0-py3-none-any.whl |
|---|---|
| Size | 111.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
84196415a297c36d5d82ee60660aab25d1b88be7bd579b6c052718c166cc247d
|
|
BLAKE2b-256 checksum How to use checksums |
ea191ca4c3d0b8909282fa87c10b51cc162159043c41e4ce19ff3852aff23c87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.14
|
Security for synergy 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.