Repository navigation
read_yaml_model reads empty enzymes maps and quotes inside values; fseof follows ecFSEOF - #185
Merged
Merged
Conversation
An ec reaction without enzymes is written as '- enzymes: !!omap' with no content; the reader now gives it no enzymes, as RAVEN's readYAMLmodel does. A scalar written as ""text"" is repaired line by line only after the strict parse fails, and reads as "text".
…value The fallback after a failed strict parse now repairs any double-quoted value with an unescaped interior quote, not only one that starts and ends with a doubled quote. The outer pair is dropped and \\ and \" are unescaped, as readYAMLmodel does.
… step RAVEN's solveLP minimises the flux sum with the objective fixed at 0.999999 of the optimum it just found. fseof demanded the full value, which the HiGHS solver of the scipy interface rejects at the top level of ecYeastGEM because its optimum is accurate only to the feasibility tolerance. All enforced levels are now returned on scipy, as on Gurobi and GLPK.
The fallback after a failed strict parse now also repairs a single-quoted value with an apostrophe that no second apostrophe pairs with, such as 'it's'. The outer pair is dropped and each '' is read as ', as readYAMLmodel does.
…d can fix the target The top of the scan is max_fraction of the target flux in the pFBA solution that maximises the target, as RAVEN's FSEOF and GECKO's ecFSEOF do. Targets of equal score keep model order. The new equality option fixes the target flux at each level, as ecFSEOF does.
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.
read_yaml_modelreads the ecModel files that GECKO and RAVEN write, andfseoffollows GECKO'secFSEOFwhere it differs.YAML reader.
read_yaml_modelreads the same files as RAVEN'sreadYAMLmodel, which is line based:- enzymes: !!omapwith nothing under the tag (GECKO and RAVEN write this for a reaction without enzymes) is read as a reaction with no enzymes. It raisedAttributeError: 'ScalarNode' object has no attribute 'flow_style'. The tutorial light Human-GEMecModel.ymlhas 52 such reactions and eciYali5-GEM has 29.""text""or"a "b" c", is read as"text"anda "b" c: the outer pair of quotes is dropped and\\and\"are unescaped. Older RAVEN (writeYAMLmodelwithpreserveQuotes) wrote a note that carried its own quotes this way, and eciYali5-GEM has three of them.'it's', is read asit's.fseof.fseofsolves each level the way RAVEN'ssolveLPand GECKO'secFSEOFdo:max_fractiontimes the target flux in the pFBA solution that maximises the target, where it took the plain maximum (a difference of about 1e-6 relative).equality=Truefixes the target flux at each level, asecFSEOFdoes. The default keeps the lower bound of RAVEN'sFSEOF.Used by CompMetEng/geckopy#72 and the comparison in CompMetEng/raven-gecko-parity#141.