This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Getting the highest taxonomy in the HOG database for a given OMA gene id

I am trying to find how conserved a given gene is using the OMA database. I have a list of 500 genes and for each gene, I want to identify the last ancestor that has the HOG family a given gene belongs to? Does anybody know how do I go about doing that?

  • Yogesh
oma orthologs hog

1 answer

There are several options. One way is to use the REST API. If you use e.g. P53_RAT as an input sequence:

https://omabrowser.org/api/hog/P53_RAT/?level=root

You can see that the level is Chordata (in the current Dec 2018 release).

If you use Python, you can use the omadb package

$ pip install omadb

import omadb
from omadb import Client 
c = Client() 
c.hogs[c.hogs['P53_RAT'].roothog_id].level

Alternatively, still in Python, you could use the pyHam library for this (https://github.com/DessimozLab/pyham), and load the HOGs dynamically from the OMA browser (or from an OrthoXML file):

import pyham

my_gene_query = 'P53_RAT' 
pyham_analysis = pyham.Ham(query_database=my_gene_query, use_data_from='oma')
pyham_analysis.get_list_top_level_hogs()[0].genome.name

If you use the R, you can use our package OmaDB:

install.packages('devtools')
library(devtools)
install_github('dessimozlab/omadb')

library(OmaDB)
getHOG(id = 'P53_RAT', level='root')$level

Log in to answer this question.