Repository navigation
Fixes from the RAVEN 3 Guide review - #7
Merged
Merged
Conversation
The closed-form background correction assumes genes drawn with replacement from the scored-gene pool, which needs the population standard deviation. Scores now match raven-toolbox. The help states that results are sorted by Z-score and that P-values are one-sided.
Gurobi rejects a dense model.A, so randomSampling with method 'chrr' failed whenever Gurobi was the RAVEN solver.
…ification When every reaction is a dead end, simplifyModel removes them all and the LP has an empty constraint matrix, which GLPK rejects.
… negative scaleBiomassFraction rescales the balancing component so the biomass total becomes 1 g/gDW. A required fraction of zero or less inverted the balancing pseudoreaction without notice; it now raises an error, as does a balancing component with no current fraction. The help states that the total becomes 1 g/gDW.
optimizeProb no longer refuses a MILP when 'glpk' is the RAVEN solver. The bundled GLPK MEX supports integer variables and gives the same answers as Gurobi on the gap-filling and minimal-medium problems of the guide models. A RAVEN:glpkMILP warning recommends Gurobi for larger problems. The GLPK branch uses the default time limit for MILPs and reports a mipgap, as the Gurobi and SCIP branches do. MILPs through the COBRA Toolbox's GLPK interface are still refused. The help of setRavenSolver, gapFillMILP, fillGaps and getMinimalMedium states the solver behaviour; getMinimalMedium also states that the returned medium need not be unique.
A metaboliteName[comp] that matches more than one metabolite ended in an unexplained assignment error. The error now names the matching metabolites.
- randomSampling: the random-objective description applies to 'randomObjective' only, not to the default ACHR. - checkTasks: the model's own exchange reactions are not closed. - findGeneDeletions: details 2 means the solve failed, not that the deletion is lethal. - checkSolution: it reads an optimizeProb result, not a Mosek one. - assignSBOterms: where the terms are stored and how to read them. - haveFlux: the test uses the current bounds.
readYAMLmodel treated any indented line starting with '-' as a list item, so a wrapped name continuing with '-epoxidizing)' was reported as an unknown entry. Only a dash followed by a space, or a lone dash, starts a list item. This made the kegg118 reference model unreadable and with it getKEGGModelForOrganism.
curateModelFromTables read its tables by column position, so a metabolite table without an inchi column wrote its notes over the InChIs. Columns are now found by header name, in any order, and optional columns can be left out. Every supplied field is written to existing metabolites, genes and reactions as well as to new ones, including metNotes and rxnReferences, which were never written to existing entities; a field the model lacks is created. MIRIAM columns of the reaction table are taken from the columns after the core fields rather than from a fixed position, and grRules are matched to the right existing reaction when existing and new reactions are mixed.
…lMILP Every draft reaction with lb >= 0 is a reversal candidate, and its lower bound was relaxed to -bigM with a coupling that only kept the flux non-negative while the reaction was not reversed. A forced flux such as a maintenance requirement (lb > 0) was therefore dropped, and the MILP could report a repair, or no repair, that does not reach the growth floor in the returned model. The coupling now keeps the original lower bound unless the reaction is reversed.
…del has none The kegg118 reference model has no reaction notes, so readYAMLmodel returns no rxnNotes field and adding the provenance note failed.
…sible model gapFillMILP no longer reverses draft reactions: the draft keeps its bounds and the MILP minimises the number of added reactions. The reversedRxns output and the weights parameter are removed. gapReport raises RAVEN:infeasibleModel when the model is infeasible under its own bounds or with its boundary closed, naming the forced-flux reactions.
Contributor
Function test results417 tests 378 ✅ 1m 29s ⏱️ Results for commit d228364. ♻️ This comment has been updated with latest results. |
edkerk
force-pushed
the
fix/guide-review
branch
from
October 17, 2026 20:15
2216560 to
d228364
Compare
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 found while reviewing the RAVEN 3 Guide.
Gap filling
gapFillMILPonly adds reactions from the universal model, choosing the fewest that reach the growth floor. Draft reactions keep their bounds, forced fluxes included; a reaction in the wrong direction is left for curation. Outputs are now[addedRxns, newModel, exitFlag];reversedRxnsandweightsare removed.gapReportraisesRAVEN:infeasibleModelwhen the model is infeasible under its own bounds, or with its boundary closed, naming the reactions with a forced flux and asking to set ATP maintenance to zero first.Solvers
optimizeProbsolves MILPs with the bundled GLPK, with aRAVEN:glpkMILPwarning that recommends Gurobi.sampleChebyshevCenterpasses a sparse constraint matrix.Analysis and curation
curateModelFromTablesreads columns by header and writes every given field to existing entities.reporterMetabolitesuses the population standard deviation in the closed-form background correction, which assumes genes drawn with replacement; scores now match raven-toolbox.haveFluxreturns all-blocked when no reaction survives simplification; its help states how a dead end with a forced flux is treated.scaleBiomassFractionrefuses a balance that would make the balancing component negative.getIndexesraises a clear error for an ambiguousname[comp].getKEGGModelForOrganismcreatesrxnNoteswhen the reference model has none.I/O
readYAMLmodelreads folded scalars whose continuation line starts with a dash (the KEGG 118 model now reads).Help text
curateModelFromTableswarning.