Commit f6e6b319 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '1305-global-kinetic-parameters' into 'devel_15.0.x'

constant is required in kinetc parameters

See merge request !1211
parents b6bc3ffa 372a1cec
Pipeline #29139 passed with stage
in 10 minutes and 48 seconds
......@@ -9,6 +9,8 @@ minerva (15.0.2) stable; urgency=medium
* Bug fix: coordinates of children in compact complexes in CellDesigner were
wrong (#1304)
* Bug fix: user data overlays were not removed when user was deleted (#1301)
* Bug fix: kinetic parameters exported to SBML created invalid SBML file
(#1305)
-- Piotr Gawron <piotr.gawron@uni.lu> Mon, 29 Jun 2020 11:00:00 +0200
......
......@@ -17,19 +17,20 @@ public class SbmlParameterExporter {
}
public void exportParameter(org.sbml.jsbml.Model result) {
for (SbmlParameter unit : minervaModel.getParameters()) {
result.addParameter(createParameter(unit));
for (SbmlParameter parameter : minervaModel.getParameters()) {
result.addParameter(createParameter(parameter));
}
}
private Parameter createParameter(SbmlParameter unit) {
private Parameter createParameter(SbmlParameter parameter) {
Parameter result = new Parameter();
result.setName(unit.getName());
result.setValue(unit.getValue());
result.setId(unit.getParameterId());
if (unit.getUnits() != null) {
result.setUnits(unit.getUnits().getUnitId());
result.setName(parameter.getName());
result.setValue(parameter.getValue());
result.setId(parameter.getParameterId());
if (parameter.getUnits() != null) {
result.setUnits(parameter.getUnits().getUnitId());
}
result.setConstant(true);
return result;
}
......
......@@ -29,6 +29,7 @@ public class SbmlValidationTests extends SbmlTestFunctions {
result.add(new Object[] { "testFiles/small/empty.xml" });
result.add(new Object[] { "testFiles/small/problematic_notes.xml" });
result.add(new Object[] { "testFiles/small/reaction/dissociation.xml" });
result.add(new Object[] { "testFiles/cell_designer_problems/kinetics.xml" });
return result;
}
......
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level2/version4" xmlns:celldesigner="http://www.sbml.org/2001/ns/celldesigner" level="2" version="4">
<model metaid="untitled" id="untitled">
<annotation>
<celldesigner:extension>
<celldesigner:modelVersion>4.0</celldesigner:modelVersion>
<celldesigner:modelDisplay sizeX="600" sizeY="400"/>
<celldesigner:listOfIncludedSpecies>
</celldesigner:listOfIncludedSpecies>
<celldesigner:listOfCompartmentAliases/>
<celldesigner:listOfComplexSpeciesAliases>
</celldesigner:listOfComplexSpeciesAliases>
<celldesigner:listOfSpeciesAliases>
</celldesigner:listOfSpeciesAliases>
<celldesigner:listOfGroups/>
<celldesigner:listOfProteins>
</celldesigner:listOfProteins>
<celldesigner:listOfGenes/>
<celldesigner:listOfRNAs/>
<celldesigner:listOfAntisenseRNAs/>
<celldesigner:listOfLayers/>
<celldesigner:listOfBlockDiagrams/>
</celldesigner:extension>
</annotation>
<listOfUnitDefinitions>
<unitDefinition metaid="substance" id="substance" name="substance">
<listOfUnits>
<unit metaid="CDMT00008" kind="mole"/>
</listOfUnits>
</unitDefinition>
<unitDefinition metaid="volume" id="volume" name="volume">
<listOfUnits>
<unit metaid="CDMT00009" kind="litre"/>
</listOfUnits>
</unitDefinition>
<unitDefinition metaid="area" id="area" name="area">
<listOfUnits>
<unit metaid="CDMT00010" kind="metre" exponent="2"/>
</listOfUnits>
</unitDefinition>
<unitDefinition metaid="length" id="length" name="length">
<listOfUnits>
<unit metaid="CDMT00011" kind="metre"/>
</listOfUnits>
</unitDefinition>
<unitDefinition metaid="time" id="time" name="time">
<listOfUnits>
<unit metaid="CDMT00012" kind="second"/>
</listOfUnits>
</unitDefinition>
</listOfUnitDefinitions>
<listOfCompartments>
<compartment metaid="default" id="default" size="1" units="volume"/>
</listOfCompartments>
<listOfSpecies>
</listOfSpecies>
<listOfParameters>
<parameter metaid="kc1" id="kc1" name="kinetik_c1" value="1" units="substance"/>
<parameter metaid="kc2" id="kc2" name="kinetic_test" value="1" units="substance" constant="false"/>
</listOfParameters>
<listOfReactions>
</listOfReactions>
</model>
</sbml>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment