mfitzp / biocyc Goto Github PK
View Code? Open in Web Editor NEWA Python interace to the BioCyc Web API
Home Page: https://www.mfitzp.com/tools/biocyc/
License: MIT License
A Python interace to the BioCyc Web API
Home Page: https://www.mfitzp.com/tools/biocyc/
License: MIT License
When trying the get method from the example:
o=biocyc.get('L-LACTATE')
o
I got the following error:
--------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-29-468f9bab9082> in <module>()
----> 1 o=biocyc.get('L-arginine')
2 o
~\--\biocyc\biocyc.py in get(self, ids, skip_cache)
397
398 def get(self, ids, skip_cache=False):
--> 399 return self.get_for_org(self.org_id, ids, skip_cache=skip_cache)
400
401 def get_for_org(self, org_id, ids, skip_cache=False):
~\--\biocyc\biocyc.py in get_for_org(self, org_id, ids, skip_cache)
423 if obj is None:
424 xml = self.request_obj(org_id, id)
--> 425 obj = self.create_obj_from_xml(id, xml)
426 self.cache(obj) # Will cache either a real object, or a BioCycEntityNotFound
427
~\--\biocyc\biocyc.py in create_obj_from_xml(self, id, xml)
442 for o in AVAILABLE_OBJECT_TYPES:
443 if o.xml_schema_id:
--> 444 x = xml.find(o.xml_schema_id)
445 if x: # Found it
446 # Create the base object, populating from the xml
AttributeError: 'bool' object has no attribute 'find'
Settings:
3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 10:22:32) [MSC v.1900 64 bit (AMD64)]
Maybe some sourcecode of BioCyc changed?
Hi, Thanks for this tool, I've been using it a lot :)
I tried to get the pathways for the ECOLI gene 'G7145' (the gene name is preT)
(I was able to get the pathways for many other genes but this one has a problem)
I can get the gene info using:
from biocyc import biocyc os.environ['http_proxy'] = '' # Set your proxy if neccessary biocyc.set_organism('ECOLI') gene_info = biocyc.get('G7145')
but when I try to get the pathways I get this error:
AttributeError Traceback (most recent call last)
in
2 for gene_name in noisy_gene_names:
3 gene_info = biocyc.get(get_biocyc_gene_ID(gene_name))
----> 4 noisy_gene_pathway[gene_name] = gene_info.pathways
5
~\Anaconda3\lib\site-packages\biocyc\biocyc.py in pathways(self)
991 @Property
992 def pathways(self):
--> 993 return self.protein.pathways
994
995
~\Anaconda3\lib\site-packages\biocyc\biocyc.py in pathways(self)
960 # In case we're a subunit
961 for c in self.complexes:
--> 962 pathway_lists += [er.reaction.pathways for er in c.catalyzes]
963 return [p for pl in pathway_lists for p in pl]
964
~\Anaconda3\lib\site-packages\biocyc\biocyc.py in (.0)
960 # In case we're a subunit
961 for c in self.complexes:
--> 962 pathway_lists += [er.reaction.pathways for er in c.catalyzes]
963 return [p for pl in pathway_lists for p in pl]
964
~\Anaconda3\lib\site-packages\biocyc\biocyc.py in reaction(self)
871 @Property
872 def reaction(self):
--> 873 return biocyc.get_for_org( self.org_id, self._reaction )
874
875 @Property
~\Anaconda3\lib\site-packages\biocyc\biocyc.py in get_for_org(self, org_id, ids, skip_cache)
420 if obj is None:
421 xml = self.request_obj(org_id, id)
--> 422 obj = self.create_obj_from_xml(id, xml)
423 self.cache(obj) # Will cache either a real object, or a BioCycEntityNotFound
424
~\Anaconda3\lib\site-packages\biocyc\biocyc.py in create_obj_from_xml(self, id, xml)
439 for o in AVAILABLE_OBJECT_TYPES:
440 if o.xml_schema_id:
--> 441 x = xml.find(o.xml_schema_id)
442 if x: # Found it
443 # Create the base object, populating from the xml
AttributeError: 'bool' object has no attribute 'find'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.