Skip to content

sgrote/OboToTerm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

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"

About

Convert ontology from .obo format to term-tables (old GO MySQL Database Schema)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages