RAVEN release notes#
Unreleased#
Breaking changes#
getModelFromHomologywithcomplexPolicydropremoves each complex that has a subunit without an ortholog, and removes the reaction only when no complex remains (was: the reaction was removed as soon as one subunit had no ortholog). For the rule(A and B) or (C and D)without an ortholog ofB, the draft has the orthologs ofCandD.
Fixes#
getModelFromHomologyreads the rule as a tree, in whichandbinds tighter thanor, when it removes the placeholder genes of isozymes without an ortholog (was: it removed a placeholder that stood beside anortoken, also when the placeholder belongs to a complex). A placeholder in anorgroup is removed when the group has a member that is not a placeholder, in nested groups as well. For the rule(A or B and C) and Dwithout an ortholog ofB, wherenA,nCandnDare the orthologs ofA,CandD, the draft rule is(nA or (OLD_T_B and nC)) and nDunderflag,(nA or nC) and nDunderkeepandnA and nDunderdrop; it wasnA and nC and nDunder all three. The result differs from before only for rules with unbracketedandandoror with nestedorgroups.
Data#
The KEGG assets are the
kegg120release oftoolbox-assets(was:kegg118), andfetchToolboxAssetreads the manifestmanifest-v5.
3.0.0b2 (2026-11-01)#
Second beta toward 3.0. Changes below are relative to 3.0.0b1.
Breaking changes#
The folder layout changed (see Repository layout and downloads); code that adds RAVEN folders to the path or addresses binaries by path needs the new paths.
fetchRavenDataAssetis replaced byfetchToolboxAsset.gapFillMILPreturns[addedRxns, newModel, exitFlag]and has noweightsoption.sortModelkeeps the directions of the reactions unlesssortReversibleis requested (was: it sorted them by default).parseTaskListrefuses a binary.xlsfile.gapReport,scaleBiomassFraction,getModelFromHomologyandgetIndexesraise errors in cases they accepted before (see below).
Repository layout and downloads#
The MATLAB code is in
src/(was: folders in the repository root), the tests intests/(was:testing/), the generated help pages indocs/html/(was:doc/), the readme files indocs/readme/, the logo inimg/(was:RAVEN.png), and the tutorials intutorials/with data undertutorials/data(was:tutorial/). The external software is insrc/external(was:software/).checkRaven,downloadRavenBinaries,getBlast,getDiamond,getKEGGModelForOrganism,optimizeProb,setRavenSolverandupdateDocumentationuse the new paths.parseHPA,parseHPArnaandscoreModelare inINIT/(was:omics/, which is removed).tOmics.mis merged intotINIT.m.fetchToolboxAssetreplacesfetchRavenDataAsset, and assets are downloaded fromCompMetEng/toolbox-assets(was: raven-data).downloadRavenBinaries,buildGlobalKEGGModel,getKEGGModelForOrganism,getModelFromKEGG,getPhylDist,keggDataVersionandcheckRavenuse it.fetchToolboxAssetdownloads to a.partfile and checks the SHA-256 sum listed in themanifest-v3of toolbox-assets. A mismatch deletes the file and raises an error; an asset that the manifest does not list, or a manifest that cannot be read, gives a warning.The repository, documentation and version-check links point to
CompMetEng.
I/O#
writeYAMLmodelwrites an ec reaction without enzymes (a row of zeros inmodel.ec.rxnEnzMat) with noenzymesentry (was:- enzymes: !!omapwith nothing under it, which is not valid YAML).readYAMLmodelreads a missingenzymesentry as a reaction without enzymes, and reads- enzymes: !!omapwith no entries and- enzymes: !!omap []from files written by earlier versions.readYAMLmodelreads notes maps (as written by cobrapy and raven-toolbox) intometNotesandrxnNotes(was: the error "Unknown entry"), reads folded scalars whose continuation starts with-, and keeps onemodel.subSystemsentry per reaction (was: empty entries were dropped, so later subsystems sat on the wrong reaction).exportForGitraisesRAVEN:notMainBranchwhen a RAVEN checkout is on a branch other thanmainormaster.writeYAMLmodelwrites the enzymes of eachec-rxnsentry indented under- enzymes(was: at the indentation of the key, which ruamel.yaml could not read), quotes the YAML 1.1 booleans (y,n,yes,no,on,offin any case), and writes non-integers with the shortest digits that read back exactly.printOrangeprints\nas a line break.exportForGit: the txt table is headedRxn id, writes bounds and objective with the digits needed to read them back and pads no field. The output folder is created with its parents also whensubDirsis false, and the logical flags are validated.
Manipulation#
mergeCompartments: a merged metabolite is the copy already in compartments, if any, otherwise the copy whose id sorts first, with every field of that copy (was: the first copy in model order), soACCOA_candACCOA_mbecomeACCOA_cwhatever their order.simplifyModelwithconstrainReversible: on a model without a reversible reaction this step changes nothing (was: an error "logical indices ... outside of the array bounds", asgetAllowedBoundstook the empty reaction list for all reactions).prepINITModeltherefore runs on a model whose reactions are all irreversible after the first simplification, with the result of raven-toolbox'sprep_init_model.removeGenes: the help states that, when at least one of the requested genes is in the model, genes no remaining reaction uses are removed as well; when none is, no gene, reaction or bound changes.
Gap-filling#
gapFillTopological: withouttargetsand without an objective reaction it raisesRAVEN:badInput(was: an error without identifier). Help states the default seeds and targets.checkProductionwithcheckNeededForProduction: the returnedmodelholds excretion reactions only (was: the excretion reaction of the last metabolite innotProducedwas returned as an uptake reaction). This matters for code that uses the fifth output.
Curation#
renameModelGeneswith a file path asgeneTable: the table is read and the genes are renamed (was: an errorMATLAB:invalidConversionwhen the message that names the file was printed).
Queries#
getIndexeswith type'metnames'andreturnLogicaltrue: raisesRAVEN:badInput(was: the error "Unable to use a value of type cell as an index"). A name can match several metabolites, so no single logical vector is defined.
Analysis#
findGeneDeletionswith'dgd':grRatioMutshas one element per gene pair, as the help states (was: twice as many, the second half zero). This matters for code that indexesgrRatioMutsby the number of its elements.
Context-specific models (ftINIT / tINIT)#
ftINITwithresolveTies: each main-extraction step takes its fluxes from the least-total-flux solution for the tie-broken on/off state, so the direction and magnitude at which the next step forces a reaction do not depend on the solver's vertex. That phase stops at a relative or absolute gap of 1e-6.ftINITwithresolveTies: among the least-total-flux solutions, each main-extraction step takes its fluxes from the one with the least id-rank-weighted backward flux, so the direction of a flux that carries the same total either way no longer depends on the solver. The id-rank phases rank a merged reaction by the smallest original reaction id in its group, so they do not depend on which member names it.ftINITInternalAlgwithresolveTies: when the primary solve stops at the time limit, the tie-break phases are skipped and the primary solution is kept, as in raven-toolbox (was: the phases ran on the unproven incumbent). The count and id-rank phases get half ofparams.TimeLimiteach, rounded down and at least 1 s (was: the full limit).ftINITwithresolveTies: the last step skips the minimal-flux and direction phases, as no step reads its fluxes (newftINITInternalAlgargumentpinFluxes). The reaction set does not change; the fluxes andmetProductionof the last step are those of the id-rank phase.ftINITInternalAlg: new optional positional argumentsrankKeys(14th, the key each reaction is sorted by in the id-rank phases, defaultmodel.rxns) andpinFluxes(15th, defaulttrue). The "tie resolution did not converge" warning ofresolveTiesalso namesphase2c-minfluxandphase2d-directionwhen the minimal-flux or direction phase does not prove optimal.mergeLinear: groups are numbered 1, 2, ... in the order of the first reaction of each group inorigRxnIds(was: the order in which the reactions were merged).mergeLinear: a reaction flipped after the first merge pass is the one marked inreversedRxns(was: the reaction at the same index of the original model).
Utilities#
grRuleToDNF: help states the grammar it reads, that ofparseGrRule(and/orin any case,&,&&,|,||, operators as whole words, soG1&G2is one gene id), and that a malformed rule raisesRAVEN:badGrRule.checkRaven: when the binaries cannot be downloaded, the message names theRAVEN-<tag>-full.zipbundle attached to each release for an offline install (was: "the*-binariesRAVEN release").
Homology and curation#
getModelFromHomologyhas the optionscomplexPolicy(flag,keepordrop: how a reaction is treated when anand-linked subunit has no ortholog),keepGeneFree(reactions of the template without a grRule are transferred) andpreserveNotes(rxnNotesandrxnConfidenceScoresof the template are kept;rxnReferencesare always kept). A gene that several template genes reach appears once per grRule. The draft has no version, date or description, and the descriptive annotation of the template is not copied (was: those of the templates). A preferred order that removes no gene is accepted (was: an error).getModelFromHomologyraises an error that names the gene ids of the new organism that split in a grRule (whitespace, parentheses,|or&, for example the UniProt idsp|P33284|HXK_KLULA) (was: the ids were accepted).New:
hitsFromSuppOrthreads asuppOrth.tsvinto a blast structure forgetModelFromHomology, in both directions, with filters on support, predictors, identity and E-value and the optionproteinToGenefor a protein to gene mapping.runSuppOrthruns thesuppOrthcommand and reads its output.curateModelFromTablesreads the tables by header name in any order, with optional columns, and writes every supplied field to existing entities (was:metNotesandrxnReferenceswere not written). The MIRIAM columns follow the core columns, and grRules go to the right reaction when existing and new reactions are mixed. An empty grRules, lb, ub or rev cell leaves the existing value; the new optionoverwriteWithEmpty(defaulttrue) decides whether other empty cells clear a field. Cells are read without evaluating text: numeric cells accept plain decimals,InfandNaN, and lb, ub and rev accepttrueandfalse; commas, hexadecimal numbers and expressions raiseRAVEN:badInput. A file, column, gene-rule or repeated-id error raisesRAVEN:badInput.scaleBiomassFractionraises an error when the balancing component would get a fraction of 0 or less (was: the balancing pseudoreaction was inverted), when it has no current fraction (was: balancing was skipped) or when it is not a component of the biomass. The new argumenttargetTotalsets the balanced total of the biomass.setGAMandscaleBiomassPseudoreactionraise an error before the model changes:setGAMwhen the NGAM reaction is missing andscaleBiomassPseudoreactionwhen the proton metabolite is missing.setGAMrefusesngamValuewithoutngamRxn, and an emptyngamRxncounts as not given.sortModelkeeps the directions of the reactions unlesssortReversibleis requested (was: the default sorted them).generateNewIdstakes the numerically largest id and counts only finite integer suffixes.replaceMets: the finalcontractModelcall is restricted to the surviving metabolite (was: unrelated duplicate reactions were merged as well).addIdentifierPrefixprefixes whole gene ids in grRules (was: an id with a dash, dot or colon, for example5-HT1A, got a prefix at every word start, soexportModelfailed).getIndexeswith an ambiguousname[comp]raises an error that names the matching metabolites.gapFillMILPadds database reactions only and does not reverse draft reactions, which keep their bounds. The second outputreversedRxnsand the optionweightsare removed.bigMreplaces infinite bounds of universal reactions; a finite bound is used as it is (was: bounds capped atbigM).prepINITModelraisesRAVEN:badInputwhen the task structure has noidfield or a non-text id.getKEGGModelForOrganismworks with the kegg118 reference model, which has norxnNotes(was: an error when adding the provenance note).gapReportreports the metabolites that are produced or consumed with the boundary closed for every model (was: only for models with anunconstrainedfield). It closes the reactions ofgetExchangeRxnswhen the model has nounconstrainedfield, and stops withRAVEN:infeasibleModelwhen the model is infeasible under its own bounds or with its boundary closed, for example with a forced ATP maintenance flux.
Solvers#
optimizeProbreturns the logicalres.hitTimeLimitfor every solver.runINITandftINITInternalAlgraise "Time limit reached without finding a solution" (was: "The problem is infeasible" with every solver except Gurobi).getMinNrFluxesreturns exit code -2 for a solution that is not proven optimal at the time limit (was: 1 with Gurobi), and -1 with a warning when no solution came back.optimizeProbsolves MILPs, including those ofgapFillMILP,fillGaps,getMinimalMedium,getMinNrFluxes,ftINITandrunINIT, with the bundled GLPK and on the GLPK of the COBRA Toolbox, with aRAVEN:glpkMILPwarning (was: refused).
Sampling and reporting#
reporterMetabolitesuses the population standard deviation for the background, which gives the scores of raven-toolbox (was: the sample standard deviation). The score is 0 when the spread of the background is 0 or at rounding level, P-values outside [0, 1] are refused, and metabolites without a score are dropped from all result fields.sampleChebyshevCenterpasses a sparse constraint matrix, sorandomSamplingwith the method'chrr'works with Gurobi (was: Gurobi rejected the dense matrix).sampleACHRcorrects the flux vectors towardsS*v = 0every few steps and before each sample, and keeps them within the bounds. It raises the warningsampleACHR:steadyStateNotRestoredwhen a sample keeps a residual above 1e-9 relative (was: the residual ofS*vgrew exponentially, up to 9 after 100 steps).haveFluxreturns all reactions as blocked when the simplification removes every reaction (was: a GLPK error on an empty matrix).
Tasks#
parseTaskListreadsfalseand0as false, trims;lists, ignores the case of headers, keeps empty CHANGED bounds asNaN, and readsnoas false.fitTasksleaves a bound unchanged when the CHANGED LB or UB isNaN. An absent IN LB, IN UB, OUT LB or OUT UB column gives the default bounds 0 and 1000. Comment rows and orphan rows are skipped with a warning, a non-numeric bound raisesRAVEN:badInput, and a binary.xlsfile is refused withRAVEN:badInput(save it as.xlsxor.txt).checkTaskswarns when a task metabolite matches several model metabolites.removeLowScoreGeneskeeps the first gene of the rule on a tie.ftINITremoves the genes of removed reactions from the output.
Documentation#
Help blocks of 176 files are rewritten in impersonal, present-tense wording with British spelling; the code is unchanged. Statements that differed from the code are corrected, for example
simplifyModeldeleteDuplicates(first occurrence kept),removeBadRxnsrefModel,replaceMetsoutputs,getMinNrFluxesparams,checkRavendevelopModeand thedownloadRavenBinariesoffline bundle.reverseRxnshas the RAVEN 3 help structure.
3.0.0b1 (2026-09-07)#
First beta toward 3.0. Changes below are relative to RAVEN 2.9.3. The last 2.x release is 2.11.4:
a reorganized codebase, fewer toolbox dependencies, hardened I/O and MILP algorithms, plus
capabilities backported from the raven-toolbox (Python) port.
Repository & tooling#
Repo reorganized from a flat layout into functional folders (
analysis/,annotation/,biomass/,comparison/,conversion/,gapfilling/,io/,manipulation/,queries/,solver/,utils/, etc.).Function help blocks reformatted to NumPy-style docstrings; design-rationale, version-history and cross-language comments trimmed to current-state prose.
Allow for positional-or-named function arguments via
parseRAVENargs. Essential arguments are positional, non-compulsory arguments are named.Dropped the Statistics, Bioinformatics, Text Analytics and Optimization Toolbox dependencies.
All 317
dispEMcall sites across 67 files replaced with nativewarning()/error(); newravenListfor formatted item lists (fixed: was silently dropping its own indent).checkRavenreplacescheckInstallation, moved to the repo root, faster checks.Universal progress reporting (
progressReport).Poor performing visualization functions removed.
Reconstruction (KEGG & homology)#
KEGG HMM libraries and external binaries moved out of git to on-demand, SHA256-verified fetch from the
raven-datarelease repo.KEGG artifact set updated 116 → 118.
Legacy KEGG artifact-builder functions removed, moved to raven-toolbox (Python).
Recalibration of default HMM cutoffs.
MetaCyc reconstruction removed, as it persistently yielded high false positive annotations.
getModelFromHomology: recalibration ofminLendefault, token-based GPR rewrite (replaces a buggy cleanup regex).New
assignCompartments: functionality-constrained compartment-assignment MILP (WIP).
Curation#
Genome data utilities for homology-based reconstruction:
getGeneData(gained aUniProtoutput column from the GFFDbxreffield; fixed crash when a CDS'sParentresolves to no gene),downloadGenomeData,processProteinFastaFile.curateModelFromTables: fixed missing metabolite-support check.
I/O#
Legacy pre-L3V1/FBCv2 SBML import removed, only L3V1/FBCv2 remains supported.
importExcelModelremoved, to discourage the practice of curating models in Excel.New
model.ecexport to Excel (ENZYMES/ENZRXNS sheets).Apache POI Excel I/O replaced with a dependency-free OOXML writer.
Changed YAML file format, to better align with cobrapy and have full compatibility with raven-toolbox (Python): fixed quoting; multi-line entries; position-dependent defaults;
objective_coefficientimport; empty/missing gene sections; compartment annotations; EC-code annotation round-trip.Support for
rxnDeltaG/metDeltaGin SBML.
Manipulation#
addRxns: new string keyword formetsBy; fixed gene ids shredded byand/or.addTransport: fixed row-orientedmetNames; crash on a compartment with no counterpart metabolite;rxnConfidenceScores/rxnDeltaGdefaults.mergeCompartments: fixed inverted unconstrained warning; stalecompMiriams.mergeModels: fixedmetFromhandling; same-batch id-rename collisions.convertToIrrev: fixed wrong reverse-copy index.setExchangeBounds: fixed missing multi-exchange metabolites.closeModel: fixedbgrowth andmetNotespadding.replaceMets: fixed three bugs.deleteUnusedGenesis now a thin wrapper overremoveReactions.removeLowScoreGenes: fixed gene field alignment.permuteModel: fixed compartment remap.simplifyModel: fixed dropping task constraints during gap-filling.
Queries#
checkModelStruct: struct-array issues output; fixed two bugs; grRules start/endand/orhandling.findPotentialErrorsmade public, with parse-tree detection; grRules now parsed into a tree, also fixingremoveGenesandexpandModel.getExchangeRxns: fixed index return in both branches, and exchange/transport misclassification for boundary-metabolite models.getIndexes: hash-map lookup,islogicalfix.getElementalBalance: empty-reaction fix, new charge-balance check.constructS/parseFormulas: fixed output corruption.findDuplicateRxnsrewritten withunique(…,'rows'): O(n log n) instead of O(n²).
Gap-filling#
New LP/MILP/topological gap-filling algorithms:
gapFillFastCore,gapFillSwiftCore,gapFillMILPandgapFillTopological, in addition to the originalfillGapsfunction.makeSomething/consumeSomethingmerged intofindLeakMetabolite(model, direction, …)(originals kept as thin wrappers).
Context-specific models (ftINIT / tINIT)#
getINITModel/runINITdeprecated, in favor offtINIT(a separate, faster reimplementation that does not callrunINIT). Code is still available for now, as published Human-GEM-derived models were built with tINIT.ftINITgained per-reaction big-M, essential-reaction clamping, tree-based gene removal;runINITgained per-reaction big-M.ftINIT gained
resolveTies/proveAbsGapfor deterministic MILP tie-breaking.ftINIT: fixed metabolomicsspdiagscrash; MILP handling under the free solver; gap-fill failures reported as success; invertedallowExcretionsense inftINITInternalAlg.ftINITtask gap-filling now edits the reference model in place instead of copying it.getMinNrFluxes: fixed crash on all-non-negative scores.sortReactionOrder: fixed scoring the wrong columns.checkTasks: task loop parallelized viaparfor.
Analysis & flux sampling#
FSEOF regression-based target selection with knockdown/knockout classification.
reporterMetabolitesexact closed-form background correction.getFluxZ: fixed inverted sign in the zero-variance branch.New analysis utilities:
modelSummary,walkFluxes,traceFluxPath,compareFluxes.New
getMinimalMedium: MILP-based minimal medium finder.randomSampling: FVA-basedgoodRxnsselection, reproducible seed parameter; fixed undefined variable; per-reaction LPs parallelized viaparfor; CHRR and ACHR flux samplers added.compareRxnsGenesMetsCompsfolded intocompareMultipleModels.New
diffModels: structured model comparison.
Biomass#
fitParameters: fixed everyxRxn's upper bound set from the first.guessComposition: fixed unknown metabolite's own coefficient.
Localization#
WoLF PSORT localization loader removed, replaced by DeepLoc2, MULocDeep, COMPARTMENTS, UniProt (WIP).
Solver#
optimizeProb: fixed dead no-op block; SCIP translation; gurobi results; MILP guard.