Skip to content
Snippets Groups Projects
Commit 1143e49e authored by Piotr Gawron's avatar Piotr Gawron
Browse files

initial concentration is parsed properly

parent f833c73f
No related branches found
No related tags found
2 merge requests!630WIP: Resolve "The privileges of a new user are not saved in some cases",!494Conversion rest api scaling
......@@ -33,6 +33,7 @@ public class SbmlSpeciesParser extends SbmlElementParser<org.sbml.jsbml.Species>
Class<? extends Species> clazz = SBOTermSpeciesType.getTypeSBOTerm(sboTerm);
try {
Species result = clazz.getConstructor(String.class).newInstance(species.getId());
result.setInitialAmount(species.getInitialAmount());
assignBioEntityData(species, result);
if (layout == null) {
assignCompartment(result, species.getCompartment());
......
......@@ -26,6 +26,7 @@ import lcsb.mapviewer.model.map.species.Phenotype;
import lcsb.mapviewer.model.map.species.ReceptorProtein;
import lcsb.mapviewer.model.map.species.Rna;
import lcsb.mapviewer.model.map.species.SimpleMolecule;
import lcsb.mapviewer.model.map.species.Species;
import lcsb.mapviewer.model.map.species.Unknown;
public class SbmlSpeciesParserTest {
......@@ -144,4 +145,11 @@ public class SbmlSpeciesParserTest {
assertTrue(element instanceof Unknown);
assertEquals(ElementColorEnum.UNKNOWN.getColor(), element.getColor());
}
@Test
public void testParseInitialAmount() throws Exception {
Model model = parser.createModel(new ConverterParams().filename("testFiles/small/initial_amount.xml"));
Species element = model.getElementByElementId("s1");
assertEquals((Double)1.0, element.getInitialAmount());
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment