Giter Site home page Giter Site logo

biomedical-knowledge-graph's Introduction

Biomedical-knowledge-graph -- TypeDB (Uniprot example)

This is a summer remote project (extended to term-time) by Kin Chao ([email protected], a second year Chemistry student at Imperial College), supervised by Dr Sarah Rouse ([email protected], Life Science Department, Imperial College). Some of the codes are forked from BioGrakn Covid.

Latest update 24/10/2021 - Complete integration of the Uniprot dataset

Installation guide

Prerequesites: Python >3.6, TypeDB Core 2.4.0, TypeDB Python Client API 2.2.0, Workbase 2.4.0 (typeDB Studio).

Clone this repo:

    https://github.com/KinChao/Biomedical-knowledge-graph.git

cd into the typedb-all folder and start typedb

   typedb server

cd into the project folder and start the migrator script

    python migrator.py -n 4 # insert using 4 threads

If the database already existed, use the following code instead

    python migrator.py -n 4 -f TRUE

For help with the migrator script command line options:

    python migrator.py -h

Uniprot dataset glossary

# $t isa transcript, has 'ensembl-transcript-stable-id' 
# $p isa protein, has 'uniprot-name', 'uniprot-name', 'function-description', 'uniprot-entry-name'
# $g isa gene, has 'gene-symbol', 'entrez-id' 
# $h isa organism, has 'organism-name' 
# (translating-transcript:$t, translated-protein: $p) isa translation 
# (transcribing-gene: $g, encoded-transcript:$t) isa transcription 
# (associated-organism: $h, associating: $p) isa organism-association 
# (encoding-gene: $g, encoded-protein: $p) isa gene-protein-encoding 

Examples query with typeDB Workbase

#Retrun the encoded protein with the encoding gene symbol "YWHAG"

match
$g isa gene, has gene-symbol "YWHAG";
$p isa protein;
$1 ($g, $p) isa gene-protein-encoding;

Query 1

#Get the translated-protein and the transcribing-gene with the 'ensembl-transcript-stable-id' of 'ENST00000307630'

match
$t isa transcript, has ensembl-transcript-stable-id "ENST00000307630";
$p isa protein;
$1 ($t, $p) isa translation; 
$g isa gene;
$2 ($t, $g) isa transcription;

Query 2

biomedical-knowledge-graph's People

Contributors

kinchao 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.