Forums

F.A.Q. F.A.Q.    Register Register    Login Login    Home Home
Search Search
SBML Discussions » sbml-interoperability » ReferenceSpecies
Show: Today's Posts  :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
AuthorTopic
lyang


Posts: 9
Registered:
June 2006
ReferenceSpecies 28 Jun '06 13:37 Go to next message

I have the difficulty binding Stoichiometry using lisbsbml and java on windows. The object does has the value but the final xml doesn't. Is it a bug or something wrong. I also tested a xml file with some codes below. Theoretically it doesn't change xml structure much but the output doesn't has Stoichiometry attributes either. Any idea?

    SBMLReader reader = new SBMLReader();
    SBMLDocument document = reader.readSBMLFromString(xmlString);
    model = document.getModel();
    SBMLDocument document2 = new SBMLDocument(2);
    document2.setModel(model);
    SBMLWriter sbmlWriter = new SBMLWriter();
    xmlString = sbmlWriter.writeToString(document);


Here is partial of original xml before passing the codes above:
- <listOfReactions>
- <reaction id="Y_clearance">
- <listOfReactants>
  <speciesReference species="Y" stoichiometry="1" /> 
  </listOfReactants>
...


And here is what passed the code
- <listOfReactions>
- <reaction id="Y_clearance">
- <listOfReactants>
  <speciesReference species="Y" /> 
  </listOfReactants>
...


Thank you.

      
Sarah Keating


Posts: 413
Registered:
May 2004
Re: ReferenceSpecies 29 Jun '06 07:43 Go to previous messageGo to next message

Hi

The reason the stoichiometry appears to disappear is that since it defaults
to '1' if a speciesrefernce has a stoichiometry of '1' libSBML does not
write it out explicitly.
Its not lost - it just doesnt need to be there :-)

Sarah


----- Original Message -----
From: "lyang" <lyang@ciit.org>
To: <libsbml-discuss@caltech.edu>
Sent: Wednesday, June 28, 2006 9:52 PM
Subject: [libsbml-discuss] ReferenceSpecies


>
> I have the difficulty binding Stoichiometry using lisbsbml and java on
> windows. The object does has the value but the final xml doesn't. Is it a
> bug or something wrong. I also tested a xml file with some codes below.
> Theoretically it doesn't change xml structure much but the output doesn't
> has Stoichiometry attributes either. Any idea?
>
>
> SBMLReader reader = new SBMLReader();
> SBMLDocument document = reader.readSBMLFromString(xmlString);
> model = document.getModel();
> SBMLDocument document2 = new SBMLDocument(2);
> document2.setModel(model);
> SBMLWriter sbmlWriter = new SBMLWriter();
> xmlString = sbmlWriter.writeToString(document);
>
>
> Here is partial of original xml before passing the codes above:
>
> - <listOfReactions>
> - <reaction id="Y_clearance">
> - <listOfReactants>
> <speciesReference species="Y" stoichiometry="1" />
> </listOfReactants>
> ...
>
>
> And here is what passed the code
>
> - <listOfReactions>
> - <reaction id="Y_clearance">
> - <listOfReactants>
> <speciesReference species="Y" />
> </listOfReactants>
> ...
>
>
> Thank you.
>
>



      
lyang


Posts: 9
Registered:
June 2006
Re: ReferenceSpecies 29 Jun '06 11:04 Go to previous messageGo to next message

Thank you for the reply. I did see some xml file with stoichiometry to be 1. Is there a way to enforce libsbml writes it out? One situation is that If I create xml file using libSBML and the file is parsed by other softwares without using libSBML, what the default value will be interpreted?

lyang

      
Sarah Keating


Posts: 413
Registered:
May 2004
Re: Re: ReferenceSpecies 30 Jun '06 03:09 Go to previous messageGo to next message

Hi Lyang

Unfortunately no - libSBML only writes out the stoichiometry if it is not
the default value of '1'. If other software is *correctly* reading SBML,
whether it uses libSBML or not, then this should not be a problem. The
stoichiometry should default to '1' unless told otherwise.

Sarah

----- Original Message -----
From: "lyang" <lyang@ciit.org>
To: <libsbml-discuss@caltech.edu>
Sent: Thursday, June 29, 2006 7:30 PM
Subject: [libsbml-discuss] Re: ReferenceSpecies


>
> Thank you for the reply. I did see some xml file with stoichiometry to be
> 1. Is there a way to enforce libsbml writes it out? One situation is that
> If I create xml file using libSBML and the file is parsed by other
> softwares without using libSBML, what the default value will be
> interpreted?
>
> lyang
>
>



      
Mike Hucka


Posts: 961
Registered:
October 2003
Re: Re: ReferenceSpecies 30 Jun '06 17:23 Go to previous message

>>>>> On 29 Jun 2006, lyang <lyang@ciit.org> wrote:
lyang> Thank you for the reply. I did see some xml file
lyang> with stoichiometry to be 1. Is there a way to
lyang> enforce libsbml writes it out? One situation is
lyang> that If I create xml file using libSBML and the
lyang> file is parsed by other softwares without using
lyang> libSBML, what the default value will be
lyang> interpreted?

In SBML, the default value of stoichiometry is defined to be
1. A software system must interpret a missing stoichiometry
value as 1; if it doesn't, it's a bug.

MH

--
Mike Hucka, Ph.D. <mhucka@caltech.edu> tel +1.626.395.8128
Senior Research Fellow, Control and Dynamical Systems
Co-director, Biological Network Modeling Center (BNMC)
The Beckman Institute @ The California Institute of Technology

      
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic:trouble installing libsbml on a mac powerbook g4
Next Topic:problems installing 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.