Question: check if my gene name exists in Kegg pathway
0
gravatar for EFN
5 weeks ago by
EFN0
EFN0 wrote:

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.

bioservices kegg python • 179 views
ADD COMMENTlink modified 5 weeks ago by Vijay Lakhujani2.8k • written 5 weeks ago by EFN0
2

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

ADD REPLYlink written 5 weeks ago by Gungor Budak230

Hi, thanks for your response, I attached my previous link which is contained codes, you can find it here : C: retrieving pathways belong to my gene names

ADD REPLYlink modified 4 weeks ago • written 4 weeks ago by EFN0

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!

ADD REPLYlink written 5 weeks ago by Vijay Lakhujani2.8k

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 ?")
ADD REPLYlink modified 5 weeks ago • written 5 weeks ago by cpad01127.7k

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

ADD REPLYlink modified 4 weeks ago • written 4 weeks ago by EFN0
1

@ EFN: I have logged this issue with bioservices (https://github.com/cokelaer/bioservices/issues/125 ). Developers were very responsive and fixed this issue. Please check again if this error crops up and follow it up with bioservices team. They are super responsive.

ADD REPLYlink modified 26 days ago by WouterDeCoster30k • written 26 days ago by cpad01127.7k

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

ADD REPLYlink written 19 days ago by EFN0

via github dev channel @EFN

ADD REPLYlink modified 19 days ago • written 19 days ago by cpad01127.7k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1484 users visited in the last hour