Coder Social home page Coder Social logo

drugstance's Introduction

Drugstance

Calculate the semantic distance between drugs based on the MeSH headings of their ChEMBL indications. We employ an information theory algorithm and the overlap coefficient. We decided to use an RBF kernel on the semantic distance and average it with the overlap coefficient to create our final semantic distance matrix.

Example usage (Slurm)

When running this pipeline on a large number of drugs, it is recommended to use SLURM to split computations across multiple jobs, each multiprocessing across 20 cores. To do this simple run the following command:

bash pipeline d2021.bin indications.tsv

Note: Files create and used in the pipeline will be written to a directory called data/ and output files will be written to a directory called output/.

Example usage (Docker)

This is a standalone version of the algorithm that runs within Docker. There is no multiprocessing nor job usage. Therefore it will run very slowly and require a lot of memory. We recommend running it with a smaller set of drugs and indications.

docker run --rm -v "$PWD":/data labsyspharm/drugstance:latest python3 /app/drugstance -i d2021.bin -m indications.tsv -o /data/

Input Files

d2021.bin is all MeSH data downloaded in ASCII format. indications.tsv is a TSV file from ChEMBL that contains in the column pref_name the name of the drug and in the column mesh_heading a valid MeSH heading that is an indication of that drug. For example:

pref_name mesh_heading
TOFACITINIB Immune System Diseases
TOFACITINIB Arthritis, Rheumatoid
ASPIRIN Pain

Transformations

Optionally, you can transform the output data using an RBF kernel (or implement your own transformation) and then take the average between all distance metrics to create a final semantic distance measurement between drugs.

drugstance's People

Contributors

matthodgman avatar

Stargazers

Clemens Hug avatar

Watchers

James Cloos avatar  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.