Skip to content

Commit

Permalink
fix: compatible with next RAVEN release
Browse files Browse the repository at this point in the history
  • Loading branch information
edkerk committed Sep 22, 2024
1 parent 079ae8b commit 8af53fb
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 55 deletions.
27 changes: 15 additions & 12 deletions doc/src/geckomat/model_adapter/adapterTemplate.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,21 @@ <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" sr
0062 <span class="comment">% Reaction ID for biomass pseudoreaction</span>
0063 obj.params.bioRxn = <span class="string">'r_4041'</span>;
0064
0065 <span class="comment">% Compartment name in which the added enzymes should be located</span>
0066 obj.params.enzyme_comp = <span class="string">'cytoplasm'</span>;
0067 <span class="keyword">end</span>
0068
0069 <a name="_sub1" href="#_subfunctions" class="code">function [spont,spontRxnNames] = getSpontaneousReactions(obj,model)</a>
0070 <span class="comment">% Indicates how spontaneous reactions are identified. Here it</span>
0071 <span class="comment">% is done by the reaction have 'spontaneous' in its name.</span>
0072 spont = contains(model.rxnNames,<span class="string">'spontaneous'</span>);
0073 spontRxnNames = model.rxnNames(spont);
0074 <span class="keyword">end</span>
0075 <span class="keyword">end</span>
0076 <span class="keyword">end</span></pre></div>
0065 <span class="comment">% Name of the compartment where the protein pseudometabolites</span>
0066 <span class="comment">% should be located (all be located in the same compartment,</span>
0067 <span class="comment">% this does not interfere with them catalyzing reactions in</span>
0068 <span class="comment">% different compartments). Typically, cytoplasm is chosen.</span>
0069 obj.params.enzyme_comp = <span class="string">'cytoplasm'</span>;
0070 <span class="keyword">end</span>
0071
0072 <a name="_sub1" href="#_subfunctions" class="code">function [spont,spontRxnNames] = getSpontaneousReactions(obj,model)</a>
0073 <span class="comment">% Indicates how spontaneous reactions are identified. Here it</span>
0074 <span class="comment">% is done by the reaction have 'spontaneous' in its name.</span>
0075 spont = contains(model.rxnNames,<span class="string">'spontaneous'</span>);
0076 spontRxnNames = model.rxnNames(spont);
0077 <span class="keyword">end</span>
0078 <span class="keyword">end</span>
0079 <span class="keyword">end</span></pre></div>
<hr><address>Generated by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
</body>
</html>
1 change: 1 addition & 0 deletions test/unit_tests/ecTestGEM/data/smilesDB.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ e1 C(C1C)O
e2 C1C(=NC2)
m1 C(C1C)O
m2 C1C(=NC2)

