Convert SBML 3 into SBML 2

302 views
Skip to first unread message

Izal

unread,
Feb 12, 2018, 5:24:25 AM2/12/18
to sbml-discuss
Hi everyone!

Is there a way/tool to convert SBML level 3 into a SBML level 2? I try in http://sbml.org/Downloads and test some, but I don't know how to obtain level 2 from a level 3.


My problem is that I downloaded from BiGG database a curate SBML model level 3, but I have problems to use it with a software, because It uses SBML level 2 who header is like this:

""" SBML THAT WORKS OK WITH SOFTWARE
<?xml version="1.0" encoding="UTF-8"?>
<sbml level="2" version="1" >
<model id="MyModel" name="mymodel" >
"""


However, my model begins like this:

""" SBML DOWNLOADED THAT DOESN'T WORKS OK WITH THE SOFTWARE
<?xml version='1.0' encoding='utf-8' standalone='no'?>
<!-- Created by ModelPolisher version 1.7 on 2017-05-08 at 23:05:41 PDT with JSBML version 1.2. -->
<sbml xmlns="http://www.sbml.org/sbml/level3/version1/core" fbc:required="false" groups:required="false" level="3" sboTerm="SBO:0000121" version="1"
xmlns:fbc="http://www.sbml.org/sbml/level3/version1/fbc/version2" xmlns:groups="http://www.sbml.org/sbml/level3/version1/groups/version1">
<notes>
<body xmlns="http://www.w3.org/1999/xhtml" style="font-size: 14px; height: 100%; width: 100%; color: #444444; font-family:Helvetica, sans-serif; margin-top: 0px; margin-left: 0px;">
"""



The software print an error because tags in listOfReactions are diferent.


""" SBML THAT WORKS OK WITH SOFTWARE
<listOfReactions>
<reaction id="R_12DGR120tipp" name="R_1_2_diacylglycerol_transport_via_flipping__periplasm_to_cytoplasm__n_C120_" reversible="false">
<notes>
<html:p>GENE_ASSOCIATION: </html:p>
<html:p>PROTEIN_ASSOCIATION: </html:p>
<html:p>SUBSYSTEM: S_Transport__Inner_Membrane</html:p>
<html:p>PROTEIN_CLASS: </html:p>
</notes>
<listOfReactants>
<speciesReference species="M_12dgr120_p" stoichiometry="1.000000"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="M_12dgr120_c" stoichiometry="1.000000"/>
</listOfProducts>
<kineticLaw>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<ci> FLUX_VALUE </ci>
</math>
<listOfParameters>
<parameter id="LOWER_BOUND" value="0.000000" units="mmol_per_gDW_per_hr"/>
<parameter id="UPPER_BOUND" value="999999.000000" units="mmol_per_gDW_per_hr"/>
<parameter id="OBJECTIVE_COEFFICIENT" value="0.000000"/>
<parameter id="FLUX_VALUE" value="0.000000" units="mmol_per_gDW_per_hr"/>
<parameter id="REDUCED_COST" value="0.000000"/>
</listOfParameters>
</kineticLaw>
</reaction>
"""



""" SBML DOWNLOADED THAT DOESN'T WORKS OK WITH THE SOFTWARE
<listOfReactions>
<reaction fast="false" fbc:lowerFluxBound="cobra_0_bound" fbc:upperFluxBound="cobra_default_ub" id="R_DM_4crsol_c" metaid="R_DM_4crsol_c" name="Sink needed to allow p-Cresol to leave system"
reversible="false" sboTerm="SBO:0000628">
<annotation xmlns:sbml="http://www.sbml.org/sbml/level3/version1/core">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/">
<rdf:Description rdf:about="#R_DM_4crsol_c">
<bqbiol:is>
<rdf:Bag>
<rdf:li rdf:resource="http://identifiers.org/bigg.reaction/4crsol" />
</rdf:Bag>
</bqbiol:is>
</rdf:Description>
</rdf:RDF>
</annotation>
<listOfReactants>
<speciesReference constant="true" sboTerm="SBO:0000010" species="M_4crsol_c" stoichiometry="1" />
</listOfReactants>
</reaction>
"""

Thanks in advanced!!

Izal

Matthias König

unread,
Feb 12, 2018, 5:52:37 AM2/12/18
to sbml-d...@googlegroups.com
Hi Izal,

