From 79cbd71ae2a73e3ad744d797bd5a2e5dc7c9e73c Mon Sep 17 00:00:00 2001 From: Piotr Gawron <piotr.gawron@uni.lu> Date: Wed, 2 Jan 2019 12:53:44 +0100 Subject: [PATCH] acceptance test for import export featers into multi --- .../model/sbml/MultiSbmlParserTest.java | 36 +- .../testFiles/cd_for_multi/coding_sites.xml | 158 ++++++++ .../testFiles/cd_for_multi/complex.xml | 338 ++++++++++++++++++ .../cd_for_multi/modification_residues.xml | 232 ++++++++++++ .../cd_for_multi/structural_state.xml | 195 ++++++++++ 5 files changed, 930 insertions(+), 29 deletions(-) create mode 100644 converter-sbml/testFiles/cd_for_multi/coding_sites.xml create mode 100644 converter-sbml/testFiles/cd_for_multi/complex.xml create mode 100644 converter-sbml/testFiles/cd_for_multi/modification_residues.xml create mode 100644 converter-sbml/testFiles/cd_for_multi/structural_state.xml diff --git a/converter-sbml/src/test/java/lcsb/mapviewer/converter/model/sbml/MultiSbmlParserTest.java b/converter-sbml/src/test/java/lcsb/mapviewer/converter/model/sbml/MultiSbmlParserTest.java index 348482c453..d5345cfce8 100644 --- a/converter-sbml/src/test/java/lcsb/mapviewer/converter/model/sbml/MultiSbmlParserTest.java +++ b/converter-sbml/src/test/java/lcsb/mapviewer/converter/model/sbml/MultiSbmlParserTest.java @@ -4,7 +4,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import java.io.ByteArrayInputStream; -import java.io.File; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; @@ -13,7 +12,6 @@ import java.nio.file.Paths; import java.util.ArrayList; import java.util.Collection; -import org.apache.commons.io.FileUtils; import org.apache.log4j.Logger; import org.junit.Test; import org.junit.runner.RunWith; @@ -22,9 +20,6 @@ import org.junit.runners.Parameterized.Parameters; import lcsb.mapviewer.converter.ConverterParams; import lcsb.mapviewer.converter.IConverter; -import lcsb.mapviewer.converter.graphics.AbstractImageGenerator; -import lcsb.mapviewer.converter.graphics.NormalImageGenerator; -import lcsb.mapviewer.converter.graphics.PngImageGenerator; import lcsb.mapviewer.converter.model.celldesigner.CellDesignerXmlParser; import lcsb.mapviewer.model.map.model.Model; import lcsb.mapviewer.model.map.model.ModelComparator; @@ -43,7 +38,7 @@ public class MultiSbmlParserTest { @Parameters(name = "{index} : {0}") public static Collection<Object[]> data() throws IOException { Collection<Object[]> data = new ArrayList<Object[]>(); - Files.walk(Paths.get("testFiles/multi")).forEach(fPath -> { + Files.walk(Paths.get("testFiles/cd_for_multi")).forEach(fPath -> { if (Files.isRegularFile(fPath) && fPath.toString().endsWith(".xml")) { data.add(new Object[] { fPath }); } @@ -54,40 +49,23 @@ public class MultiSbmlParserTest { @Test public void createModelTest() throws Exception { try { - String dir = Files.createTempDirectory("sbml-temp-images-dir").toFile().getAbsolutePath(); - - IConverter converter = new SbmlParser(); + IConverter converter = new CellDesignerXmlParser(); Model model = converter.createModel(new ConverterParams().filename(filePath.toString())); model.setName(null); - // Create and display image of parsed map - AbstractImageGenerator.Params params = new AbstractImageGenerator.Params().height(model.getHeight()) - .width(model.getWidth()).nested(true).scale(1).level(20).x(0).y(0).model(model); - NormalImageGenerator nig = new PngImageGenerator(params); - String pathWithouExtension = dir + "/" - + filePath.getFileName().toString().substring(0, filePath.getFileName().toString().indexOf(".xml")); - String pngFilePath = pathWithouExtension.concat(".png"); - nig.saveToFile(pngFilePath); - // Desktop.getDesktop().open(new File(pngFilePath)); - - CellDesignerXmlParser cellDesignerXmlParser = new CellDesignerXmlParser(); - String xmlString = cellDesignerXmlParser.toXml(model); + SbmlExporter sbmlExporter = new SbmlExporter(); + SbmlParser sbmlParser = new SbmlParser(); + String xmlString = sbmlExporter.toXml(model); InputStream is = new ByteArrayInputStream(xmlString.getBytes("UTF-8")); - Model model2 = cellDesignerXmlParser.createModel(new ConverterParams().inputStream(is).sizeAutoAdjust(false)); - - AbstractImageGenerator.Params params2 = new AbstractImageGenerator.Params().height(model2.getHeight()) - .width(model2.getWidth()).nested(true).scale(1).level(20).x(0).y(0).model(model2); - NormalImageGenerator nig2 = new PngImageGenerator(params2); - String pngFilePath2 = pathWithouExtension.concat("_2.png"); - nig2.saveToFile(pngFilePath2); + Model model2 = sbmlParser.createModel(new ConverterParams().inputStream(is).sizeAutoAdjust(false)); + model2.setName(null); assertNotNull(model2); ModelComparator comparator = new ModelComparator(1.0); assertEquals(0, comparator.compare(model, model2)); - FileUtils.deleteDirectory(new File(dir)); } catch (Exception e) { // TODO Auto-generated catch block diff --git a/converter-sbml/testFiles/cd_for_multi/coding_sites.xml b/converter-sbml/testFiles/cd_for_multi/coding_sites.xml new file mode 100644 index 0000000000..57f7b2d65b --- /dev/null +++ b/converter-sbml/testFiles/cd_for_multi/coding_sites.xml @@ -0,0 +1,158 @@ +<?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:listOfCompartmentAliases/> +<celldesigner:listOfComplexSpeciesAliases/> +<celldesigner:listOfSpeciesAliases> +<celldesigner:speciesAlias id="sa2" species="s2"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="126.0" y="143.5" w="70.0" h="25.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="70.0" height="25.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffffff66" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="0.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa3" species="s3"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="208.0" y="141.5" w="70.0" h="25.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="70.0" height="25.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffffff66" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="0.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa4" species="s4"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="125.0" y="179.5" w="70.0" h="25.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="70.0" height="25.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffffff66" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="0.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +</celldesigner:listOfSpeciesAliases> +<celldesigner:listOfGroups/> +<celldesigner:listOfProteins/> +<celldesigner:listOfGenes> +<celldesigner:gene id="gn1" name="s2" type="GENE"> +<celldesigner:listOfRegions> +<celldesigner:region id="tr1" name="x" size="0.0" pos="0.3" type="Modification Site" active="false"/> +<celldesigner:region id="tr2" name="s" size="0.1" pos="0.44" type="transcriptionStartingSiteL" active="false"/> +<celldesigner:region id="tr3" name="e" size="0.1" pos="0.71" type="transcriptionStartingSiteR" active="true"/> +</celldesigner:listOfRegions> +</celldesigner:gene> +<celldesigner:gene id="gn2" name="s4" type="GENE"/> +</celldesigner:listOfGenes> +<celldesigner:listOfRNAs/> +<celldesigner:listOfAntisenseRNAs/> +<celldesigner:listOfLayers/> +<celldesigner:listOfBlockDiagrams/> +</celldesigner:extension> +</annotation> +<listOfUnitDefinitions> +<unitDefinition metaid="substance" id="substance" name="substance"> +<listOfUnits> +<unit metaid="CDMT00001" kind="mole"/> +</listOfUnits> +</unitDefinition> +<unitDefinition metaid="volume" id="volume" name="volume"> +<listOfUnits> +<unit metaid="CDMT00002" kind="litre"/> +</listOfUnits> +</unitDefinition> +<unitDefinition metaid="area" id="area" name="area"> +<listOfUnits> +<unit metaid="CDMT00003" kind="metre" exponent="2"/> +</listOfUnits> +</unitDefinition> +<unitDefinition metaid="length" id="length" name="length"> +<listOfUnits> +<unit metaid="CDMT00004" kind="metre"/> +</listOfUnits> +</unitDefinition> +<unitDefinition metaid="time" id="time" name="time"> +<listOfUnits> +<unit metaid="CDMT00005" kind="second"/> +</listOfUnits> +</unitDefinition> +</listOfUnitDefinitions> +<listOfCompartments> +<compartment metaid="default" id="default" size="1" units="volume"/> +</listOfCompartments> +<listOfSpecies> +<species metaid="s2" id="s2" name="s2" compartment="default" initialAmount="0"> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>GENE</celldesigner:class> +<celldesigner:geneReference>gn1</celldesigner:geneReference> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s3" id="s3" name="s2" compartment="default" initialAmount="0"> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>GENE</celldesigner:class> +<celldesigner:geneReference>gn1</celldesigner:geneReference> +<celldesigner:state> +<celldesigner:listOfModifications> +<celldesigner:modification residue="tr1" state="phosphorylated"/> +</celldesigner:listOfModifications> +</celldesigner:state> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s4" id="s4" name="s4" compartment="default" initialAmount="0"> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>GENE</celldesigner:class> +<celldesigner:geneReference>gn2</celldesigner:geneReference> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +</listOfSpecies> +</model> +</sbml> diff --git a/converter-sbml/testFiles/cd_for_multi/complex.xml b/converter-sbml/testFiles/cd_for_multi/complex.xml new file mode 100644 index 0000000000..4fc5191229 --- /dev/null +++ b/converter-sbml/testFiles/cd_for_multi/complex.xml @@ -0,0 +1,338 @@ +<?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:species id="s2" name="s2"> +<celldesigner:notes> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title/> +</head> +<body/> +</html> +</celldesigner:notes> +<celldesigner:annotation> +<celldesigner:complexSpecies>s1</celldesigner:complexSpecies> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr1</celldesigner:proteinReference> +</celldesigner:speciesIdentity> +</celldesigner:annotation> +</celldesigner:species> +<celldesigner:species id="s3" name="s3"> +<celldesigner:notes> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title/> +</head> +<body/> +</html> +</celldesigner:notes> +<celldesigner:annotation> +<celldesigner:complexSpecies>s1</celldesigner:complexSpecies> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr2</celldesigner:proteinReference> +</celldesigner:speciesIdentity> +</celldesigner:annotation> +</celldesigner:species> +<celldesigner:species id="s6" name="s2"> +<celldesigner:notes> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title/> +</head> +<body/> +</html> +</celldesigner:notes> +<celldesigner:annotation> +<celldesigner:complexSpecies>s4</celldesigner:complexSpecies> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr1</celldesigner:proteinReference> +</celldesigner:speciesIdentity> +</celldesigner:annotation> +</celldesigner:species> +<celldesigner:species id="s8" name="s8"> +<celldesigner:notes> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title/> +</head> +<body/> +</html> +</celldesigner:notes> +<celldesigner:annotation> +<celldesigner:complexSpecies>s7</celldesigner:complexSpecies> +<celldesigner:speciesIdentity> +<celldesigner:class>COMPLEX</celldesigner:class> +<celldesigner:name>s8</celldesigner:name> +</celldesigner:speciesIdentity> +</celldesigner:annotation> +</celldesigner:species> +<celldesigner:species id="s9" name="s2"> +<celldesigner:notes> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title/> +</head> +<body/> +</html> +</celldesigner:notes> +<celldesigner:annotation> +<celldesigner:complexSpecies>s8</celldesigner:complexSpecies> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr1</celldesigner:proteinReference> +</celldesigner:speciesIdentity> +</celldesigner:annotation> +</celldesigner:species> +</celldesigner:listOfIncludedSpecies> +<celldesigner:listOfCompartmentAliases/> +<celldesigner:listOfComplexSpeciesAliases> +<celldesigner:complexSpeciesAlias id="csa1" species="s1"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="37.0" y="40.0" w="100.0" h="120.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:backupSize w="0.0" h="0.0"/> +<celldesigner:backupView state="none"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="100.0" height="120.0"/> +<celldesigner:singleLine width="2.0"/> +<celldesigner:paint color="fff7f7f7" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="2.0"/> +<celldesigner:paint color="fff7f7f7" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:complexSpeciesAlias> +<celldesigner:complexSpeciesAlias id="csa2" species="s4"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="151.0" y="39.0" w="100.0" h="120.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:backupSize w="0.0" h="0.0"/> +<celldesigner:backupView state="none"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="100.0" height="120.0"/> +<celldesigner:singleLine width="2.0"/> +<celldesigner:paint color="fff7f7f7" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="2.0"/> +<celldesigner:paint color="fff7f7f7" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:complexSpeciesAlias> +<celldesigner:complexSpeciesAlias id="csa3" species="s7"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="265.0" y="38.0" w="150.0" h="166.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:backupSize w="0.0" h="0.0"/> +<celldesigner:backupView state="none"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="150.0" height="166.0"/> +<celldesigner:singleLine width="2.0"/> +<celldesigner:paint color="fff7f7f7" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="2.0"/> +<celldesigner:paint color="fff7f7f7" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:complexSpeciesAlias> +<celldesigner:complexSpeciesAlias id="csa4" species="s8" complexSpeciesAlias="csa3"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="270.0" y="52.0" w="140.0" h="123.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:backupSize w="0.0" h="0.0"/> +<celldesigner:backupView state="none"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="5.0" y="14.0"/> +<celldesigner:boxSize width="140.0" height="123.0"/> +<celldesigner:singleLine width="2.0"/> +<celldesigner:paint color="fff7f7f7" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="2.0"/> +<celldesigner:paint color="fff7f7f7" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:complexSpeciesAlias> +</celldesigner:listOfComplexSpeciesAliases> +<celldesigner:listOfSpeciesAliases> +<celldesigner:speciesAlias id="sa1" species="s2" complexSpeciesAlias="csa1"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="39.0" y="51.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="2.0" y="11.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="0.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa2" species="s3" complexSpeciesAlias="csa1"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="39.0" y="102.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="2.0" y="62.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="0.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa4" species="s6" complexSpeciesAlias="csa2"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="159.0" y="53.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="8.0" y="14.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="0.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa5" species="s9" complexSpeciesAlias="csa4"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="297.0" y="56.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="27.0" y="4.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="0.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +</celldesigner:listOfSpeciesAliases> +<celldesigner:listOfGroups/> +<celldesigner:listOfProteins> +<celldesigner:protein id="pr1" name="s2" type="GENERIC"/> +<celldesigner:protein id="pr2" name="s3" type="GENERIC"/> +</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="CDMT00001" kind="mole"/> +</listOfUnits> +</unitDefinition> +<unitDefinition metaid="volume" id="volume" name="volume"> +<listOfUnits> +<unit metaid="CDMT00002" kind="litre"/> +</listOfUnits> +</unitDefinition> +<unitDefinition metaid="area" id="area" name="area"> +<listOfUnits> +<unit metaid="CDMT00003" kind="metre" exponent="2"/> +</listOfUnits> +</unitDefinition> +<unitDefinition metaid="length" id="length" name="length"> +<listOfUnits> +<unit metaid="CDMT00004" kind="metre"/> +</listOfUnits> +</unitDefinition> +<unitDefinition metaid="time" id="time" name="time"> +<listOfUnits> +<unit metaid="CDMT00005" kind="second"/> +</listOfUnits> +</unitDefinition> +</listOfUnitDefinitions> +<listOfCompartments> +<compartment metaid="default" id="default" size="1" units="volume"/> +</listOfCompartments> +<listOfSpecies> +<species metaid="s1" id="s1" name="s1" compartment="default" initialAmount="0"> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>COMPLEX</celldesigner:class> +<celldesigner:name>s1</celldesigner:name> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s4" id="s4" name="s4" compartment="default" initialAmount="0"> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>COMPLEX</celldesigner:class> +<celldesigner:name>s4</celldesigner:name> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s7" id="s7" name="s7" compartment="default" initialAmount="0"> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>COMPLEX</celldesigner:class> +<celldesigner:name>s7</celldesigner:name> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +</listOfSpecies> +</model> +</sbml> diff --git a/converter-sbml/testFiles/cd_for_multi/modification_residues.xml b/converter-sbml/testFiles/cd_for_multi/modification_residues.xml new file mode 100644 index 0000000000..7006cd3314 --- /dev/null +++ b/converter-sbml/testFiles/cd_for_multi/modification_residues.xml @@ -0,0 +1,232 @@ +<?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:listOfCompartmentAliases/> +<celldesigner:listOfComplexSpeciesAliases/> +<celldesigner:listOfSpeciesAliases> +<celldesigner:speciesAlias id="sa1" species="s4"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="86.0" y="81.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="0.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa2" species="s2"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="193.0" y="79.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="0.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa3" species="s1"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="194.0" y="151.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="0.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa4" species="s5"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="88.0" y="152.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="0.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa5" species="s3"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="287.0" y="79.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="0.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +</celldesigner:listOfSpeciesAliases> +<celldesigner:listOfGroups/> +<celldesigner:listOfProteins> +<celldesigner:protein id="pr1" name="s1" type="GENERIC"> +<celldesigner:listOfModificationResidues> +<celldesigner:modificationResidue angle="3.14" id="rs1" name="n2" side="none"/> +<celldesigner:modificationResidue angle="1.64" id="rs2" name="n1" side="none"/> +</celldesigner:listOfModificationResidues> +</celldesigner:protein> +<celldesigner:protein id="pr3" name="s3" type="GENERIC"/> +<celldesigner:protein id="pr2" name="s2" type="GENERIC"> +<celldesigner:listOfModificationResidues> +<celldesigner:modificationResidue angle="3.141592653589793" id="rs1" name="x" side="none"/> +</celldesigner:listOfModificationResidues> +</celldesigner:protein> +</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="CDMT00001" kind="mole"/> +</listOfUnits> +</unitDefinition> +<unitDefinition metaid="volume" id="volume" name="volume"> +<listOfUnits> +<unit metaid="CDMT00002" kind="litre"/> +</listOfUnits> +</unitDefinition> +<unitDefinition metaid="area" id="area" name="area"> +<listOfUnits> +<unit metaid="CDMT00003" kind="metre" exponent="2"/> +</listOfUnits> +</unitDefinition> +<unitDefinition metaid="length" id="length" name="length"> +<listOfUnits> +<unit metaid="CDMT00004" kind="metre"/> +</listOfUnits> +</unitDefinition> +<unitDefinition metaid="time" id="time" name="time"> +<listOfUnits> +<unit metaid="CDMT00005" kind="second"/> +</listOfUnits> +</unitDefinition> +</listOfUnitDefinitions> +<listOfCompartments> +<compartment metaid="default" id="default" size="1" units="volume"/> +</listOfCompartments> +<listOfSpecies> +<species metaid="s1" id="s1" name="s1" compartment="default" initialAmount="0"> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr1</celldesigner:proteinReference> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s3" id="s3" name="s3" compartment="default" initialAmount="0"> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr3</celldesigner:proteinReference> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s4" id="s4" name="s1" compartment="default" initialAmount="0"> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr1</celldesigner:proteinReference> +<celldesigner:state> +<celldesigner:listOfModifications> +<celldesigner:modification residue="rs2" state="phosphorylated"/> +</celldesigner:listOfModifications> +</celldesigner:state> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s2" id="s2" name="s2" compartment="default" initialAmount="0"> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr2</celldesigner:proteinReference> +<celldesigner:state> +<celldesigner:listOfModifications> +<celldesigner:modification residue="rs1" state="acetylated"/> +</celldesigner:listOfModifications> +</celldesigner:state> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s5" id="s5" name="s1" compartment="default" initialAmount="0"> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr1</celldesigner:proteinReference> +<celldesigner:state> +<celldesigner:listOfModifications> +<celldesigner:modification residue="rs1" state="ubiquitinated"/> +</celldesigner:listOfModifications> +</celldesigner:state> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +</listOfSpecies> +</model> +</sbml> diff --git a/converter-sbml/testFiles/cd_for_multi/structural_state.xml b/converter-sbml/testFiles/cd_for_multi/structural_state.xml new file mode 100644 index 0000000000..17e43d7d09 --- /dev/null +++ b/converter-sbml/testFiles/cd_for_multi/structural_state.xml @@ -0,0 +1,195 @@ +<?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:listOfCompartmentAliases/> +<celldesigner:listOfComplexSpeciesAliases/> +<celldesigner:listOfSpeciesAliases> +<celldesigner:speciesAlias id="sa1" species="s1"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="109.0" y="53.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="0.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa2" species="s3"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="108.0" y="113.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:structuralState angle="1.5707963267948966"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="0.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa3" species="s2"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="203.0" y="53.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:structuralState angle="1.5707963267948966"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="0.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa4" species="s4"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="202.0" y="112.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:structuralState angle="1.5707963267948966"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="0.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +</celldesigner:listOfSpeciesAliases> +<celldesigner:listOfGroups/> +<celldesigner:listOfProteins> +<celldesigner:protein id="pr1" name="s1" type="GENERIC"/> +<celldesigner:protein id="pr2" name="s4" type="GENERIC"/> +</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="CDMT00001" kind="mole"/> +</listOfUnits> +</unitDefinition> +<unitDefinition metaid="volume" id="volume" name="volume"> +<listOfUnits> +<unit metaid="CDMT00002" kind="litre"/> +</listOfUnits> +</unitDefinition> +<unitDefinition metaid="area" id="area" name="area"> +<listOfUnits> +<unit metaid="CDMT00003" kind="metre" exponent="2"/> +</listOfUnits> +</unitDefinition> +<unitDefinition metaid="length" id="length" name="length"> +<listOfUnits> +<unit metaid="CDMT00004" kind="metre"/> +</listOfUnits> +</unitDefinition> +<unitDefinition metaid="time" id="time" name="time"> +<listOfUnits> +<unit metaid="CDMT00005" kind="second"/> +</listOfUnits> +</unitDefinition> +</listOfUnitDefinitions> +<listOfCompartments> +<compartment metaid="default" id="default" size="1" units="volume"/> +</listOfCompartments> +<listOfSpecies> +<species metaid="s2" id="s2" name="s1" compartment="default" initialAmount="0"> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr1</celldesigner:proteinReference> +<celldesigner:state> +<celldesigner:listOfStructuralStates> +<celldesigner:structuralState structuralState="xyz"/> +</celldesigner:listOfStructuralStates> +</celldesigner:state> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s1" id="s1" name="s1" compartment="default" initialAmount="0"> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr1</celldesigner:proteinReference> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s3" id="s3" name="s1" compartment="default" initialAmount="0"> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr1</celldesigner:proteinReference> +<celldesigner:state> +<celldesigner:listOfStructuralStates> +<celldesigner:structuralState structuralState="open"/> +</celldesigner:listOfStructuralStates> +</celldesigner:state> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s4" id="s4" name="s4" compartment="default" initialAmount="0"> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr2</celldesigner:proteinReference> +<celldesigner:state> +<celldesigner:listOfStructuralStates> +<celldesigner:structuralState structuralState="xxx"/> +</celldesigner:listOfStructuralStates> +</celldesigner:state> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +</listOfSpecies> +</model> +</sbml> -- GitLab