Skip to content

Commit

Permalink
fix/feat: various, including ecFVA, enzymeUsage, constrainEnzConcs, c…
Browse files Browse the repository at this point in the history
…onstrainFluxData (#382)

* fix: getECfromDatabase correct input parameter doc

* feat: makeEcModel error if none of proteins match

* fix: getStandardKcat not remove if real enzyme

* style: various

* todo: refactor fuzzyKcatMatching to use regexprep

* fix: calculateFfactor handle protData multi conds

* fix getStandardKcat

* feat: setKcatForReactions allows multiple kcat as input

* feat: reportEnzymeUsage if enzyme cat. more rxns

* chore: updateGECKOdoc

* fix: reportEnzymeUsage correct percUsage

* fix: constrainFluxData (-)1000 constraints

* fix: ecFVA correct swapped rev fluxes

* fix: reportEnzymeUsage highUsage split isozymes

* refactor: fuzzyKcatMatching use regexprep

* fix: plotEcFVA cdfplot and only plot non-zero rxns

* feat: constrainEnzConcs can remove enzConstraints

* chore: rerun tutorials

* fix: getStandardKcat for light ecModels

* fix: constrainEnzConcs remove enz constraints
  • Loading branch information
edkerk authored Jun 7, 2024
1 parent 10cfd74 commit 8a9ebca
Show file tree
Hide file tree
Showing 35 changed files with 4,261 additions and 5,064 deletions.
286 changes: 144 additions & 142 deletions doc/src/geckomat/change_model/makeEcModel.html

Large diffs are not rendered by default.

47 changes: 27 additions & 20 deletions doc/src/geckomat/change_model/setKcatForReactions.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,26 +88,33 @@ <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" sr
0022 <span class="comment">% changed reactions will read 'from setKcatForReactions'</span>
0023 <span class="comment">%</span>
0024 <span class="comment">% Usage: ecModel = setKcatForReactions(ecModel,rxnIds,kcat)</span>
0025 <span class="keyword">if</span> numel(kcat)&gt;1
0026 error(<span class="string">'Provide one kcat'</span>)
0027 <span class="keyword">end</span>
0028 rxnIds = convertCharArray(rxnIds);
0029
0030 hasExp = ~cellfun(@isempty,regexp(rxnIds,<span class="string">'_EXP_\d+$'</span>));
0031 nonExpRxns = regexprep(ecModel.ec.rxns,<span class="string">'_EXP_\d+$'</span>,<span class="string">''</span>);
0032 rxnsToChange = [];
0033 <span class="keyword">for</span> i=1:numel(hasExp)
0034 <span class="keyword">if</span> hasExp(i) == 1
0035 rxnsToChange = [rxnsToChange; find(strcmpi(ecModel.ec.rxns,rxnIds{i}))];
0036 <span class="keyword">else</span>
0037 nonExpRxn = regexprep(rxnIds(i),<span class="string">'_EXP_\d+$'</span>,<span class="string">''</span>);
0038 rxnsToChange = [rxnsToChange; find(strcmpi(nonExpRxns,nonExpRxn))];
0039 <span class="keyword">end</span>
0040 <span class="keyword">end</span>
0041
0042 ecModel.ec.kcat(rxnsToChange) = kcat;
0043 ecModel.ec.source(rxnsToChange) = {<span class="string">'from setKcatForReactions'</span>};
0044 <span class="keyword">end</span></pre></div>
0025 rxnIds = convertCharArray(rxnIds);
0026
0027 hasExp = ~cellfun(@isempty,regexp(rxnIds,<span class="string">'_EXP_\d+$'</span>));
0028 nonExpRxns = regexprep(ecModel.ec.rxns,<span class="string">'_EXP_\d+$'</span>,<span class="string">''</span>);
0029 rxnsToChange = [];
0030 <span class="keyword">for</span> i=1:numel(hasExp)
0031 <span class="keyword">if</span> hasExp(i) == 1
0032 rxnsToChange = [rxnsToChange; find(strcmpi(ecModel.ec.rxns,rxnIds{i}))];
0033 <span class="keyword">else</span>
0034 nonExpRxn = regexprep(rxnIds(i),<span class="string">'_EXP_\d+$'</span>,<span class="string">''</span>);
0035 rxnsToChange = [rxnsToChange; find(strcmpi(nonExpRxns,nonExpRxn))];
0036 <span class="keyword">end</span>
0037 <span class="keyword">end</span>
0038 <span class="keyword">if</span> isscalar(rxnsToChange)
0039 <span class="keyword">if</span> length(kcat) ~= 1
0040 error(<span class="string">'Found one reaction whose kcat should change, you should provide one kcat value only.'</span>)
0041 <span class="keyword">end</span>
0042 <span class="keyword">else</span>
0043 <span class="keyword">if</span> isscalar(kcat)
0044 <span class="comment">% Is fine, all reactions get the same kcat</span>
0045 <span class="keyword">elseif</span> length(kcat) ~= length(rxnsToChange)
0046 error(<span class="string">'Found %d reactions whose kcat should change, the new kcat should be either a single value, or a vector of length %d.'</span>, length(rxnsToChange), length(rxnsToChange))
0047 <span class="keyword">end</span>
0048 <span class="keyword">end</span>
0049 ecModel.ec.kcat(rxnsToChange) = kcat;
0050 ecModel.ec.source(rxnsToChange) = {<span class="string">'from setKcatForReactions'</span>};
0051 <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>
827 changes: 407 additions & 420 deletions doc/src/geckomat/gather_kcats/fuzzyKcatMatching.html

Large diffs are not rendered by default.

328 changes: 169 additions & 159 deletions doc/src/geckomat/gather_kcats/getStandardKcat.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions doc/src/geckomat/gather_kcats/mergeDLKcatAndFuzzyKcats.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="
BRENDA matches (Optional, default 3)

Output:
mergedKcatList The merged list of kcats
mergedKcatList merged list of kcats

The origin parameter:
1: correct organism, correct substrate, kcat
Expand Down Expand Up @@ -111,7 +111,7 @@ <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" sr
0024 <span class="comment">% BRENDA matches (Optional, default 3)</span>
0025 <span class="comment">%</span>
0026 <span class="comment">% Output:</span>
0027 <span class="comment">% mergedKcatList The merged list of kcats</span>
0027 <span class="comment">% mergedKcatList merged list of kcats</span>
0028 <span class="comment">%</span>
0029 <span class="comment">% The origin parameter:</span>
0030 <span class="comment">% 1: correct organism, correct substrate, kcat</span>
Expand Down
Loading

0 comments on commit 8a9ebca

Please sign in to comment.