could you state which software and what you try to do with the model? Do you want to run FBA?

One solution could be to switch to currently maintained software having the features you want and supporting SBML L3.
There is lots of information in the additional L3 packages in BiGG models, e.g., groups information and the fbc-v2 version.
Probably a better (long term solution is to switch to a different software). E.g. cobrapy is supporting BiGG models very well and has no problems with L3.
Not wanting to make advertisement here, but using SBML L3 with maintained software will save you many headaches and make your models state of the art.

SBML L3 was released more than 7 years ago, if the respective software did not manage an update in the meanwhile it is not very likely that other things will be updated.
So I highly recommend to use SBML L3 and switch your software stack.

Best Matthias



Izal

--
You received this message because you are subscribed to the Google Groups "sbml-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sbml-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to sbml-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sbml-discuss/eb18ca70-d372-4222-ad23-14d164a17cc2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Matthias König, PhD.
Junior Group Leader LiSyM - Systems Medicine of the Liver
Humboldt Universität zu Berlin, Institute of Biology, Institute for Theoretical Biology
  https://livermetabolism.com
koni...@googlemail.com

Brett Olivier

unread,
Feb 12, 2018, 6:20:15 AM2/12/18
to sbml-discuss
Dear Izal

As Matthias mentioned it would be a good idea to see if there is an updated version of the tool you are using. Another alternative is to try CBMPy (http://cbmpy.sourceforge.net/) which reads/writes all SBML 3 FBC versions as well as the old COBRA format. libSBML also supports conversions between these formats if you want to go that route.

HTH
Brett

Izal

unread,
Feb 13, 2018, 4:10:52 AM2/13/18
to sbml-discuss
Hi Matthias, Brett, 

I am very grateful for your help, it was of great help!

Best Izal,  

Nicolas Le Novere

unread,
Feb 13, 2018, 12:34:44 PM2/13/18
to sbml-d...@googlegroups.com
Hello,

The Systems Biology Format Converter provides conversion between SBML L3 and L2 using libSBML.
http://sbfc.sourceforge.net/mediawiki/index.php/Main_Page

An online interface can be found at:
https://www.ebi.ac.uk/biomodels/tools/converters/

On 12/02/18 11:20, Brett Olivier wrote:
> Dear Izal
>
> As Matthias mentioned it would be a good idea to see if there is an updated version of the tool you are using. Another alternative is to try CBMPy (http://cbmpy.sourceforge.net/) which reads/writes all SBML 3 FBC versions as well as the old COBRA format. libSBML also supports conversions between these formats if you want to go that route.
>
> HTH
> Brett
>
> On Monday, February 12, 2018 at 11:24:25 AM UTC+1, Izal wrote:
>
> Hi everyone!
>
> Is there a way/tool to convert SBML level 3 into a SBML level 2? I try in http://sbml.org/Downloads and test some, but I don't know how to obtain level 2 from a level 3.
>
>
> My problem is that I downloaded from BiGG database a curate SBML model level 3, but I have problems to use it with a software, because It uses SBML level 2 who header is like this:
>
> """ SBML THAT WORKS OK WITH SOFTWARE
> <?xml version="1.0" encoding="UTF-8"?>
> <sbml level="2" version="1" >
>     <model id="MyModel" name="mymodel" >
> """
>
>
> However, my model begins like this:
>
> """ SBML DOWNLOADED THAT DOESN'T WORKS OK WITH THE SOFTWARE
> <?xml version='1.0' encoding='utf-8' standalone='no'?>
> <!-- Created by ModelPolisher version 1.7 on 2017-05-08 at 23:05:41 PDT with JSBML version 1.2. -->
> <sbml xmlns="http://www.sbml.org/sbml/level3/version1/core <http://www.sbml.org/sbml/level3/version1/core>" fbc:required="false" groups:required="false" level="3" sboTerm="SBO:0000121" version="1"
> xmlns:fbc="http://www.sbml.org/sbml/level3/version1/fbc/version2 <http://www.sbml.org/sbml/level3/version1/fbc/version2>" xmlns:groups="http://www.sbml.org/sbml/level3/version1/groups/version1 <http://www.sbml.org/sbml/level3/version1/groups/version1>">
>   <notes>
>     <body xmlns="http://www.w3.org/1999/xhtml <http://www.w3.org/1999/xhtml>" style="font-size: 14px; height: 100%; width: 100%; color: #444444; font-family:Helvetica, sans-serif; margin-top: 0px; margin-left: 0px;">
> """
>
>
>
> The software print an error because tags in listOfReactions are diferent.
>
>
> """ SBML THAT WORKS OK WITH SOFTWARE
> <listOfReactions>
>         <reaction id="R_12DGR120tipp" name="R_1_2_diacylglycerol_transport_via_flipping__periplasm_to_cytoplasm__n_C120_" reversible="false">
>                 <notes>
>                         <html:p>GENE_ASSOCIATION: </html:p>
>                         <html:p>PROTEIN_ASSOCIATION: </html:p>
>                         <html:p>SUBSYSTEM: S_Transport__Inner_Membrane</html:p>
>                         <html:p>PROTEIN_CLASS: </html:p>
>                 </notes>
>                 <listOfReactants>
>                         <speciesReference species="M_12dgr120_p" stoichiometry="1.000000"/>
>                 </listOfReactants>
>                 <listOfProducts>
>                         <speciesReference species="M_12dgr120_c" stoichiometry="1.000000"/>
>                 </listOfProducts>
>                 <kineticLaw>
>                         <math xmlns="http://www.w3.org/1998/Math/MathML <http://www.w3.org/1998/Math/MathML>">
>   <ci> FLUX_VALUE </ci>
>                         </math>
>                         <listOfParameters>
>   <parameter id="LOWER_BOUND" value="0.000000" units="mmol_per_gDW_per_hr"/>
>   <parameter id="UPPER_BOUND" value="999999.000000" units="mmol_per_gDW_per_hr"/>
>   <parameter id="OBJECTIVE_COEFFICIENT" value="0.000000"/>
>   <parameter id="FLUX_VALUE" value="0.000000" units="mmol_per_gDW_per_hr"/>
>   <parameter id="REDUCED_COST" value="0.000000"/>
>                         </listOfParameters>
>                 </kineticLaw>
>         </reaction>
> """
>
>
>
> """ SBML DOWNLOADED THAT DOESN'T WORKS OK WITH THE SOFTWARE
>     <listOfReactions>
>       <reaction fast="false" fbc:lowerFluxBound="cobra_0_bound" fbc:upperFluxBound="cobra_default_ub" id="R_DM_4crsol_c" metaid="R_DM_4crsol_c" name="Sink needed to allow p-Cresol to leave system"
>       reversible="false" sboTerm="SBO:0000628">
>         <annotation xmlns:sbml="http://www.sbml.org/sbml/level3/version1/core <http://www.sbml.org/sbml/level3/version1/core>">
>           <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns# <http://www.w3.org/1999/02/22-rdf-syntax-ns#>" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/ <http://biomodels.net/biology-qualifiers/>">
>             <rdf:Description rdf:about="#R_DM_4crsol_c">
>               <bqbiol:is>
>                 <rdf:Bag>
>                   <rdf:li rdf:resource="http://identifiers.org/bigg.reaction/4crsol <http://identifiers.org/bigg.reaction/4crsol>" />
>                 </rdf:Bag>
>               </bqbiol:is>
>             </rdf:Description>
>           </rdf:RDF>
>         </annotation>
>         <listOfReactants>
>           <speciesReference constant="true" sboTerm="SBO:0000010" species="M_4crsol_c" stoichiometry="1" />
>         </listOfReactants>
>       </reaction>
> """
>
> Thanks in advanced!!
>
> Izal
>
> --
> You received this message because you are subscribed to the Google Groups "sbml-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sbml-discuss...@googlegroups.com <mailto:sbml-discuss...@googlegroups.com>.
> To post to this group, send email to sbml-d...@googlegroups.com <mailto:sbml-d...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sbml-discuss/384a6864-c5ac-437b-8e54-bdc42d18a1c7%40googlegroups.com <https://groups.google.com/d/msgid/sbml-discuss/384a6864-c5ac-437b-8e54-bdc42d18a1c7%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.


--
Nicolas LE NOVERE, Babraham Institute, Babraham Campus Cambridge, CB22 3AT
Tel: +441223496433 Mob:+447833147074
orcid.org//0000-0002-6309-7327 http://lenoverelab.org/


Reply all
Reply to author
Forward
0 new messages