Forums

F.A.Q. F.A.Q.    Register Register    Login Login    Home Home
Search Search
SBML Discussions » libsbml-development » [python-libsbml]how to get reactant/product from a reaction?
Show: Today's Posts  :: Message Navigator
| Subscribe to topic 
Return to the default flat view Create a new topic Submit Reply
AuthorTopic
tlytiger


Posts: 1
Registered:
April 2012
[python-libsbml]how to get reactant/product from a reaction? 16 Apr '12 02:03 Go to previous message


I have a human SBML files(Recon 1) from BiGG database, and I want to extract reactant and product id in reactions.I tried the following code, but it didn't work:----- reader = SBMLReader() doc = reader.readSBML([filename]) model = doc.getModel() Reactions = model.getListOfReactions() for reaction in Reactions: products=reaction.getListOfProducts() for product in products: print product.getId()----There is no result for all reactions. When I tried 'reaction.getId()', I could get the id of a reaction, but it doesnot work in species. I think get product and reactant from a reaction mast be a simple task in libSBML. Anyone knows how to do this in python-libsbml? Thank you for your help.

      

SubjectPosterDate
Read Message   [python-libsbml]how to get reactant/product from a...  tlytiger16 Apr '12 02:03
Read Message   Re: [python-libsbml]how to get reactant/product fr... Sarah Keating16 Apr '12 02:55
Previous Topic:Standardising #if and #if defined
Next Topic:PyDev: Unresolved import: libsbml
Go to forum:
-=] Back to Top [=-

Powered by FUDforum. (Copyright Advanced Internet Designs Inc.)

Please use our issue tracking system for any questions or suggestions about this website.