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

parsing of reaction type from SBO term added

parent 791b6faf
No related branches found
No related tags found
1 merge request!186Resolve "upload of sbml"
Showing
with 715 additions and 7 deletions
package lcsb.mapviewer.converter.model.sbml.reaction;
import java.util.HashSet;
import java.util.Set;
import org.apache.log4j.Logger;
import lcsb.mapviewer.model.map.reaction.Reaction;
import lcsb.mapviewer.model.map.reaction.type.DissociationReaction;
import lcsb.mapviewer.model.map.reaction.type.HeterodimerAssociationReaction;
import lcsb.mapviewer.model.map.reaction.type.KnownTransitionOmittedReaction;
import lcsb.mapviewer.model.map.reaction.type.NegativeInfluenceReaction;
import lcsb.mapviewer.model.map.reaction.type.PositiveInfluenceReaction;
import lcsb.mapviewer.model.map.reaction.type.StateTransitionReaction;
import lcsb.mapviewer.model.map.reaction.type.TranscriptionReaction;
import lcsb.mapviewer.model.map.reaction.type.TranslationReaction;
import lcsb.mapviewer.model.map.reaction.type.TransportReaction;
import lcsb.mapviewer.model.map.reaction.type.TruncationReaction;
import lcsb.mapviewer.model.map.reaction.type.UnknownNegativeInfluenceReaction;
import lcsb.mapviewer.model.map.reaction.type.UnknownPositiveInfluenceReaction;
import lcsb.mapviewer.model.map.reaction.type.UnknownTransitionReaction;
public enum SBOTermReactionType {
STATE_TRANSITION(StateTransitionReaction.class, new String[] { "SBO:0000176" }), //
TRANSCRIPTION(TranscriptionReaction.class, new String[] { "SBO:0000183" }), //
TRANSLATION(TranslationReaction.class, new String[] { "SBO:0000184" }), //
TRANSPORT(TransportReaction.class, new String[] { "SBO:0000185" }), //
KNOWN_TRANSITION_OMITTED(KnownTransitionOmittedReaction.class, new String[] { "SBO:0000205" }), //
UNKNOWN_TRANSITION(UnknownTransitionReaction.class, new String[] { "SBO:0000396" }), //
HETERODIMER_ASSOCIATION(HeterodimerAssociationReaction.class, new String[] { "SBO:0000177" }), //
DISSOCIATION(DissociationReaction.class, new String[] { "SBO:0000180" }), //
TRUNCATION(TruncationReaction.class, new String[] { "SBO:0000178" }), //
POSITIVE_INFLUENCE(PositiveInfluenceReaction.class, new String[] { "SBO:0000171" }), //
UNKNOWN_POSITIVE_INFLUENCE(UnknownPositiveInfluenceReaction.class, new String[] { "SBO:0000170" }), //
NEGATIVE_INFLUENCE(NegativeInfluenceReaction.class, new String[] { "SBO:0000407" }), //
UNKNOWN_NEGATIVE_INFLUENCE(UnknownNegativeInfluenceReaction.class, new String[] { "SBO:0000169" }), //
;
private static Logger logger = Logger.getLogger(SBOTermReactionType.class);
private Set<String> sboTerms = new HashSet<>();
Class<? extends Reaction> clazz;
private SBOTermReactionType(Class<? extends Reaction> clazz, String[] inputSboTerms) {
this.clazz = clazz;
for (String string : inputSboTerms) {
sboTerms.add(string);
}
}
public static Class<? extends Reaction> getTypeSBOTerm(String sboTerm) {
if (sboTerm == null || sboTerm.isEmpty()) {
return StateTransitionReaction.class;
}
Class<? extends Reaction> result = null;
for (SBOTermReactionType term : values()) {
for (String string : term.sboTerms) {
if (string.equalsIgnoreCase(sboTerm)) {
result = term.clazz;
}
}
}
if (result == null) {
logger.warn("Don't know how to handle SBOTerm " + sboTerm + " for modifier");
result = StateTransitionReaction.class;
}
return result;
}
}
......@@ -49,7 +49,6 @@ import lcsb.mapviewer.model.map.reaction.Reactant;
import lcsb.mapviewer.model.map.reaction.Reaction;
import lcsb.mapviewer.model.map.reaction.ReactionNode;
import lcsb.mapviewer.model.map.reaction.SplitOperator;
import lcsb.mapviewer.model.map.reaction.type.StateTransitionReaction;
import lcsb.mapviewer.model.map.species.Element;
import lcsb.mapviewer.model.map.species.Species;
import lcsb.mapviewer.modelutils.map.ElementUtils;
......@@ -277,7 +276,7 @@ public class SbmlReactionParser extends SbmlBioEntityParser {
}
protected Reaction parse(org.sbml.jsbml.Reaction sbmlReaction, Model sbmlModel) throws InvalidInputDataExecption {
Reaction reaction = new StateTransitionReaction();
Reaction reaction = new Reaction();
assignBioEntityData(sbmlReaction, reaction);
reaction.setIdReaction(sbmlReaction.getId());
reaction.setReversible(sbmlReaction.isReversible());
......@@ -305,6 +304,14 @@ public class SbmlReactionParser extends SbmlBioEntityParser {
}
}
try {
Class<? extends Reaction> reactionClass = SBOTermReactionType.getTypeSBOTerm(sbmlReaction.getSBOTermID());
reaction = reactionClass.getConstructor(Reaction.class).newInstance(reaction);
} catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException
| NoSuchMethodException | SecurityException e) {
throw new InvalidInputDataExecption("Problem with creating reaction", e);
}
return reaction;
}
......
......@@ -17,6 +17,19 @@ import lcsb.mapviewer.model.map.modifier.Inhibition;
import lcsb.mapviewer.model.map.modifier.UnknownCatalysis;
import lcsb.mapviewer.model.map.modifier.UnknownInhibition;
import lcsb.mapviewer.model.map.reaction.Reaction;
import lcsb.mapviewer.model.map.reaction.type.DissociationReaction;
import lcsb.mapviewer.model.map.reaction.type.HeterodimerAssociationReaction;
import lcsb.mapviewer.model.map.reaction.type.KnownTransitionOmittedReaction;
import lcsb.mapviewer.model.map.reaction.type.NegativeInfluenceReaction;
import lcsb.mapviewer.model.map.reaction.type.PositiveInfluenceReaction;
import lcsb.mapviewer.model.map.reaction.type.StateTransitionReaction;
import lcsb.mapviewer.model.map.reaction.type.TranscriptionReaction;
import lcsb.mapviewer.model.map.reaction.type.TranslationReaction;
import lcsb.mapviewer.model.map.reaction.type.TransportReaction;
import lcsb.mapviewer.model.map.reaction.type.TruncationReaction;
import lcsb.mapviewer.model.map.reaction.type.UnknownNegativeInfluenceReaction;
import lcsb.mapviewer.model.map.reaction.type.UnknownPositiveInfluenceReaction;
import lcsb.mapviewer.model.map.reaction.type.UnknownTransitionReaction;
public class SbmlReactionParserTest {
Logger logger = Logger.getLogger(SbmlReactionParserTest.class);
......@@ -54,4 +67,110 @@ public class SbmlReactionParserTest {
assertTrue(reaction.getModifiers().iterator().next() instanceof UnknownInhibition);
}
@Test
public void testParseStateTransition() throws FileNotFoundException, InvalidInputDataExecption {
Model model = parser.createModel(new ConverterParams().filename("testFiles/small/reaction/state_transition.xml"));
Reaction reaction = model.getReactions().iterator().next();
assertNotNull(reaction);
assertTrue(reaction instanceof StateTransitionReaction);
}
@Test
public void testParseTranscription() throws FileNotFoundException, InvalidInputDataExecption {
Model model = parser.createModel(new ConverterParams().filename("testFiles/small/reaction/transcription.xml"));
Reaction reaction = model.getReactions().iterator().next();
assertNotNull(reaction);
assertTrue(reaction instanceof TranscriptionReaction);
}
@Test
public void testParseTranslation() throws FileNotFoundException, InvalidInputDataExecption {
Model model = parser.createModel(new ConverterParams().filename("testFiles/small/reaction/translation.xml"));
Reaction reaction = model.getReactions().iterator().next();
assertNotNull(reaction);
assertTrue(reaction instanceof TranslationReaction);
}
@Test
public void testParseTransport() throws FileNotFoundException, InvalidInputDataExecption {
Model model = parser.createModel(new ConverterParams().filename("testFiles/small/reaction/transport.xml"));
Reaction reaction = model.getReactions().iterator().next();
assertNotNull(reaction);
assertTrue(reaction instanceof TransportReaction);
}
@Test
public void testParseKnownTransitionOmitted() throws FileNotFoundException, InvalidInputDataExecption {
Model model = parser
.createModel(new ConverterParams().filename("testFiles/small/reaction/known_transition_omitted.xml"));
Reaction reaction = model.getReactions().iterator().next();
assertNotNull(reaction);
assertTrue(reaction instanceof KnownTransitionOmittedReaction);
}
@Test
public void testParseUnknownTransition() throws FileNotFoundException, InvalidInputDataExecption {
Model model = parser.createModel(new ConverterParams().filename("testFiles/small/reaction/unknown_transition.xml"));
Reaction reaction = model.getReactions().iterator().next();
assertNotNull(reaction);
assertTrue(reaction instanceof UnknownTransitionReaction);
}
@Test
public void testParseHeterodimerAssociation() throws FileNotFoundException, InvalidInputDataExecption {
Model model = parser
.createModel(new ConverterParams().filename("testFiles/small/reaction/heterodimer_association.xml"));
Reaction reaction = model.getReactions().iterator().next();
assertNotNull(reaction);
assertTrue(reaction instanceof HeterodimerAssociationReaction);
}
@Test
public void testParseDissociation() throws FileNotFoundException, InvalidInputDataExecption {
Model model = parser.createModel(new ConverterParams().filename("testFiles/small/reaction/dissociation.xml"));
Reaction reaction = model.getReactions().iterator().next();
assertNotNull(reaction);
assertTrue(reaction instanceof DissociationReaction);
}
@Test
public void testParseTruncation() throws FileNotFoundException, InvalidInputDataExecption {
Model model = parser.createModel(new ConverterParams().filename("testFiles/small/reaction/truncation.xml"));
Reaction reaction = model.getReactions().iterator().next();
assertNotNull(reaction);
assertTrue(reaction instanceof TruncationReaction);
}
@Test
public void testParsePositiveInfluence() throws FileNotFoundException, InvalidInputDataExecption {
Model model = parser.createModel(new ConverterParams().filename("testFiles/small/reaction/positive_influence.xml"));
Reaction reaction = model.getReactions().iterator().next();
assertNotNull(reaction);
assertTrue(reaction instanceof PositiveInfluenceReaction);
}
@Test
public void testParseUnknownPositiveInfluence() throws FileNotFoundException, InvalidInputDataExecption {
Model model = parser.createModel(new ConverterParams().filename("testFiles/small/reaction/unknown_positive_influence.xml"));
Reaction reaction = model.getReactions().iterator().next();
assertNotNull(reaction);
assertTrue(reaction instanceof UnknownPositiveInfluenceReaction);
}
@Test
public void testParseNegativeInfluence() throws FileNotFoundException, InvalidInputDataExecption {
Model model = parser.createModel(new ConverterParams().filename("testFiles/small/reaction/negative_influence.xml"));
Reaction reaction = model.getReactions().iterator().next();
assertNotNull(reaction);
assertTrue(reaction instanceof NegativeInfluenceReaction);
}
@Test
public void testParseUnknownNegativeInfluence() throws FileNotFoundException, InvalidInputDataExecption {
Model model = parser.createModel(new ConverterParams().filename("testFiles/small/reaction/unknown_negative_influence.xml"));
Reaction reaction = model.getReactions().iterator().next();
assertNotNull(reaction);
assertTrue(reaction instanceof UnknownNegativeInfluenceReaction);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level2/version4" level="2" version="4">
<model id="TestGEN">
<annotation/>
<listOfCompartments>
<compartment constant="true" id="cell" name="cell" sboTerm="SBO:0000290" size="1">
<annotation>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bqmodel="http://biomodels.net/model-qualifiers/" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/">
<rdf:Description rdf:about="#">
<bqbiol:isVersionOf>
<rdf:Bag>
<rdf:li rdf:resource="urn:miriam:obo.go:GO:0005623"/>
</rdf:Bag>
</bqbiol:isVersionOf>
</rdf:Description>
</rdf:RDF>
</annotation>
</compartment>
</listOfCompartments>
<listOfSpecies>
<species compartment="cell" initialConcentration="1" id="s1" name="nm1">
<annotation/>
</species>
<species compartment="cell" initialConcentration="1" id="s2" name="nm2">
<annotation/>
</species>
<species compartment="cell" initialConcentration="1" id="s3" name="nm3">
<annotation/>
</species>
</listOfSpecies>
<listOfReactions>
<reaction id="re1" sboTerm="SBO:0000180">
<listOfReactants>
<speciesReference species="s1" stoichiometry="1"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="s2" stoichiometry="1"/>
<speciesReference species="s3" stoichiometry="1"/>
</listOfProducts>
</reaction>
</listOfReactions>
</model>
</sbml>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level2/version4" level="2" version="4">
<model id="TestGEN">
<annotation/>
<listOfCompartments>
<compartment constant="true" id="cell" name="cell" sboTerm="SBO:0000290" size="1">
<annotation>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bqmodel="http://biomodels.net/model-qualifiers/" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/">
<rdf:Description rdf:about="#">
<bqbiol:isVersionOf>
<rdf:Bag>
<rdf:li rdf:resource="urn:miriam:obo.go:GO:0005623"/>
</rdf:Bag>
</bqbiol:isVersionOf>
</rdf:Description>
</rdf:RDF>
</annotation>
</compartment>
</listOfCompartments>
<listOfSpecies>
<species compartment="cell" initialConcentration="1" id="s1" name="nm1">
<annotation/>
</species>
<species compartment="cell" initialConcentration="1" id="s2" name="nm2">
<annotation/>
</species>
<species compartment="cell" initialConcentration="1" id="s3" name="nm3">
<annotation/>
</species>
</listOfSpecies>
<listOfReactions>
<reaction id="re1" sboTerm="SBO:0000177">
<listOfReactants>
<speciesReference species="s1" stoichiometry="1"/>
<speciesReference species="s3" stoichiometry="1"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="s2" stoichiometry="1"/>
</listOfProducts>
</reaction>
</listOfReactions>
</model>
</sbml>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level2/version4" level="2" version="4">
<model id="TestGEN">
<annotation/>
<listOfCompartments>
<compartment constant="true" id="cell" name="cell" sboTerm="SBO:0000290" size="1">
<annotation>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bqmodel="http://biomodels.net/model-qualifiers/" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/">
<rdf:Description rdf:about="#">
<bqbiol:isVersionOf>
<rdf:Bag>
<rdf:li rdf:resource="urn:miriam:obo.go:GO:0005623"/>
</rdf:Bag>
</bqbiol:isVersionOf>
</rdf:Description>
</rdf:RDF>
</annotation>
</compartment>
</listOfCompartments>
<listOfSpecies>
<species compartment="cell" initialConcentration="1" id="s1" name="nm1">
<annotation/>
</species>
<species compartment="cell" initialConcentration="1" id="s2" name="nm2">
<annotation/>
</species>
</listOfSpecies>
<listOfReactions>
<reaction id="re1" sboTerm="SBO:0000205">
<listOfReactants>
<speciesReference species="s1" stoichiometry="1"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="s2" stoichiometry="1"/>
</listOfProducts>
</reaction>
</listOfReactions>
</model>
</sbml>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level2/version4" level="2" version="4">
<model id="TestGEN">
<annotation/>
<listOfCompartments>
<compartment constant="true" id="cell" name="cell" sboTerm="SBO:0000290" size="1">
<annotation>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bqmodel="http://biomodels.net/model-qualifiers/" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/">
<rdf:Description rdf:about="#">
<bqbiol:isVersionOf>
<rdf:Bag>
<rdf:li rdf:resource="urn:miriam:obo.go:GO:0005623"/>
</rdf:Bag>
</bqbiol:isVersionOf>
</rdf:Description>
</rdf:RDF>
</annotation>
</compartment>
</listOfCompartments>
<listOfSpecies>
<species compartment="cell" initialConcentration="1" id="s1" name="nm1">
<annotation/>
</species>
<species compartment="cell" initialConcentration="1" id="s2" name="nm2">
<annotation/>
</species>
</listOfSpecies>
<listOfReactions>
<reaction id="re1" sboTerm="SBO:0000407">
<listOfReactants>
<speciesReference species="s1" stoichiometry="1"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="s2" stoichiometry="1"/>
</listOfProducts>
</reaction>
</listOfReactions>
</model>
</sbml>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level2/version4" level="2" version="4">
<model id="TestGEN">
<annotation/>
<listOfCompartments>
<compartment constant="true" id="cell" name="cell" sboTerm="SBO:0000290" size="1">
<annotation>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bqmodel="http://biomodels.net/model-qualifiers/" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/">
<rdf:Description rdf:about="#">
<bqbiol:isVersionOf>
<rdf:Bag>
<rdf:li rdf:resource="urn:miriam:obo.go:GO:0005623"/>
</rdf:Bag>
</bqbiol:isVersionOf>
</rdf:Description>
</rdf:RDF>
</annotation>
</compartment>
</listOfCompartments>
<listOfSpecies>
<species compartment="cell" initialConcentration="1" id="s1" name="nm1">
<annotation/>
</species>
<species compartment="cell" initialConcentration="1" id="s2" name="nm2">
<annotation/>
</species>
</listOfSpecies>
<listOfReactions>
<reaction id="re1" sboTerm="SBO:0000171">
<listOfReactants>
<speciesReference species="s1" stoichiometry="1"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="s2" stoichiometry="1"/>
</listOfProducts>
</reaction>
</listOfReactions>
</model>
</sbml>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level2/version4" level="2" version="4">
<model id="TestGEN">
<annotation/>
<listOfCompartments>
<compartment constant="true" id="cell" name="cell" sboTerm="SBO:0000290" size="1">
<annotation>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bqmodel="http://biomodels.net/model-qualifiers/" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/">
<rdf:Description rdf:about="#">
<bqbiol:isVersionOf>
<rdf:Bag>
<rdf:li rdf:resource="urn:miriam:obo.go:GO:0005623"/>
</rdf:Bag>
</bqbiol:isVersionOf>
</rdf:Description>
</rdf:RDF>
</annotation>
</compartment>
</listOfCompartments>
<listOfSpecies>
<species compartment="cell" initialConcentration="1" id="s1" name="nm1">
<annotation/>
</species>
<species compartment="cell" initialConcentration="1" id="s2" name="nm2">
<annotation/>
</species>
</listOfSpecies>
<listOfReactions>
<reaction id="re1" sboTerm="SBO:0000176">
<listOfReactants>
<speciesReference species="s1" stoichiometry="1"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="s2" stoichiometry="1"/>
</listOfProducts>
</reaction>
</listOfReactions>
</model>
</sbml>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level2/version4" level="2" version="4">
<model id="TestGEN">
<annotation/>
<listOfCompartments>
<compartment constant="true" id="cell" name="cell" sboTerm="SBO:0000290" size="1">
<annotation>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bqmodel="http://biomodels.net/model-qualifiers/" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/">
<rdf:Description rdf:about="#">
<bqbiol:isVersionOf>
<rdf:Bag>
<rdf:li rdf:resource="urn:miriam:obo.go:GO:0005623"/>
</rdf:Bag>
</bqbiol:isVersionOf>
</rdf:Description>
</rdf:RDF>
</annotation>
</compartment>
</listOfCompartments>
<listOfSpecies>
<species compartment="cell" initialConcentration="1" id="s1" name="nm1">
<annotation/>
</species>
<species compartment="cell" initialConcentration="1" id="s2" name="nm2">
<annotation/>
</species>
</listOfSpecies>
<listOfReactions>
<reaction id="re1" sboTerm="SBO:0000183">
<listOfReactants>
<speciesReference species="s1" stoichiometry="1"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="s2" stoichiometry="1"/>
</listOfProducts>
</reaction>
</listOfReactions>
</model>
</sbml>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level2/version4" level="2" version="4">
<model id="TestGEN">
<annotation/>
<listOfCompartments>
<compartment constant="true" id="cell" name="cell" sboTerm="SBO:0000290" size="1">
<annotation>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bqmodel="http://biomodels.net/model-qualifiers/" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/">
<rdf:Description rdf:about="#">
<bqbiol:isVersionOf>
<rdf:Bag>
<rdf:li rdf:resource="urn:miriam:obo.go:GO:0005623"/>
</rdf:Bag>
</bqbiol:isVersionOf>
</rdf:Description>
</rdf:RDF>
</annotation>
</compartment>
</listOfCompartments>
<listOfSpecies>
<species compartment="cell" initialConcentration="1" id="s1" name="nm1">
<annotation/>
</species>
<species compartment="cell" initialConcentration="1" id="s2" name="nm2">
<annotation/>
</species>
</listOfSpecies>
<listOfReactions>
<reaction id="re1" sboTerm="SBO:0000184">
<listOfReactants>
<speciesReference species="s1" stoichiometry="1"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="s2" stoichiometry="1"/>
</listOfProducts>
</reaction>
</listOfReactions>
</model>
</sbml>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level2/version4" level="2" version="4">
<model id="TestGEN">
<annotation/>
<listOfCompartments>
<compartment constant="true" id="cell" name="cell" sboTerm="SBO:0000290" size="1">
<annotation>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bqmodel="http://biomodels.net/model-qualifiers/" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/">
<rdf:Description rdf:about="#">
<bqbiol:isVersionOf>
<rdf:Bag>
<rdf:li rdf:resource="urn:miriam:obo.go:GO:0005623"/>
</rdf:Bag>
</bqbiol:isVersionOf>
</rdf:Description>
</rdf:RDF>
</annotation>
</compartment>
</listOfCompartments>
<listOfSpecies>
<species compartment="cell" initialConcentration="1" id="s1" name="nm1">
<annotation/>
</species>
<species compartment="cell" initialConcentration="1" id="s2" name="nm2">
<annotation/>
</species>
</listOfSpecies>
<listOfReactions>
<reaction id="re1" sboTerm="SBO:0000185">
<listOfReactants>
<speciesReference species="s1" stoichiometry="1"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="s2" stoichiometry="1"/>
</listOfProducts>
</reaction>
</listOfReactions>
</model>
</sbml>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level2/version4" level="2" version="4">
<model id="TestGEN">
<annotation/>
<listOfCompartments>
<compartment constant="true" id="cell" name="cell" sboTerm="SBO:0000290" size="1">
<annotation>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bqmodel="http://biomodels.net/model-qualifiers/" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/">
<rdf:Description rdf:about="#">
<bqbiol:isVersionOf>
<rdf:Bag>
<rdf:li rdf:resource="urn:miriam:obo.go:GO:0005623"/>
</rdf:Bag>
</bqbiol:isVersionOf>
</rdf:Description>
</rdf:RDF>
</annotation>
</compartment>
</listOfCompartments>
<listOfSpecies>
<species compartment="cell" initialConcentration="1" id="s1" name="nm1">
<annotation/>
</species>
<species compartment="cell" initialConcentration="1" id="s2" name="nm2">
<annotation/>
</species>
<species compartment="cell" initialConcentration="1" id="s3" name="nm3">
<annotation/>
</species>
</listOfSpecies>
<listOfReactions>
<reaction id="re1" sboTerm="SBO:0000178">
<listOfReactants>
<speciesReference species="s1" stoichiometry="1"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="s2" stoichiometry="1"/>
<speciesReference species="s3" stoichiometry="1"/>
</listOfProducts>
</reaction>
</listOfReactions>
</model>
</sbml>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level2/version4" level="2" version="4">
<model id="TestGEN">
<annotation/>
<listOfCompartments>
<compartment constant="true" id="cell" name="cell" sboTerm="SBO:0000290" size="1">
<annotation>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bqmodel="http://biomodels.net/model-qualifiers/" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/">
<rdf:Description rdf:about="#">
<bqbiol:isVersionOf>
<rdf:Bag>
<rdf:li rdf:resource="urn:miriam:obo.go:GO:0005623"/>
</rdf:Bag>
</bqbiol:isVersionOf>
</rdf:Description>
</rdf:RDF>
</annotation>
</compartment>
</listOfCompartments>
<listOfSpecies>
<species compartment="cell" initialConcentration="1" id="s1" name="nm1">
<annotation/>
</species>
<species compartment="cell" initialConcentration="1" id="s2" name="nm2">
<annotation/>
</species>
</listOfSpecies>
<listOfReactions>
<reaction id="re1" sboTerm="SBO:0000169">
<listOfReactants>
<speciesReference species="s1" stoichiometry="1"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="s2" stoichiometry="1"/>
</listOfProducts>
</reaction>
</listOfReactions>
</model>
</sbml>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level2/version4" level="2" version="4">
<model id="TestGEN">
<annotation/>
<listOfCompartments>
<compartment constant="true" id="cell" name="cell" sboTerm="SBO:0000290" size="1">
<annotation>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bqmodel="http://biomodels.net/model-qualifiers/" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/">
<rdf:Description rdf:about="#">
<bqbiol:isVersionOf>
<rdf:Bag>
<rdf:li rdf:resource="urn:miriam:obo.go:GO:0005623"/>
</rdf:Bag>
</bqbiol:isVersionOf>
</rdf:Description>
</rdf:RDF>
</annotation>
</compartment>
</listOfCompartments>
<listOfSpecies>
<species compartment="cell" initialConcentration="1" id="s1" name="nm1">
<annotation/>
</species>
<species compartment="cell" initialConcentration="1" id="s2" name="nm2">
<annotation/>
</species>
</listOfSpecies>
<listOfReactions>
<reaction id="re1" sboTerm="SBO:0000170">
<listOfReactants>
<speciesReference species="s1" stoichiometry="1"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="s2" stoichiometry="1"/>
</listOfProducts>
</reaction>
</listOfReactions>
</model>
</sbml>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level2/version4" level="2" version="4">
<model id="TestGEN">
<annotation/>
<listOfCompartments>
<compartment constant="true" id="cell" name="cell" sboTerm="SBO:0000290" size="1">
<annotation>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bqmodel="http://biomodels.net/model-qualifiers/" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/">
<rdf:Description rdf:about="#">
<bqbiol:isVersionOf>
<rdf:Bag>
<rdf:li rdf:resource="urn:miriam:obo.go:GO:0005623"/>
</rdf:Bag>
</bqbiol:isVersionOf>
</rdf:Description>
</rdf:RDF>
</annotation>
</compartment>
</listOfCompartments>
<listOfSpecies>
<species compartment="cell" initialConcentration="1" id="s1" name="nm1">
<annotation/>
</species>
<species compartment="cell" initialConcentration="1" id="s2" name="nm2">
<annotation/>
</species>
</listOfSpecies>
<listOfReactions>
<reaction id="re1" sboTerm="SBO:0000396">
<listOfReactants>
<speciesReference species="s1" stoichiometry="1"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="s2" stoichiometry="1"/>
</listOfProducts>
</reaction>
</listOfReactions>
</model>
</sbml>
\ No newline at end of file
......@@ -30,8 +30,6 @@ import lcsb.mapviewer.model.map.reaction.Product;
import lcsb.mapviewer.model.map.reaction.Reactant;
import lcsb.mapviewer.model.map.reaction.Reaction;
import lcsb.mapviewer.model.map.reaction.SplitOperator;
import lcsb.mapviewer.model.map.reaction.type.TwoProductReactionInterface;
import lcsb.mapviewer.model.map.reaction.type.TwoReactantReactionInterface;
import lcsb.mapviewer.model.map.species.Complex;
import lcsb.mapviewer.model.map.species.Element;
import lcsb.mapviewer.model.map.species.Species;
......@@ -206,9 +204,6 @@ public class ApplySimpleLayoutModelCommand extends ApplyLayoutModelCommand {
}
private void modifyReaction(Reaction reaction) {
if (reaction instanceof TwoReactantReactionInterface || reaction instanceof TwoProductReactionInterface) {
throw new NotImplementedException();
}
for (AbstractNode node : reaction.getOperators()) {
reaction.removeNode(node);
}
......
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