Skip to main content

Drug synergy from minimum drug combination data

Project description

xynergy

Fast and high throughput Drug Synergy Prediction from Minimal Combination Data via Radial Basis Function Surface Interpolation combined with NMF and XGBoost

Workflow

A typical workflow will involve calling several functions in sequence:

  1. tidy() - Coaxes your data into a format suitable for downstream analysis
  2. pre_impute() - Fills in missing experimental points, largely to give full matrices for the next step to factorize
  3. matrix_factorize() - Approximate the imputed matrix via various matrix factorization algorithms
  4. post_impute() - Create a final imputed dataframe using matrix factorization results
  5. add_synergy() - Add columns calculating the synergy at each point under various assumptions (Bliss, Loewe, HSA, and/or ZIP)

xynergy enforces relatively few constraints on the form of your data and in theory allows you to shim in your own data transformations between any of these steps (whether that is a good idea or not is not for me to decide).

An example workflow looks something like this:

import xynergy as xyn
import xynergy.example as ex

data = ex.load_example_data()

# Normalizes column names so we can use default arguments for downstream functions
clean_data = xyn.tidy(
    data,
    dose_cols=["dose_a", "dose_b"],
    response_col="response",
    experiment_cols=["experiment_source_id", "line", "drug_a", "drug_b", "pair_index"],
)
imputed = xyn.pre_impute(clean_data, method="XGBR")
factored = xyn.matrix_factorize(imputed, method=["SVD", "NMF"])
final = xyn.post_impute(factored)
with_synergy = xyn.add_synergy(final, method=["bliss", "zip"])

The bundled workbook lives at xynergy/example_data/data.xlsx and is loaded by xynergy.example.load_example_data(). See the tutorial "Using Xynergy" in the Sphinx documentation for a fuller walkthrough.

Acknowledgments

This work stands on the shoulders of so many things. In addition to the software packages explicitly and implicitly used in this repo, some code/equations came from other places:

  • The cNMF-like algorithm that came from DECREASE (DOI: 10.1038/s42256-019-0122-4)
  • The Venter-mode code that came from the R {modeest} package (DOI: 10.32614/CRAN.package.modeest)
  • The closed-form Loewe additivity algorithm from 10.3389/fphar.2018.00031

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

xynergy-0.0.6.tar.gz (70.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xynergy-0.0.6-py3-none-any.whl (76.5 kB view details)

Uploaded Python 3

File details

Details for the file xynergy-0.0.6.tar.gz.

File metadata

  • Download URL: xynergy-0.0.6.tar.gz
  • Upload date:
  • Size: 70.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for xynergy-0.0.6.tar.gz
Algorithm Hash digest
SHA256 1bb7725b67afe6a82acad7c03f6172ddb80297a9e7ac5f504f5c6b9e36a0af21
MD5 a5165ae56d35f5c9874bd8fb14a24fb5
BLAKE2b-256 617c8d3988af08d5f1b002dc7fcdffae818f8aba4137461a811a6e9655df1dd5

See more details on using hashes here.

File details

Details for the file xynergy-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: xynergy-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 76.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for xynergy-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 1c63263c584a988c65c5caf9b0c1ea4881ca0b402f8e99f811c3d8be20504e16
MD5 b7b9ad68b192e4b6598f26809684d1db
BLAKE2b-256 09b87b32a75a4ac6dbbeb13202551d00215aa193c308b874a94674a064037e1d

See more details on using hashes here.

Supported by

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