https://github.com/bio-ontology-research-group/ontology-tutorial
Ontology Tutorial
https://github.com/bio-ontology-research-group/ontology-tutorial
bioinformatics ismb machine-learning ontology ontology-tutorial semantic-similarity-measures tutorial
Last synced: 5 months ago
JSON representation
Ontology Tutorial
- Host: GitHub
- URL: https://github.com/bio-ontology-research-group/ontology-tutorial
- Owner: bio-ontology-research-group
- License: cc-by-4.0
- Created: 2017-07-10T19:16:00.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2022-11-22T04:32:19.000Z (over 3 years ago)
- Last Synced: 2024-04-17T07:25:55.695Z (about 2 years ago)
- Topics: bioinformatics, ismb, machine-learning, ontology, ontology-tutorial, semantic-similarity-measures, tutorial
- Language: Jupyter Notebook
- Homepage:
- Size: 67.3 MB
- Stars: 67
- Watchers: 18
- Forks: 17
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Tutorial: Semantic Similarity and Machine Learning with Ontologies
## Preparations for JOWO 2019
Please follow these steps *before* the tutorial:
* Download and install [Docker](https://www.docker.com).
* Pull the docker image with:
`docker pull coolmaksat/embeddings:latest`
You can then start the notebooks *during* the tutorial like this:
* Run the image and jump directly into the Jupyter notebook:
`docker run -i -t -p 8888:8888 coolmaksat/embeddings:latest /bin/bash -c "jupyter notebook --notebook-dir=/home/borg/ontology-tutorial/ --ip='0.0.0.0' --port=8888 --no-browser --allow-root"`
* After the notebook started, copy the address and the token and paste it into you web browser. The URL should look *similar* to the following: `127.0.0.1:8888/?token=f14e6316a48016b2cf4cbed5dd7b89d9dc524da49f553dc7`.
* All is now set up. There is no need to download and install any additional packages or data files.
### JOWO 2019 Slides
* [Part 1](https://github.com/bio-ontology-research-group/ontology-tutorial/blob/master/slides/jowo-2019-part1.pdf)
* [Part 2](https://github.com/bio-ontology-research-group/ontology-tutorial/blob/master/slides/jowo-2019-part2.pdf)
## Past events
Parts of the material in this repository were taught at
* ECCB 2016 (Imane Boudellioua, Robert Hoehndorf, Paul Schofield, Luke Slater)
* ISMB 2017 (Michel Dumontier, Robert Hoehndorf)
* ISMB 2018 (Michel Dumontier, Robert Hoehndorf)
* University of Cambridge, Bioinformatics Training Program, 2018 (Robert Hoehndorf, Paul Schofield)
* [ICBO 2019](https://sites.google.com/view/icbo2019/home), 2019 (Robert Hoehndorf)
* [JOWO 2019](https://www.iaoa.org/jowo/2019/), 2019 (Robert Hoehndorf, Maxat Kulmanov)
* [CCBOT 2019](https://www.iaoa.org/jowo/2019/), 2019 (Robert Hoehndorf)
## Overview
Ontologies have long provided a core foundation in the organization of biomedical entities, their attributes, and their relationships. With over 500 biomedical ontologies currently available there are a number of new and exciting new opportunities emerging in using ontologies for large scale data sharing and data analysis. This tutorial will help you understand what ontologies are and how they are being used in computational biology and bioinformatics.
*Intended audience and level*: The tutorial will be of interest to any researcher who will use or produce large structured datasets in computational biology. The tutorial will be at an intermediate level and will describe current research directions and challenges. A particular focus will be given on the use of ontologies to compute semantic similarity, and the use of ontologies in machine learning.
# Learning objectives
This is an intermediate-level course to ontologies and ontology-based data analysis in bioinformatics. In this tutorial, participants will learn:
* what ontologies are and where to find them (briefly)
* how to understand and use ontology semantics through automated reasoning
* how to measure semantic similarity
* how to combine ontologies and deep learning
* how to incorporate ontologies and semantic similarity measures in bioinformatics analyses
# Before the tutorial (important)
The tutorial will contain a hands-on part. If you want to
participate (instead of just watching the presentation), please install the required software locally or use our Docker image (preferred/faster).
## Local installation on your computer:
Download
and install Jupyter Notebook (http://jupyter.org/) with a SciJava kernel (follow instructions [here](https://github.com/scijava/scijava-jupyter-kernel)), and _run_ the first cell in https://github.com/bio-ontology-research-group/ontology-tutorial/raw/master/ontology-analysis.ipynb (on Jupyter). This will download the required dependencies (OWLAPI, ELK,
SML) which are quite large. You must also download our data package
from
[here](http://aber-owl.net/aber-owl/diseasephenotypes/ontology/ontology-tutorial.tar.gz),
[here](http://aber-owl.net/aber-owl/diseasephenotypes/ontology/embeddings-data.tar.gz)
and for the last part of the tutorial some vectors from [here](http://jagannath.pdn.cam.ac.uk/tutorial/phenome-vec-small.txt.gz).
It is fine to skip this step and still follow the tutorial, but if you
want to play with the methods yourself, and go away with some running code examples that you can build on, downloading and running the code is necessary.
Detailed instructions:
* Download Jupyter Notebook from http://jupyter.org/ and install
* Install the SciJava Jupyter kernel following instructions on
https://github.com/scijava/scijava-jupyter-kernel
* Install dependencies with `conda install --file requirements.txt`
* Download the [Jupyter Notebook file](https://github.com/bio-ontology-research-group/ontology-tutorial/blob/master/ontology-analysis.ipynb) ([direct download](https://github.com/bio-ontology-research-group/ontology-tutorial/raw/master/ontology-analysis.ipynb)): and store on your disk.
* Run Jupyter Notebook using `jupyter notebook`
* This will open a web browser, or browser window, with the Jupyter environment.
* We have received some reports of memory problems. To resolve them, try running `JAVA_OPTS="-Xmx12G" jupyter notebook` or `_JAVA_OPTIONS="-Xmx12G" jupyter notebook` to set allowed memory for jupyter to 12GB (adjust for your particular environment).
* In your browser, find the ontology-analysis.ipynb file and open
* In the first Groovy box, press Shift+Return
* Depending on your Internet connection, this may take some time!
* This code will download the libraries necessary to run the remaining code.
* Download the [data package](http://aber-owl.net/aber-owl/diseasephenotypes/ontology/ontology-tutorial.tar.gz) and store on your disk. Unzip it with gunzip: `tar xvzf ontology-tutorial.tar.gz`.
* Download the [EL-Embeddings data](http://aber-owl.net/aber-owl/diseasephenotypes/ontology/embeddings-data.tar.gz) and store on your disk. Unzip it with unzip: `tar xvzf embeddings-data.tar.gz`.
* Download the [ontology embeddings](http://jagannath.pdn.cam.ac.uk/tutorial/phenome-vec-small.txt.gz) and store on your disk (ideally in the `/misc` subdirectory.
## Using the Docker image:
* Download and install [Docker](https://www.docker.com).
* Assign at least 8 GB (better 10 or 12GB) to the Docker engine after the installation. (the following is required in the Mac OSX version: Docker -> Preferences -> Advanced -> Memory followed by `Apply & Restart`)
* Pull the tutorial image: `altermeister/bio-ontology-ontology-tutorial-docker:latest`, i.e. in Linux/OSX using a terminal:
`docker pull altermeister/bio-ontology-ontology-tutorial-docker:latest`
* Run the image and jump directly into the Jupyter notebook:
`docker run -i -t -p 8888:8888 altermeister/bio-ontology-ontology-tutorial-docker /bin/bash -c "source activate java_env && export JAVA_OPTS=-Xmx12G && _JAVA_OPTIONS=-Xmx12G jupyter notebook --notebook-dir=/home/bioonto/ontology-tutorial/ --ip='0.0.0.0' --port=8888 --no-browser"`
* After the notebook started, copy the address and the token and paste it into you web browser. The URL should look *similar* to the following: `127.0.0.1:8888/?token=f14e6316a48016b2cf4cbed5dd7b89d9dc524da49f553dc7`.
* All is now set up. There is no need to download and install any additional packages or data files. Just step through the Groovy boxes.
### To copy a file from or to a running docker image:
To copy a file from the running docker image to you local (host) computer, please use the following recepie:
1) Find out the ID of the running container: Exceute `docker container list` in a terminal. The result should look similar to the following:
```
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0cd1f8da3c1f altermeister/bio-ontology-ontology-tutorial-docker "/usr/bin/tini -- /b…" 9 seconds ago Up 7 seconds 0.0.0.0:8888->8888/tcp pedantic_mendeleev
```
2) Copy the corresponding container ID (in this example `0cd1f8da3c1f`) and in a terminal copy a file using the following command:
```docker cp 0cd1f8da3c1f:/home/bioonto/ontology-tutorial/phenomenet-inferred.owl .```
The command has the following form:
`docker cp : ` or `docker cp :