Add user guide page 17: comparing models - #38
Merged
Merged
Conversation
Two questions, two tools: diffModels/diff_models for an exact, entry-by-entry answer to "did anything change", and compareRxnsGenesMetsComps/compare_models for "how alike are these" across whole sets. Both run on smallYeast against smallYeastBad, the same model with deliberate errors. The pairing makes the page's point on its own. The two models score 0.945 on reaction-set similarity, and the eleven differences the diff lists include a doubled stoichiometric coefficient and a reaction turned irreversible -- so on the same medium with the same objective, the good model grows at 0.1222 and the broken one does not grow at all. A similarity score is for grouping models, not for validating one. Also documents that the two overlap functions are indexed in opposite directions: RAVEN's matrix has a row per combination of models with nElements counting each, raven-toolbox's a row per identifier with a column per model.
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.
Adds user guide page 17, Comparing models — the exact diff and the
set-overlap overview, run on
smallYeastagainstsmallYeastBad(the samemodel with deliberate errors). MATLAB and Python side by side, every example
executed.
The pairing makes the point by itself
The eleven differences include a doubled stoichiometric coefficient and a
reaction turned irreversible — changes that barely move a set-overlap score and
stop the model growing entirely. A similarity score is for grouping models, not
for validating one, and the page says so where a reader will meet the number.
Both toolboxes independently report the same 11 differences and the same
52-of-55 shared reactions.
Also documented
diff_modelsreturns a falsy report when models differ, soassert diff_models(before, after)is a working regression test for a curationscript;
report.equaldoes the same in MATLAB.matrix has one row per combination of models with
nElementscounting each,raven-toolbox's has one row per identifier with a column per model.
compareRxnsGenesMetsCompsprints a full breakdown unless given'printResults', false.-0.0000; noted so it does not read as anegative growth rate.
Checks
check_names.pyclean (nElements,smallYeastBadadded to the allowlist)The guide is now 17 pages, 175 examples, no skips.