Home

Awesome

DL2vec

DL2vec is a method that can convert different types of Description Logic axioms into graph representation, and then generate an embedding for each node and edge type.

The main covnertion tool is in DL2vec_embed folder.

Required packages

python >= 3.4 <br> pandas >=0.24.2 <br> numpy >= 1.16.2 <br> torch >= 1.0.1 <br> networkx >= 2.3 <br> scipy >= 1.2.1 <br> scikit-learn >=0.20.3 <br> Groovy (Groovy Version: 2.4.10 JVM: 1.8.0_121) with Grape for dependency management.

Experiment

Details for predicting gene-disease associations with DL2Vec can be found in the experiment folder.

Running DL2vec

  1. Git clone this repository git clone https://github.com/bio-ontology-research-group/DL2Vec.git

  2. Generate the embeddings for each entity:

    Generate the embeddings

     python runDL2vec.py -ontology "ontology file" -associations "association_file" -outfile "embedding output file" -entity_list "entities list need generating embeddding"
    

Where the following are mandatory arguments: <br>

  1. ontology_file: ontology file contains ontology in OWL format
  2. association_file: file contains entity-class associations
  3. outfile: output file contains the embedding model

If one of these two mandatory files is missing, an error message will be displayed.

You can also specify the following optional arguments:<br>

The main embedding learning process

<div class="product-image-wrapper"> <img class="product-image" src="workflow.png" /> </div>

Output

The script will save a model that can generate embeddings for each entity.

Reference

If you find DL2vec useful for your research, please cite: <br> Jun Chen, Azza Althagafi, and Robert Hoehndorf. "Predicting candidate genes from phenotypes, functions, and anatomical site of expression." (2020). DOI: 10.1093/bioinformatics/btaa879

Acknowledgement

We use two scripts which, ProcessOntology.groovy and getMetadata.groovy that are adapted from OPA2vec.