Giter Site home page Giter Site logo

SEffNet Development Build Status

SEffNet (Side Effect Network embeddings) is a tool that optimizes, trains, and evaluates predictive models for biomedical networks that contain drug-, target- and side effect-information using different network representation learning methods in an attempt to understand the causes of side effects.

This package was developed during the master's thesis of Rana Aldisi.

Structure

  • notebooks: Notebooks that were used for training and evaluation of models, and interpertation of prediction model
  • resources: The graphs and materials that are used for training and testing

Installation

seffnet can be installed on python37+ from the latest code on GitHub with:

$ pip install git+https://github.com/seffnet/seffnet.git

Usage

Using the predictive model

If you've installed seffnet locally, you can use the default model from the GitHub repository with:

from seffnet.default_predictor import predictor

# Find new relations for a given entity based on its CURIE
results = predictor.find_new_relations(curie='pubchem.compound:5095')
...   

You can get the embeddings for phenotype entities with

import itertools as itt
from seffnet.default_predictor import predictor

phenotype_to_embedding = {
    node_data['identifier']: predictor.embeddings[node_id]
    for node_id, node_data in predictor.node_id_to_info.items()
    if node_data['namespace'] == 'umls'
}
# could use sklearn.metrics.pairwise.cosine_similarity on the values in this dict

You can use the default model in the CLI:

$ seffnet predict pubchem.compound:5095

You can predict on new chemicals via their SMILES strings based on their similarity to chemicals included in the network. Warning: we haven't benchmarked how well this actually works yet.

$ seffnet predictc "C1=CC=C(C=C1)C2=CC=C(C=C2)CCO"

Rebuilding the resources

You can rebuild all the graphs and maps created for this project by running the following:

$ seffnet rebuild

Note that you need to have RDKit package and environment to be able to run this command

Model training and evaluation

You can train an NRL model using the following:

$ seffnet train --input-path ./resources/basic_graphs/fullgraph_with_chemsim.edgelist --evaluation --method node2vec
  • For further CLI options and parameters use --help, -h

Optimizing hyperparameters

Network representation learning models can be optimized with:

$ seffnet optimize --input-path ./resources/basic_graphs/fullgraph_with_chemsim.edgelist --method node2vec
  • For further CLI options and parameters use --help, -h

Web Application

The web application allows users to get results from the model programmatically. Make sure the extra dependencies have been installed as well using the [web] extra. Unfortunately, this doesn't work when installing directly from GitHub, so see the setup.cfg for the Flask dependencies.

$ pip install -e .[web]

Run development server with:

$ seffnet web --host localhost --port 5000

Run through docker with:

$ docker-compose up

As an example, you can check the chemicals predicted to interact with HDAC6 at http://localhost:5000/predict/uniprot:Q9UBN7?results_type=chemical.

SEffNet's Projects

bionev icon bionev

Code and datasets for "Graph Embedding on Biomedical Networks: Methods, Applications, and Evaluations"

masters_thesis icon masters_thesis

The master's thesis of Rana Aldisi about SEffNet available at https://github.com/AldisiRana/masters_thesis/raw/master/main.pdf

seffnet icon seffnet

Network representation learning on drug-target-side effects-indication graphs for side effect prediction

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.