This is a test version of Biostars. For the public version, visit https://www.biostars.org.
check if my gene name exists in Kegg pathway

Hi guys, please help me,

I use bioservices package , when I import a gene name that kegg cannot recognize it... the error is :

if 'PATHWAY' in dic.keys(): AttributeError: 'int' object has no attribute 'keys'

I wrote an if statement, but the same error has occurred. where I'm doing wrong?

This question is related to my previous post : C: retrieving pathways belong to my gene names

Thanks.

kegg python bioservices

Can you show the full code? dic seems to be an int not a dict so it doesn't have keys.

Hello EFN,

Please use the formatting bar (especially the code option) to present your post better. I've done it for you this time.
code_formatting

Thank you!

that is a generic error by bioservices if it doesn't find a matching ID. Following code in bioservices/kegg.py is the problem:

 920         res = self.get(":".join([organism, gene]))
 921         dic = self.parse(res)
 922         if 'PATHWAY' in dic.keys():
 923             return dic['PATHWAY']
 924         else:
 925             self.logging.info("No pathway found ?")

thank you, so greateful, your advice were always instructive for me

Thank you! I usually work by bioservices, how can i connect to them myself?

via github dev channel @EFN

0 answers

No answers yet.

Log in to answer this question.