Hi, I am having trobules with the pyham library to access OMA database from python.
#Python3
from omadb import Client
c = Client()
prot_id = 'PADI1_HUMAN'
r = c.proteins[prot_id] # Can also be called as c.proteins.info(prot_id)
import pyham
# Initialise pyHam with a phyloxml tree and orthoXML HOGs
phyloxml_path = "simpleEx.phyloxml"
orthoxml_path3 = "simpleEx.orthoxml"
pyham_analysis = pyham.Ham(phyloxml_path, orthoxml_path3, use_internal_name=True, tree_format='phyloxml')
# Get the hog of interest
hog = pyham_analysis.get_hog_by_id(r['oma_hog_id'])
Using the above code I obtain a
KeyError: ' Id HOG:0374330 cannot match any HOG Id.'
I have tried other proteins with the same problem. I have browsed the website and the HOG ID is apparently correct. The HOG code in the Treeprofile example seems to work:
a='HOG:0355161'
hog = pyham_analysis.get_hog_by_id(a)
Not sure what is happening or where is my mistake.
this is the best name for a package in the history of bioinformatics!