Repository navigation
sigmaFitter, getStandardKcat and getSubsetEcModel: plateau, subsystem case, empty subsystems, light ecModels - #15
Merged
Merged
Conversation
Growth that is flat from some sigma on is returned with rounding noise by some solvers. The smallest sigma whose growth is within 1e-9 (relative) of the best growth is now chosen instead of the exact minimum error.
…bSystems, models without genes to remove, light ecModels getStandardKcat treats subSystem names that differ only in letter case as one subSystem, as its lookup already did, instead of raising when two list entries match. A reaction with an empty subSystem gets the model-wide standard kcat instead of raising an index error. getSubsetEcModel returns the model when no gene has to be removed, instead of raising in removeGenes. In a light ecModel the reaction identifiers of the ec structure carry the prefix 001_ and were all compared to the model reactions with it, so every entry was removed. The prefix is now removed before the comparison.
Unit test results63 tests 63 ✅ 13s ⏱️ Results for commit 793593c. |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes in
sigmaFitter,getStandardKcatandgetSubsetEcModelthat the comparison with geckopy (CompMetEng/raven-gecko-parity#141) turned up.sigmaFitterreturns the start of the growth plateau on every solver. When several sigma values give the same error, the error values on a plateau carry noise of about 1e-14 on GLPK, sominpicked a point inside the plateau. It now takes the first sigma whose error is within a tolerance of the minimum, which gives 0.06 with GLPK and with Gurobi in the case of a binding uptake cap.getStandardKcattreats subsystem names that differ only in letter case as one subsystem. The list was built with a case-sensitiveuniqueand looked up withstrcmpi, so a model withPentose phosphate pathwayandPentose Phosphate Pathway(Human-GEM) failed with "Unable to perform assignment because the left and right sides have a different number of elements".getStandardKcathandles a reaction with an empty subsystem, which gets the model-wide standard kcat. It raised "Index exceeds array bounds" when other reactions had a subsystem (iYali5-GEM).getSubsetEcModelreturns the model unchanged when no gene has to be removed.removeGeneswas called with an empty list and raised.getSubsetEcModelkeeps the ec entries of the reactions that stay in a light ecModel. The ids inec.rxnscarry the001_prefix and the ids inmodel.rxnsdo not, so every ec entry was dropped.