Git Product home page Git Product logo

chemicalx's Introduction


PyPI Version Docs Status Code Coverage Build Status Arxiv

Documentation | External Resources | Datasets | Examples

ChemicalX is a deep learning library for drug-drug interaction, polypharmacy side effect, and synergy prediction. The library consists of data loaders and integrated benchmark datasets. It also includes state-of-the-art deep neural network architectures that solve the drug pair scoring task. Implemented methods cover traditional SMILES string based techniques and neural message passing based models.


Citing

If you find ChemicalX and the new datasets useful in your research, please consider adding the following citation:

@article{chemicalx,
  arxivId = {2202.05240},
  author = {Rozemberczki, Benedek and Hoyt, Charles Tapley and Gogleva, Anna and Grabowski, Piotr and Karis, Klas and Lamov, Andrej and Nikolov, Andriy and Nilsson, Sebastian and Ughetto, Michael and Wang, Yu and Derr, Tyler and Gyori, Benjamin M},
  month = {feb},
  title = {{ChemicalX: A Deep Learning Library for Drug Pair Scoring}},
  url = {http://arxiv.org/abs/2202.05240},
  year = {2022}
}

Drug Pair Scoring Explained

Our framework solves the drug pair scoring task of computational chemistry. In this task a machine learning model has to predict the outcome of administering two drugs together in a biological or chemical context. Deep learning models which solve this task have an architecture with two distinctive parts:

  1. A drug encoder layer which takes a pair of drugs as an input (blue and red drugs below).
  2. A head layer which outputs scores in the administration context - polypharmacy in our explanatory figure.

Getting Started

The API of chemicalx provides a high-level function for training and evaluating models that's heavily influenced by the PyKEEN training and evaluation pipeline:

from chemicalx import pipeline
from chemicalx.models import DeepSynergy
from chemicalx.data import DrugCombDB

model = DeepSynergy(context_channels=112, drug_channels=256)
dataset = DrugCombDB()

results = pipeline(
    dataset=dataset,
    model=model,
    # Data arguments
    batch_size=5120,
    context_features=True,
    drug_features=True,
    drug_molecules=False,
    # Training arguments
    epochs=100,
)

# Outputs information about the AUC-ROC, etc. to the console.
results.summarize()

# Save the model, losses, evaluation, and other metadata.
results.save("~/test_results/")

Case Study Tutorials

We provide in-depth case study like tutorials in the Documentation, each covers an aspect of ChemicalX’s functionality.


Methods Included

In detail, the following drug pair scoring models were implemented.

2018

2019

2020

2021


Head over to our documentation to find out more about installation, creation of datasets and a full list of implemented methods and available datasets. For a quick start, check out the examples in the examples/ directory.

If you notice anything unexpected, please open an issue. If you are missing a specific method, feel free to open a feature request.


Installation

PyTorch 1.10.0

To install for PyTorch 1.10.0, simply run

pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.10.0+${CUDA}.html
pip install torchdrug
pip install chemicalx

where ${CUDA} should be replaced by either cpu, cu102, or cu111 depending on your PyTorch installation.

cpu cu102 cu111
Linux
Windows
macOS

Running tests

$ tox -e py

License

chemicalx's People

Contributors

benedekrozemberczki avatar cthoyt avatar bgyori avatar andrejlamov avatar andriy-nikolov avatar bliutech avatar mughetto avatar kajocina avatar sebastiandro avatar yuwvandy avatar kkaris avatar hzcheney avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.