Skip to main content

No project description provided

Project description

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+)

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

synergy-1.0.0.tar.gz (101.9 kB view details)

Uploaded Source

Built Distribution

synergy-1.0.0-py3-none-any.whl (111.7 kB view details)

Uploaded Python 3

File details

Details for the file synergy-1.0.0.tar.gz.

File metadata

  • Download URL: synergy-1.0.0.tar.gz
  • Upload date:
  • Size: 101.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for synergy-1.0.0.tar.gz
Algorithm Hash digest
SHA256 57a797b82699ce18ce165ce25c7aab5f15ebb576b8f56b20868e9a6992bb3806
MD5 21f88cdc1c6952949114f5df1ccb9b74
BLAKE2b-256 084609a08bcc41978bc628803cf73f3eaef4218a5ab78b56d73b8f00c437d7c0

See more details on using hashes here.

File details

Details for the file synergy-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: synergy-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 111.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for synergy-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 84196415a297c36d5d82ee60660aab25d1b88be7bd579b6c052718c166cc247d
MD5 70f24fd74c8a3c7c43bff7127c53139e
BLAKE2b-256 ea191ca4c3d0b8909282fa87c10b51cc162159043c41e4ce19ff3852aff23c87

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