Git Product home page Git Product logo

obototerm's Introduction

OboToTerm

Convert ontology files in .obo format to tables term.txt, term2term.txt and graph_path.txt
from the GO MySQL Database Schema.

Background

Gene Ontology (GO) will at some point no longer provide their ontology in the GO MySQL Database Schema.
The GO enrichment R-package GOfuncR, however, needs the old table format as input.

Since GOfuncR, although primarly used with the Gene Ontology, works with any ontology, this conversion can be useful for other ontologies in .obo format too, e.g. the Human Phenotype Ontology.

Usage

obo_to_term_tables.py has 2 positional arguments: the .obo file and the target directory for the term tables.
Optional --root_nodes need to be defined for other ontologies than Gene Ontology.

Examples

Assuming you saved obo_to_term_tables.py and obo_to_term_functions.py in directory /path/to/script/

  • Download and convert Gene Ontology
wget http://current.geneontology.org/ontology/go-basic.obo
/path/to/script/obo_to_term_tables.py go-basic.obo .
  • Download and convert Human Phenotype Ontology
wget http://purl.obolibrary.org/obo/hp.obo
/path/to/script/obo_to_term_tables.py hp.obo . --root_nodes "All"

obototerm's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

obototerm's Issues

Recursion limit while converting obo file

Hello!
I tried to run your program with the following obo file:
http://purl.obolibrary.org/obo/go.obo
I get a recursion limit error in deepcopy in the function get_all_paths, and checking it more closely there seems to be a cycle in the graph. This is the childList object that crashes while being deepcopied:
[2705, 2820, 10389, 10766, 10502, 22001, 4724, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867, 31197, 2867...

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.