69 changes: 27 additions & 42 deletions test/unit_tests/ecTestGEM/models/testModel.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:fbc="http://www.sbml.org/sbml/level3/version1/fbc/version2" level="3" version="1" fbc:required="false">
<model metaid="testModel" id="testModel" name="testModel" fbc:strict="true">
<annotation>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#" xmlns:vCard4="http://www.w3.org/2006/vcard/ns#" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/" xmlns:bqmodel="http://biomodels.net/model-qualifiers/">
<rdf:Description rdf:about="#testModel">
<dcterms:creator>
<rdf:Bag/>
</dcterms:creator>
<dcterms:created rdf:parseType="Resource">
<dcterms:W3CDTF>2023-02-20T21:53:00Z</dcterms:W3CDTF>
</dcterms:created>
<dcterms:modified rdf:parseType="Resource">
<dcterms:W3CDTF>2023-02-20T21:53:00Z</dcterms:W3CDTF>
</dcterms:modified>
</rdf:Description>
</rdf:RDF>
</annotation>
<listOfUnitDefinitions>
<unitDefinition id="mmol_per_gDW_per_hr">
<listOfUnits>
Expand All @@ -30,34 +15,34 @@
<compartment metaid="c" sboTerm="SBO:0000290" id="c" name="c" spatialDimensions="3" size="1" constant="true"/>
</listOfCompartments>
<listOfSpecies>
<species metaid="M_e1e" sboTerm="SBO:0000247" id="M_e1e" name="e1" compartment="e" initialConcentration="0" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species metaid="M_e2e" sboTerm="SBO:0000247" id="M_e2e" name="e2" compartment="e" initialConcentration="0" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species metaid="M_m1c" sboTerm="SBO:0000247" id="M_m1c" name="m1" compartment="c" initialConcentration="0" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species metaid="M_m2c" sboTerm="SBO:0000247" id="M_m2c" name="m2" compartment="c" initialConcentration="0" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species metaid="e1e" sboTerm="SBO:0000247" id="e1e" name="e1" compartment="e" initialConcentration="0" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species metaid="e2e" sboTerm="SBO:0000247" id="e2e" name="e2" compartment="e" initialConcentration="0" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species metaid="m1c" sboTerm="SBO:0000247" id="m1c" name="m1" compartment="c" initialConcentration="0" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species metaid="m2c" sboTerm="SBO:0000247" id="m2c" name="m2" compartment="c" initialConcentration="0" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
</listOfSpecies>
<listOfParameters>
<parameter id="FB1NInf" value="-INF" constant="true"/>
<parameter id="FB2N0" value="0" constant="true"/>
<parameter id="FB3NInf" value="INF" constant="true"/>
</listOfParameters>
<listOfReactions>
<reaction metaid="R_S1" sboTerm="SBO:0000176" id="R_S1" name="S1" reversible="true" fast="false" fbc:lowerFluxBound="FB1NInf" fbc:upperFluxBound="FB3NInf">
<reaction metaid="S1" sboTerm="SBO:0000176" id="S1" name="S1" reversible="true" fast="false" fbc:lowerFluxBound="FB1NInf" fbc:upperFluxBound="FB3NInf">
<listOfReactants>
<speciesReference species="M_e1e" stoichiometry="1" constant="true"/>
<speciesReference species="e1e" stoichiometry="1" constant="true"/>
</listOfReactants>
</reaction>
<reaction metaid="R_R1" sboTerm="SBO:0000176" id="R_R1" name="R1" reversible="true" fast="false" fbc:lowerFluxBound="FB1NInf" fbc:upperFluxBound="FB3NInf">
<reaction metaid="R1" sboTerm="SBO:0000176" id="R1" name="R1" reversible="true" fast="false" fbc:lowerFluxBound="FB1NInf" fbc:upperFluxBound="FB3NInf">
<listOfReactants>
<speciesReference species="M_e1e" stoichiometry="1" constant="true"/>
<speciesReference species="e1e" stoichiometry="1" constant="true"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="M_m1c" stoichiometry="1" constant="true"/>
<speciesReference species="m1c" stoichiometry="1" constant="true"/>
</listOfProducts>
</reaction>
<reaction metaid="R_R2" sboTerm="SBO:0000176" id="R_R2" name="R2" reversible="true" fast="false" fbc:lowerFluxBound="FB1NInf" fbc:upperFluxBound="FB3NInf">
<reaction metaid="R2" sboTerm="SBO:0000176" id="R2" name="R2" reversible="true" fast="false" fbc:lowerFluxBound="FB1NInf" fbc:upperFluxBound="FB3NInf">
<annotation>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#" xmlns:vCard4="http://www.w3.org/2006/vcard/ns#" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/" xmlns:bqmodel="http://biomodels.net/model-qualifiers/">
<rdf:Description rdf:about="#R_R2">
<rdf:Description rdf:about="#R2">
<bqbiol:is>
<rdf:Bag>
<rdf:li rdf:resource="https://identifiers.org/ec-code/1.1.1.1"/>
Expand All @@ -67,10 +52,10 @@
</rdf:RDF>
</annotation>
<listOfReactants>
<speciesReference species="M_m1c" stoichiometry="1" constant="true"/>
<speciesReference species="m1c" stoichiometry="1" constant="true"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="M_m2c" stoichiometry="1" constant="true"/>
<speciesReference species="m2c" stoichiometry="1" constant="true"/>
</listOfProducts>
<fbc:geneProductAssociation>
<fbc:or>
Expand All @@ -82,10 +67,10 @@
</fbc:or>
</fbc:geneProductAssociation>
</reaction>
<reaction metaid="R_R3" sboTerm="SBO:0000176" id="R_R3" name="R3" reversible="false" fast="false" fbc:lowerFluxBound="FB2N0" fbc:upperFluxBound="FB3NInf">
<reaction metaid="R3" sboTerm="SBO:0000176" id="R3" name="R3" reversible="false" fast="false" fbc:lowerFluxBound="FB2N0" fbc:upperFluxBound="FB3NInf">
<annotation>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#" xmlns:vCard4="http://www.w3.org/2006/vcard/ns#" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/" xmlns:bqmodel="http://biomodels.net/model-qualifiers/">
<rdf:Description rdf:about="#R_R3">
<rdf:Description rdf:about="#R3">
<bqbiol:is>
<rdf:Bag>
<rdf:li rdf:resource="https://identifiers.org/ec-code/1.1.2.1"/>
Expand All @@ -95,27 +80,27 @@
</rdf:RDF>
</annotation>
<listOfReactants>
<speciesReference species="M_m1c" stoichiometry="1" constant="true"/>
<speciesReference species="m1c" stoichiometry="1" constant="true"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="M_m2c" stoichiometry="1" constant="true"/>
<speciesReference species="m2c" stoichiometry="1" constant="true"/>
</listOfProducts>
<fbc:geneProductAssociation>
<fbc:geneProductRef fbc:geneProduct="G4"/>
</fbc:geneProductAssociation>
</reaction>
<reaction metaid="R_R4" sboTerm="SBO:0000176" id="R_R4" name="R4" reversible="false" fast="false" fbc:lowerFluxBound="FB2N0" fbc:upperFluxBound="FB3NInf">
<reaction metaid="R4" sboTerm="SBO:0000176" id="R4" name="R4" reversible="false" fast="false" fbc:lowerFluxBound="FB2N0" fbc:upperFluxBound="FB3NInf">
<listOfReactants>
<speciesReference species="M_m1c" stoichiometry="1" constant="true"/>
<speciesReference species="m1c" stoichiometry="1" constant="true"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="M_m2c" stoichiometry="1" constant="true"/>
<speciesReference species="m2c" stoichiometry="1" constant="true"/>
</listOfProducts>
</reaction>
<reaction metaid="R_R5" sboTerm="SBO:0000176" id="R_R5" name="R5" reversible="false" fast="false" fbc:lowerFluxBound="FB2N0" fbc:upperFluxBound="FB3NInf">
<reaction metaid="R5" sboTerm="SBO:0000176" id="R5" name="R5" reversible="false" fast="false" fbc:lowerFluxBound="FB2N0" fbc:upperFluxBound="FB3NInf">
<annotation>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#" xmlns:vCard4="http://www.w3.org/2006/vcard/ns#" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/" xmlns:bqmodel="http://biomodels.net/model-qualifiers/">
<rdf:Description rdf:about="#R_R5">
<rdf:Description rdf:about="#R5">
<bqbiol:is>
<rdf:Bag>
<rdf:li rdf:resource="https://identifiers.org/ec-code/1.1.1.3"/>
Expand All @@ -125,25 +110,25 @@
</rdf:RDF>
</annotation>
<listOfReactants>
<speciesReference species="M_m2c" stoichiometry="1" constant="true"/>
<speciesReference species="m2c" stoichiometry="1" constant="true"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="M_e2e" stoichiometry="1" constant="true"/>
<speciesReference species="e2e" stoichiometry="1" constant="true"/>
</listOfProducts>
<fbc:geneProductAssociation>
<fbc:geneProductRef fbc:geneProduct="G5"/>
</fbc:geneProductAssociation>
</reaction>
<reaction metaid="R_S2" sboTerm="SBO:0000176" id="R_S2" name="S2" reversible="true" fast="false" fbc:lowerFluxBound="FB1NInf" fbc:upperFluxBound="FB3NInf">
<reaction metaid="S2" sboTerm="SBO:0000176" id="S2" name="S2" reversible="true" fast="false" fbc:lowerFluxBound="FB1NInf" fbc:upperFluxBound="FB3NInf">
<listOfReactants>
<speciesReference species="M_e2e" stoichiometry="1" constant="true"/>
<speciesReference species="e2e" stoichiometry="1" constant="true"/>
</listOfReactants>
</reaction>
</listOfReactions>
<fbc:listOfObjectives fbc:activeObjective="obj">
<fbc:objective fbc:id="obj" fbc:type="maximize">
<fbc:listOfFluxObjectives>
<fbc:fluxObjective fbc:reaction="R_R5" fbc:coefficient="1"/>
<fbc:fluxObjective fbc:reaction="R5" fbc:coefficient="1"/>
</fbc:listOfFluxObjectives>
</fbc:objective>
</fbc:listOfObjectives>
Expand Down
2 changes: 1 addition & 1 deletion test/unit_tests/getGeckoTestModel.m
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
function testModel = getGeckoTestModel()

testModel = struct();
testModel.name = 'testModel';
testModel.id = 'testModel';
testModel.name = 'testModel';
testModel.annotation.defaultLB = -Inf;
testModel.annotation.defaultUB = Inf;
testModel.date = datestr(now,29);
Expand Down

0 comments on commit 8af53fb

Please sign in to comment.