Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Atomizer errors on level 3 SBML #7

Open
alubbock opened this issue Oct 23, 2019 · 1 comment
Open

Atomizer errors on level 3 SBML #7

alubbock opened this issue Oct 23, 2019 · 1 comment

Comments

@alubbock
Copy link

Atomizer fails with the following error when I try to run it on a small SBML level 3 model:

Traceback (most recent call last):
  File "<string>", line 68, in <module>
  File "<string>", line 58, in main
  File "/Users/travis/build/rhclark/atomizer/build/sbmlTranslator/out00-PYZ.pyz/libsbml2bngl", line 542, in analyzeFile
  File "/Users/travis/build/rhclark/atomizer/build/sbmlTranslator/out00-PYZ.pyz/libsbml2bngl", line 673, in analyzeHelper
  File "/Users/travis/build/rhclark/atomizer/build/sbmlTranslator/out00-PYZ.pyz/sbml2bngl", line 903, in getReactions
  File "/Users/travis/build/rhclark/atomizer/build/sbmlTranslator/out00-PYZ.pyz/sbml2bngl", line 699, in reduceComponentSymmetryFactors
TypeError: append() takes exactly one argument (2 given)

Here's the SBML model:

<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level3/version2/core" level="3" version="2">
  <model name="export-test">
    <listOfCompartments>
      <compartment id="default" spatialDimensions="3" size="1" constant="true"/>
    </listOfCompartments>
    <listOfSpecies>
      <species id="__s0" name="A()" compartment="default" initialAmount="0" hasOnlySubstanceUnits="true" boundaryCondition="false" constant="false"/>
    </listOfSpecies>
    <listOfParameters>
      <parameter id="kf" name="kf" value="100" constant="true"/>
    </listOfParameters>
    <listOfReactions>
      <reaction id="r0" name="r1" reversible="false">
        <listOfProducts>
          <speciesReference species="__s0" constant="true"/>
        </listOfProducts>
        <kineticLaw>
          <math xmlns="http://www.w3.org/1998/Math/MathML">
            <ci> kf </ci>
          </math>
        </kineticLaw>
      </reaction>
    </listOfReactions>
  </model>
</sbml>

Here's the same model encoded as SBML level 2, which works on atomizer without error:

<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level2/version4" level="2" version="4">
  <model name="export-test">
    <listOfCompartments>
      <compartment id="default" size="1"/>
    </listOfCompartments>
    <listOfSpecies>
      <species id="__s0" name="A()" compartment="default" initialAmount="0" hasOnlySubstanceUnits="true"/>
    </listOfSpecies>
    <listOfParameters>
      <parameter id="kf" name="kf" value="100"/>
      <parameter id="parameterId_0" constant="false"/>
    </listOfParameters>
    <listOfReactions>
      <reaction id="r0" name="r1" reversible="false" fast="false">
        <listOfProducts>
          <speciesReference species="__s0">
            <stoichiometryMath>
              <math xmlns="http://www.w3.org/1998/Math/MathML">
                <ci> parameterId_0 </ci>
              </math>
            </stoichiometryMath>
          </speciesReference>
        </listOfProducts>
        <kineticLaw>
          <math xmlns="http://www.w3.org/1998/Math/MathML">
            <ci> kf </ci>
          </math>
        </kineticLaw>
      </reaction>
    </listOfReactions>
  </model>
</sbml>

Both models were exported from Python LibSBML.

@ASinanSaglam
Copy link
Contributor

I will take a look at this as soon as I can, thank you for both opening the issue and the example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants