Skip to content

Commit c2bfdf1

Browse files
committed
GECKO 3.2.4
2 parents f23c057 + 1e2762d commit c2bfdf1

5 files changed

Lines changed: 59 additions & 49 deletions

File tree

doc/src/geckomat/gather_kcats/getStandardKcat.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,8 @@ <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" sr
280280
0178 proteinStdMets.mets = <span class="string">'prot_standard'</span>;
281281
0179 proteinStdMets.metNames = proteinStdMets.mets;
282282
0180 <span class="comment">% Validate compartment</span>
283-
0181 proteinStdMets.compartments = strcmp(model.compNames,params.enzyme_comp);
284-
0182 <span class="keyword">if</span> ~any(proteinStdMets.compartments)
283+
0181 compartmentID = strcmp(model.compNames,params.enzyme_comp);
284+
0182 <span class="keyword">if</span> ~any(compartmentID)
285285
0183 error([<span class="string">'Compartment '</span> params.enzyme_comp <span class="string">' (specified in params.enzyme_comp) '</span><span class="keyword">...</span>
286286
0184 <span class="string">'cannot be found in model.compNames'</span>])
287287
0185 <span class="keyword">end</span>

doc/src/geckomat/utilities/getSubsetEcModel.html

Lines changed: 48 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -86,49 +86,54 @@ <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" sr
8686
0022 <span class="comment">% Usage: smallEcModel = getSubsetEcModel(smallGEM,bigEcModel)</span>
8787
0023
8888
0024 <span class="comment">% Check if models were derived from the same starting GEM</span>
89-
0025 rxnsDiff = find(~ismember(smallGEM.rxns,bigEcModel.rxns));
90-
0026 <span class="keyword">if</span> numel(rxnsDiff) &gt; 0
91-
0027 dispEM([<span class="string">'While both models should have derived from the same starting '</span>,<span class="keyword">...</span>
92-
0028 <span class="string">'GEM, the following reactions from smallGEM could not be found '</span>,<span class="keyword">...</span>
93-
0029 <span class="string">'in bigEcModel:'</span>],true,smallGEM.rxns(rxnsDiff),false);
94-
0030 <span class="keyword">end</span>
95-
0031
96-
0032 <span class="comment">% Check if original bigEcModel contains context-dependent protein constraints</span>
97-
0033 <span class="keyword">if</span> any(bigEcModel.lb(startsWith(bigEcModel.rxns,<span class="string">'usage_prot_'</span>)) ~= -1000)
98-
0034 printOrange([<span class="string">'WARNING: The bigEcModel is constraint by protein concentrations that are\n'</span> <span class="keyword">...</span>
99-
0035 <span class="string">'likely not relevant in the constructed smallEcModel.\n'</span>]);
100-
0036 <span class="keyword">end</span>
101-
0037
102-
0038 <span class="comment">% Remove genes (and associated reactions) that are absent in smallGEM</span>
103-
0039 genesToRemove = setdiff(bigEcModel.genes,smallGEM.genes);
104-
0040 smallEcModel = removeGenes(bigEcModel,genesToRemove,true,true,false);
105-
0041
106-
0042 <span class="comment">% Remove genes from ec-structure</span>
107-
0043 enzToRemove = ismember(smallEcModel.ec.genes,genesToRemove);
108-
0044 smallEcModel.ec.genes(enzToRemove) = [];
109-
0045 smallEcModel.ec.enzymes(enzToRemove) = [];
110-
0046 smallEcModel.ec.concs(enzToRemove) = [];
111-
0047 smallEcModel.ec.mw(enzToRemove) = [];
112-
0048 smallEcModel.ec.sequence(enzToRemove) = [];
113-
0049 smallEcModel.ec.rxnEnzMat(:,enzToRemove) = [];
114-
0050
115-
0051 <span class="comment">% Remove any reaction (except prot_ associated) that is absent from smallGEM</span>
116-
0052 trimRxns = regexprep(smallEcModel.rxns,<span class="string">'_REV|_EXP_\d+'</span>,<span class="string">''</span>);
117-
0053 protRxns = startsWith(smallEcModel.rxns,{<span class="string">'usage_prot_'</span>,<span class="string">'prot_pool_exchange'</span>});
118-
0054 keepRxns = ismember(trimRxns,smallGEM.rxns) | protRxns;
119-
0055 smallEcModel = removeReactions(smallEcModel,~keepRxns, true, true, true);
120-
0056
121-
0057 <span class="comment">% Remove reactions from ec-structure</span>
122-
0058 ecRxnsToRemove = ~ismember(smallEcModel.ec.rxns,smallEcModel.rxns);
123-
0059
124-
0060 smallEcModel.ec.rxns(ecRxnsToRemove) = [];
125-
0061 smallEcModel.ec.kcat(ecRxnsToRemove) = [];
126-
0062 smallEcModel.ec.source(ecRxnsToRemove) = [];
127-
0063 smallEcModel.ec.notes(ecRxnsToRemove) = [];
128-
0064 smallEcModel.ec.eccodes(ecRxnsToRemove) = [];
129-
0065 smallEcModel.ec.rxnEnzMat(ecRxnsToRemove,:) = [];
130-
0066 <span class="keyword">end</span>
131-
0067</pre></div>
89+
0025 Rxn_format = regexprep(bigEcModel.rxns,<span class="string">'_REV|_EXP_\d+'</span>,<span class="string">''</span>);
90+
0026 rxnsDiff = find(~ismember(smallGEM.rxns,Rxn_format));
91+
0027 <span class="keyword">if</span> numel(rxnsDiff) &gt; 0
92+
0028 dispEM([<span class="string">'While both models should have derived from the same starting '</span>,<span class="keyword">...</span>
93+
0029 <span class="string">'GEM, the following reactions from smallGEM could not be found '</span>,<span class="keyword">...</span>
94+
0030 <span class="string">'in bigEcModel:'</span>],true,smallGEM.rxns(rxnsDiff),false);
95+
0031 <span class="keyword">end</span>
96+
0032
97+
0033 <span class="comment">% Check if original bigEcModel contains context-dependent protein constraints</span>
98+
0034 <span class="keyword">if</span> any(bigEcModel.lb(startsWith(bigEcModel.rxns,<span class="string">'usage_prot_'</span>)) ~= -1000)
99+
0035 printOrange([<span class="string">'WARNING: The bigEcModel is constraint by protein concentrations that are\n'</span> <span class="keyword">...</span>
100+
0036 <span class="string">'likely not relevant in the constructed smallEcModel.\n'</span>]);
101+
0037 <span class="keyword">end</span>
102+
0038
103+
0039 <span class="comment">% Remove genes (and associated reactions) that are absent in smallGEM</span>
104+
0040 genesToRemove = setdiff(bigEcModel.genes,smallGEM.genes);
105+
0041 <span class="comment">% If genesToRemove contains &quot;standard&quot;, then remove this entry</span>
106+
0042 <span class="keyword">if</span> ismember(<span class="string">'standard'</span>, genesToRemove)
107+
0043 genesToRemove(strcmp(genesToRemove, <span class="string">'standard'</span>)) = [];
108+
0044 <span class="keyword">end</span>
109+
0045 smallEcModel = removeGenes(bigEcModel,genesToRemove,true,true,false);
110+
0046
111+
0047 <span class="comment">% Remove genes from ec-structure</span>
112+
0048 enzToRemove = ismember(smallEcModel.ec.genes,genesToRemove);
113+
0049 smallEcModel.ec.genes(enzToRemove) = [];
114+
0050 smallEcModel.ec.enzymes(enzToRemove) = [];
115+
0051 smallEcModel.ec.concs(enzToRemove) = [];
116+
0052 smallEcModel.ec.mw(enzToRemove) = [];
117+
0053 smallEcModel.ec.sequence(enzToRemove) = [];
118+
0054 smallEcModel.ec.rxnEnzMat(:,enzToRemove) = [];
119+
0055
120+
0056 <span class="comment">% Remove any reaction (except prot_ associated) that is absent from smallGEM</span>
121+
0057 trimRxns = regexprep(smallEcModel.rxns,<span class="string">'_REV|_EXP_\d+'</span>,<span class="string">''</span>);
122+
0058 protRxns = startsWith(smallEcModel.rxns,{<span class="string">'usage_prot_'</span>,<span class="string">'prot_pool_exchange'</span>});
123+
0059 keepRxns = ismember(trimRxns,smallGEM.rxns) | protRxns;
124+
0060 smallEcModel = removeReactions(smallEcModel,~keepRxns, true, true, true);
125+
0061
126+
0062 <span class="comment">% Remove reactions from ec-structure</span>
127+
0063 ecRxnsToRemove = ~ismember(smallEcModel.ec.rxns,smallEcModel.rxns);
128+
0064
129+
0065 smallEcModel.ec.rxns(ecRxnsToRemove) = [];
130+
0066 smallEcModel.ec.kcat(ecRxnsToRemove) = [];
131+
0067 smallEcModel.ec.source(ecRxnsToRemove) = [];
132+
0068 smallEcModel.ec.notes(ecRxnsToRemove) = [];
133+
0069 smallEcModel.ec.eccodes(ecRxnsToRemove) = [];
134+
0070 smallEcModel.ec.rxnEnzMat(ecRxnsToRemove,:) = [];
135+
0071 <span class="keyword">end</span>
136+
0072</pre></div>
132137
<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>
133138
</body>
134139
</html>

src/geckomat/gather_kcats/getStandardKcat.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@
178178
proteinStdMets.mets = 'prot_standard';
179179
proteinStdMets.metNames = proteinStdMets.mets;
180180
% Validate compartment
181-
proteinStdMets.compartments = strcmp(model.compNames,params.enzyme_comp);
182-
if ~any(proteinStdMets.compartments)
181+
compartmentID = strcmp(model.compNames,params.enzyme_comp);
182+
if ~any(compartmentID)
183183
error(['Compartment ' params.enzyme_comp ' (specified in params.enzyme_comp) '...
184184
'cannot be found in model.compNames'])
185185
end

src/geckomat/utilities/getSubsetEcModel.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
% Usage: smallEcModel = getSubsetEcModel(smallGEM,bigEcModel)
2323

2424
% Check if models were derived from the same starting GEM
25-
rxnsDiff = find(~ismember(smallGEM.rxns,bigEcModel.rxns));
25+
Rxn_format = regexprep(bigEcModel.rxns,'_REV|_EXP_\d+','');
26+
rxnsDiff = find(~ismember(smallGEM.rxns,Rxn_format));
2627
if numel(rxnsDiff) > 0
2728
dispEM(['While both models should have derived from the same starting ',...
2829
'GEM, the following reactions from smallGEM could not be found ',...
@@ -37,6 +38,10 @@
3738

3839
% Remove genes (and associated reactions) that are absent in smallGEM
3940
genesToRemove = setdiff(bigEcModel.genes,smallGEM.genes);
41+
% If genesToRemove contains "standard", then remove this entry
42+
if ismember('standard', genesToRemove)
43+
genesToRemove(strcmp(genesToRemove, 'standard')) = [];
44+
end
4045
smallEcModel = removeGenes(bigEcModel,genesToRemove,true,true,false);
4146

4247
% Remove genes from ec-structure

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.2.3
1+
3.2.4

0 commit comments

Comments
 (0)