Tuned parameter defaults#
Each default listed here has one of three origins: a literature value from the original paper of the method, a measurement on real or synthetic models, or a convention taken over from a widely used tool or from another part of RAVEN. The tables are grouped by capability and cover the MATLAB implementation (RAVEN) and the Python implementation (raven-toolbox). Each row gives the default and the basis for it, and the linked studies give the measurements and methods.
Differences between the two implementations
The MATLAB implementation dates from 2013 and the Python implementation from 2026. The homology and KEGG cut-offs were measured and then set to the same values in both. Defaults that were not measured were not assumed correct, and where the two implementations disagreed, the default was measured. A row gives both values where they differ. Cross-toolbox parity decisions lists the values that are equal and the values that differ on purpose because the implementations use different solvers or algorithms.
Flux sampling#
RAVEN MATLAB: randomSampling (method='achr'|'chrr'|'randomObjective'), sampleACHR, sampleCHRR, sampleMaxVolEllipse, sampleChebyshevCenter. raven-toolbox: random_sampling, find_good_reactions, max_volume_ellipsoid. Both implementations expose all three sampling methods through one entry point.
Parameter |
Default |
How determined |
|---|---|---|
|
|
Literature: ACHR gives near-uniform interior sampling, and the random-objective method draws polytope vertices. All three methods are selectable in both implementations ( |
|
|
Upstream convention (cobrapy's own ACHR default). Measured insufficient at genome scale: on yeast-GEM one ACHR chain (seed 0) had an effective sample size (ESS) of about 10 from 300 stored samples (9.9 to 63.1 over four seeds), and 4 chains disagreed (median Gelman-Rubin R-hat 1.1020, 50.7 % of scored reactions above 1.1). At |
|
|
Used by |
|
|
Literature: Bordel et al. 2010. |
|
|
Used by |
|
|
Loopless FVA excludes reactions that take part in infeasible cycles, at higher cost; the alternative fixed-threshold (±999) heuristic also excludes reactions that legitimately reach capacity. The loopless technique is implemented in Python; porting it is a larger project than changing a default. |
|
|
Same in both implementations or no evidence favoured a different value. |
|
|
Python helper (supports target selection of the random-objective method); no cross-implementation comparison. |
|
|
Literature: Zhang & Gao 2003. |
|
|
Same in both implementations. |
Full detail: Flux sampling convergence and settings (the primary measurement)
FSEOF#
RAVEN MATLAB: FSEOF. raven-toolbox: fseof.
Parameter |
Default |
How determined |
|---|---|---|
|
|
Literature: Choi et al. 2010; measured: on iJO1366, 5 and 20 steps change the target set by 4 and 6 targets (Benchmarks). |
|
|
Literature: Choi et al. 2010; measured: on iJO1366, 0.5 and 0.99 change the target set by 11 and 2 targets, so the sweep does not select 0.9 (Benchmarks). |
|
|
Literature: Choi et al. 2010; measured: on iJO1366, 0.7 adds 4 amplification and 8 knockdown or knockout targets and 0.95 drops 2 and 2 (Benchmarks). |
|
|
Measured on iJO1366: the classification uses the fixed thresholds |
Full detail: Benchmarks of fseof, remove_genes and other defaults
INIT / ftINIT#
RAVEN MATLAB: runINIT, scoreModel, getINITModel, ftINIT, prepINITModel, ftINITInternalAlg, getINITSteps. raven-toolbox: score_reactions_from_genes, gene_scores_from_expression, ftinit, prep_init_model, run_ftinit, get_init_steps, classify_reactions.
Only MATLAB has the legacy tINIT method (runINIT, getINITModel), which ftINIT replaces; raven-toolbox implements ftINIT alone (see Context-specific models with ftINIT). Rows measured across both algorithms say so.
Parameter |
Default |
How determined |
|---|---|---|
|
|
Literature: Ågren et al. 2012 (the original INIT paper). |
|
|
Recorded, without a measurement, as having no effect at the default |
|
|
Acts on the first-step solve and on any step without a schedule of MILP runs; a named series such as |
|
|
RAVEN's |
|
|
Literature: Gustafsson et al. 2023 (the ftINIT paper). |
|
|
RAVEN's value; measured near-insensitive across the range 0.02–0.5. |
|
|
The cap on each scored reaction's own big-M, as in |
|
|
|
|
|
RAVEN's own formula. Wang et al. 2012 (mCADRE) use categorical scoring, and no source in either implementation cites a paper for these constants. |
|
various |
Same in both implementations or standard practice. |
Full detail: ftINIT parameter calibration and input robustness (the primary measurement, genome-scale Human-GEM) · ftINIT on different solvers · ftINIT reproducibility with resolve_ties and prove_abs_gap (resolve_ties=True gives identical reaction sets at a fixed seed and a seed-to-seed difference of 41 reactions and 1 gene; adding prove_abs_gap=1.0 reduces it to 1 reaction and 0 genes at about 26 times the run time) · Human-GEM cell-type model validation against RAVEN (Jaccard index against RAVEN across 5 cell lines of 0.964 to 0.982 for models extracted without tasks and 0.981 to 0.988 for task-constrained models)
Gap-filling#
RAVEN MATLAB: fillGaps (connectivity mode), ported as connect_blocked_reactions. fill_gaps_fast_lp and fill_gaps_milp are the counterparts of RAVEN's gapFillFastLP and gapFillMILP.
Parameter |
Default |
How determined |
|---|---|---|
|
|
Literature: Thiele et al. 2014 (the fastGapFill paper). |
|
|
The flux a reaction must be able to exceed to count as unblocked. Same as the fixed threshold of 1 in RAVEN's |
|
|
No measurement recorded. |
|
|
Matches RAVEN's ±1000 bound convention. It caps an unbounded template reaction when the merged model has no finite bound; otherwise the largest finite bound does. |
Full detail: Benchmarks of fseof, remove_genes and other defaults
Homology-based reconstruction#
RAVEN MATLAB: getModelFromHomology, getBlast, getDiamond. raven-toolbox: get_model_from_homology, run_blast, run_diamond.
Parameter |
Default |
How determined |
|---|---|---|
|
|
Matches MATLAB's |
|
|
Matches MATLAB's |
|
every CPU the process may run on (Python); the cores assigned to MATLAB (MATLAB) |
A 500-query BLAST subset returned the same 2,746 hits at one thread and at four, in 20.4 s and 5.9 s (3.5 times faster; H. polymorpha against S. cerevisiae, BLAST+ 2.17.0, 2026-11-01). Both sides use all available cores. |
|
|
At identity 40 % and length 200 the score was identical from |
|
|
Measured against the KEGG ortholog reference for 4 organisms of increasing distance from S. cerevisiae: compared with |
|
|
Same study: over 25 to 50 % the score changed by 0.062 to 0.275, against 0.047 to 0.055 over alignment lengths 50 to 300 and 0.020 to 0.063 over E-values 1e-4 to 1e-100. With a wrongly transferred reaction weighted as worse than a missing one (F0.5, BLAST), the optimum was 35 or 40 % against KEGG and 35 or 45 % against OMA, depending on the organism; with DIAMOND against OMA the optimum for E. coli is 30 %. |
|
|
Same in both implementations. |
Scoring against curated GEMs (hanpo-GEM, rhto-GEM) built by the same reconstruction method is not part of the 2026-11-01 measurement.
Full detail: Homology cut-off calibration
KEGG-based reconstruction#
RAVEN MATLAB: getKEGGModelForOrganism (the exact internal name of the KO-assignment sub-step has not been independently confirmed). raven-toolbox: assign_kos, run_hmmsearch, build_ko_hmm, and the get_kegg_model_* family.
Parameter |
Default |
How determined |
|---|---|---|
|
|
Measured against real KEGG gene→KO annotations across 4 organisms of varying study depth: |
|
|
Same study: from 0.80 to 0.95 it raised precision by 0.05 to 0.10 at a recall loss of 0.00 to 0.02, and from 0.50 to 0.80 by 0.15 to 0.27; 0.9 itself was not swept. RAVEN 3's |
|
|
Same study: at |
|
|
Literature: the CD-HIT recommendation for protein clustering. |
|
every CPU the process may run on |
|
|
|
Same in both implementations or standard draft-reconstruction practice. |
Full detail: KEGG HMM cut-off calibration (the primary measurement, 4 organisms against real KEGG annotations)
Sub-cellular localisation#
RAVEN MATLAB: predictLocalization. raven-toolbox: predict_localization. The two use different algorithms: MATLAB uses simulated annealing, a stochastic heuristic with no optimality guarantee, and Python solves a deterministic MILP. For several parameters the question of which value is right does not arise, because the same number means something different in the search budget of a heuristic than in the optimality gap of a solver.
Compartment assignment is in development in Python and is not at parity with MATLAB. The defaults are current, and the method they configure is changing.
Parameter |
Default |
How determined |
|---|---|---|
|
|
Convenience default: cytosol is correct for most reactions. MATLAB has no default, so no values disagree. |
|
|
Not independently benchmarked; same in both implementations. For real (non-integer-scale) predictor scores the value needs lowering in the studies that measured it; see the linked study. |
|
|
The values are not unified: the MATLAB number is a simulated-annealing search budget (more time can improve the heuristic answer, without a proof of optimality), and the Python number is a MILP solver cutoff (returns a proven-bounded incumbent). Python's |
|
|
Python; the MATLAB heuristic has no optimality gap. |
Full detail: the measurements behind these values (the yeast-GEM benchmark, the head-to-head against MATLAB's predictLocalization, the predictor benchmarks across four organisms, and the design documents) are in raven-gecko-parity, with the rest of the work in progress on this method.
Model manipulation#
RAVEN MATLAB: removeGenes, mergeModels, addRxns, addTransport, simplifyModel (reversibility-constraining and duplicate-removal modes). raven-toolbox: remove_genes, merge_models, add_reactions_from_equations, add_transport_reactions, constrain_reversible_reactions, find_duplicate_reactions.
Parameter |
Default |
How determined |
|---|---|---|
|
|
Measured on e_coli_core: keeping a reaction unchanged after it has lost its last gene gives false-positive growth after an essential gene is removed (it survives with an empty gene rule). |
|
|
The threshold of |
|
|
Same semantic field (metabolite display name) under a different schema field name; no values disagree. |
|
various |
Python additions and refinements; no direct MATLAB equivalent exists for comparison. |
Full detail: Benchmarks of fseof, remove_genes and other defaults
Tasks#
RAVEN MATLAB: checkTasks. raven-toolbox: check_tasks, find_task_essential_reactions.
Parameter |
Default |
How determined |
|---|---|---|
|
|
Matches RAVEN's |
Full detail: Benchmarks of fseof, remove_genes and other defaults
Cross-toolbox parity decisions#
Where the Python and MATLAB implementations disagree on a default, one value is used for both. The exception is a difference between the implementations that requires different values (solver stack, algorithm or data schema), where identical values would give incorrect behaviour. The tables state which side changed, or why the values differ.
Unified values#
Parameter |
Python |
MATLAB |
Common value |
Side that changed |
Confidence |
Evidence |
|---|---|---|---|---|---|---|
|
|
|
|
Python |
High |
No downstream effect measured either way ( |
|
|
|
|
Python and MATLAB |
High |
Directly measured: Homology cut-off calibration |
|
|
|
|
MATLAB |
High |
Directly measured: KEGG HMM cut-off calibration |
|
|
|
|
MATLAB |
High |
Directly measured, same study |
|
|
|
|
Python |
High |
Recorded, without a measurement, as having no effect at the default |
Settings resolved without unification#
The INIT parameters mip_gap and time_limit of run_init and run_ftinit are resolved by the genome-scale test with real expression data in ftINIT parameter calibration and input robustness (Human-GEM HCT116 and Hart2015), without matching the MATLAB numbers:
mip_gap: solve time is flat across the gap in the single first-step solve, so a tight gap is nearly free there. The docstring ofrun_ftinitattributes the flat time to model construction; the study did not measure the share of model construction. A named series such as1+1ignoresmip_gapandmip_gap_abs, because every step runs its own schedule of MILP runs, so the full pipeline gives the same result at 0.001, 0.003 and 0.01. Neither 0.001 nor 0.01 is MATLAB's0.0004. KeepNone(Gurobi's own~1e-4default is at least as tight as the measured-good0.001).time_limit: RAVEN'sftINITlimits a MILP run to 5000 seconds when the run sets none, and its schedules use 120 s, 5000 s and 5 s runs. Python'sftinitwith a named series caps each scheduled run by the same limits, andtime_limitlowers the cap;time_limit=Noneleaves an ad-hoc step or arun_ftinitcall uncapped, but no scheduled run. Measured first-step solves took 23 to 30 s, and full pipelines 81 to 119 s with scaling and 157 s without. In the robustness setup, the gap-fill of one 90 %-dropout model ran longer than 75 minutes; the gap-fill has its own fixed limit of 300 s per task and does not readtime_limit. The study ran its full pipelines at 600 s; its robustness script sets 120 s, and the limit of the recorded robustness runs is not stated. KeepNoneas the code default. The docstring ofrun_ftinitrecommends120-600 s/step, a range with no measured basis on this site.
ftINIT on different solvers measured GLPK honouring the 900 s limit: both steps of the full pipeline hit it, the run took 2182 s and kept 6758 reactions (Jaccard 0.892 against Gurobi). The scipy interface (HiGHS) fails because it supports continuous variables. Gurobi is the backend the genome-scale numbers above were measured on. It completed the run within the overall limit; one scheduled solve stopped at a limit (the warning in the big_m=1000 run).
Values kept different#
Parameter |
Python |
MATLAB |
Why |
|---|---|---|---|
|
|
|
With every bound of 1000 replaced by infinity, the random-objective LP becomes unbounded, because the objective can grow without limit through any reaction that is then unconstrained (Flux sampling convergence and settings gives this mechanism, read from the cobra code; the run with |
|
|
heuristic (exclude FVA ≥ 0.999 times the loop bound, 999 for a bound of 1000) |
The two are different techniques. Loopless FVA excludes reactions that take part in infeasible cycles, and the MATLAB heuristic also excludes reactions that legitimately reach capacity. Porting the loopless technique to MATLAB is a larger project than changing a default. |
|
|
|
Same semantic field (metabolite display name) under a different field name, which results from the cobrapy and COBRA Toolbox schemas; the field name is not tunable. |
|
|
|
Both agree at |
|
|
|
|
|
|
required arg (no default) |
MATLAB has no default; Python's |
Defaults that differ between RAVEN 2.11.3 and RAVEN 3#
The RAVEN 3 defaults of getKEGGModelForOrganism (cutOff, minScoreRatioG) and getModelFromHomology (minLen) equal the raven-toolbox defaults. The values come from src/ on RAVEN develop:
Function |
RAVEN 2.11.3 |
RAVEN 3 |
|---|---|---|
|
|
|
|
|
|
|
|
|
The time-budget parameter of the localisation is not unified: predictLocalization.m solves the problem with simulated annealing (maxTime, default 15 minutes, a search budget), and raven-toolbox uses a deterministic MILP (time_limit, a solver cutoff). See the table of values kept different.
Open items#
Genome-scale ACHR sampling convergence has no cheap fix. At genome scale (yeast-GEM, default ACHR settings) the median reaction fails the R-hat>1.1 threshold. Neither follow-up fixes it cheaply: reallocating the same step budget onto a larger
thinningmakes no measurable difference, andmethod='chrr'converges on a small model, but its genome-scale cost makes it impractical as a drop-in fix: a probe of 2 chains × 20 samples on yeast-GEM took 136 min (8147.9 s) in total, and the share of the rounding step in that time was not measured. Flux sampling convergence and settings describes the investigation, including a possible future unblock (caching the CHRR rounding transform across calls, an engineering change, so out of scope here).The
gene_scores_from_expressionscoring constants (factor=5.0,max_score=10.0,min_score=-5.0) have no confirmed literature source on either side; see the INIT section.
References#
Choi HS, Lee SY, Kim TY, Woo HM (2010). In silico identification of gene amplification targets for improvement of lycopene production. Appl Environ Microbiol 76(10):3097–3105. https://doi.org/10.1128/AEM.00115-10
Bordel S, Ågren R, Nielsen J (2010). Sampling the solution space in genome-scale metabolic networks reveals transcriptional regulation in key enzymes. PLoS Comput Biol 6(7):e1000859. https://doi.org/10.1371/journal.pcbi.1000859
Zhang Y, Gao L (2003). On numerical solution of the maximum volume ellipsoid problem. SIAM J Optim 14(1):53–76. https://doi.org/10.1137/S1052623401397230
Ågren R, Bordel S, Mardinoglu A, Pornputtapong N, Nookaew I, Nielsen J (2012). Reconstruction of genome-scale active metabolic networks for 69 human cell types and 16 cancer types using INIT. PLoS Comput Biol 8(5):e1002518. https://doi.org/10.1371/journal.pcbi.1002518
Gustafsson J, Anton M, Roshanzamir F, et al. (2023). Generation and analysis of context-specific genome-scale metabolic models derived from single-cell RNA-Seq data. Proc Natl Acad Sci USA 120(6):e2217868120. https://doi.org/10.1073/pnas.2217868120
Thiele I, Vlassis N, Fleming RMT (2014). fastGapFill: efficient gap filling in metabolic networks. Bioinformatics 30(17):2529–2531. https://doi.org/10.1093/bioinformatics/btu321
Not listed: the gene_scores_from_expression constants (factor, max_score, min_score). Neither the source of RAVEN nor that of raven-toolbox cites a paper for them. Wang et al. 2012 (mCADRE) use categorical scoring. The constants are a choice of RAVEN with no confirmed literature source.