raven-toolbox release notes#
Unreleased#
Breaking changes#
get_model_from_homologywithpreferred_ordertreats a template gene that maps to a gene an earlier template already maps as a subunit without an ortholog, andcomplex_policydecides what happens to it (was: the gene and every part of the rule that needs it were removed). For the rule(a and b) or xwithataken by an earlier template,flaggives(OLD_T2_a and nb) or nx,keepgivesnb or nxanddropgivesnx. A reaction that has genes, none of which keeps a mapping, is not transferred.get_model_from_homologywithcomplex_policy="drop"removes 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 hasC and D.manipulation.contract_modelis the new name ofremove_duplicate_reactions, after RAVEN'scontractModel, and the old name is removed.contract_modeltakesdist_reverse(defaultTrue), thedistReverseoption ofcontractModel: withFalse, reactions with the same metabolites and a different reversibility are duplicates.
Data#
The KEGG assets are the
kegg120release oftoolbox-assets(was:kegg118): the reference model and tables, the taxonomy and the profile HMM libraries of 4246 prokaryotic and 2724 eukaryotic KOs. The baked registry anddata/manifest.jsonlist them.
3.0.0b2 (2026-11-01)#
Second beta toward 3.0. The main changes are RAVEN-format model export, SuppOrth homology input, and a closer match to RAVEN in homology, gap-filling, curation tables and ftinit.
Breaking changes: fill_gaps_kumar_milp is renamed fill_gaps_milp, omics.hpa moved to init.hpa, connect_blocked_reactions renames eps to threshold, ftinit takes rxn_scores as a keyword, manipulation.remove_genes defaults to blocked_reactions="constrain", manipulation.merge_compartments defaults to drop_single_metabolite_reactions=False, init.ftinit defaults to big_m=1000, and export_for_git writes its .mat file in the RAVEN structure.
Model I/O#
New:
io.write_matlab_modelandread_matlab_modelwrite and read the RAVEN model structure, field for field as RAVEN's exporter does.read_matlab_modelreads a COBRA Toolbox.matthrough cobra's reader.export_for_gitwrites its.matfile withwrite_matlab_model(was: cobra's COBRA Toolbox layout).The SBML file of
export_for_gitwrites subsystems as SBML groups andrxnNotes,rxnReferencesandrxnConfidenceScoresunder the labels that RAVEN'simportModelparses. It does not write the Python repr ofmetaDataas a note (was: it did); only string-valued notes are written, and the model version and date are their own notes.read_yaml_modelreads the SBO term as a string and whole-number charges as ints, so charges survive an SBML write.The Excel export no longer lists InChI twice in the MIRIAM column.
New:
get_model_metadataandset_model_metadata.export_for_gittakesversionanddateand stamps them on the exported copy.
Homology and curation#
New:
reconstruction.homology.hits_from_supporthandrun_supporthread SuppOrth consensus orthologs as homology input.get_model_from_homologynow matches RAVEN'sgetModelFromHomology: it keeps every hit tied for the best bitscore at strictness 3, appliesmax_evalueexclusively, and filtersonly_genes_in_modelson the template gene. Hit values are parsed with round-trip float precision, so a hit at the cutoff is no longer let through.get_model_from_homologygainedkeep_gene_freeandpreserve_notes(defaultFalse) to keep gene-free reactions and the notes of the template. It drops duplicate genes, raises on gene ids that cobra would split, on an emptied search direction and on organism ids that differ only in case, and warns forreview_identityon SuppOrth hits. It follows the complex policyflagordrop, the preferred order and the order of the templates. The draft model does not carry the version and date of the template.curation.batch_curatestores notes, references, confidence score and InChI under the keys the YAML layer uses.
Gap-filling and analysis#
Renamed
gapfilling.fill_gaps_kumar_milptofill_gaps_milp(modulegapfilling.kumar_milptogapfilling.milp,KumarGapFillResulttoMILPGapFillResult), matching RAVEN'sgapFillMILP. It adds template reactions only;reversed_reactionsandweightsare removed.fill_gaps_milpruns with integrality tolerance 1e-9 and returnsexit_status="not_restored"when the selection does not restore growth. An infeasible MILP on Gurobi no longer crashes.gap_reportraises aValueErrornaming reactions with a forced flux when the model is infeasible (was: a bare cobraInfeasible).biomass.scale_biomassgainedtarget_totaland raises before changing the model when the balancing component cannot absorb the change.
Context-specific models#
omics.hpamoved toinit.hpa; theomicspackage is removed.init.ftinit/run_ftinitgainedfeas_tol,opt_tol,int_feas_tolandpresolve(defaults unchanged).init.ftinitskips the tie-break when the primary solve stops at the time limit.init.run_ftinit, and softinit, warns when it solves with GLPK.init.merge_linearandmanipulation.merge_compartmentskeep the solver of the source model.With
resolve_ties, the tie-break phases ofinit.ftinitandinit.fill_tasksuse 0.5 oftime_limit.init.fill_tasksgainedmutate_in_place.
Alignment with MATLAB RAVEN#
read_yaml_modelturns ausage_prot_*reaction forward when itsprot_poolcoefficient is positive andprot_pool_exchangewhen it is negative, as GECKO'supgradeEcModeldoes, and changes the sign of the objective coefficient of a reaction it turns (was: a negative lower bound decided, and the coefficient stayed, which reversed the objective of the model).write_yaml_modelwrites an ec reaction without enzymes with noenzymesentry (was:enzymes: !!omap []).read_yaml_modelreads a missingenzymesentry, a content-lessenzymes: !!omapandenzymes: !!omap []as an empty enzyme map, so files written by earlier versions of GECKO, RAVEN and raven-toolbox still load.init.fill_taskswithresolve_ties=Trueon Gurobi restoresMIPGapandMIPGapAbsofreference_modelafter each gap-fill (was: 0.0 and 0.4 stayed set).tasks.find_task_essential_reactionswrites itscache_pathas JSON (was: pickle) and ignores, with a warning, an existing file that is not a JSON cache of the current version, such as a pickle.checkpoint_everybelow 1 raisesValueError(was: a write after every task).init.hpa_gene_scoresuses the default level scores also for an emptylevel_scoresmapping, andinit.rna_gene_scorescomparestissuecase-insensitively and takes the highest TPM over tissue names that differ in case, as RAVEN'sscoreModeldoes.localization.predict_localizationwithapply=Truereturns a copy of the model inLocalizationResult.modelalso when no gene of the reactions to place has a score (was: the input model itself).localization.assign_compartmentstakes the default growth floor (min_growth=None) as 10 % of the maximum flux ofbiomass_reaction(was: of the optimum of the model's current objective).reconstruction.kegg.organisms_in_domainraisesValueErrorfor an emptydomain(was: it matched every organism).conditions.load_conditionreturns an empty dict for a YAML file without content (was:None; other empty values such as[]are returned as they are), whichapply_conditionapplies as a condition without steps, as RAVEN'sparseYAMLandapplyConditiondo.analysis.reporter_metabolitesleaves a scored gene that has no entry ingene_fold_changesout of both the"up"and"down"subsets (was: it counted as fold change 0 and joined"up"), like a gene with a NaN fold change.manipulation.constrain_reversible_reactionsskips the Gurobi tolerance setting only when the solver has noParamsattribute (was: any exception was ignored).gapfilling.connect_blocked_reactionsraises aRuntimeErrorthat names the non-optimal MILP (the message said that the blocked reactions cannot carry flux with all templates).comparison.compare_modelsannotatestasksas also acceptingos.PathLike.manipulation.set_exchange_boundsis annotated as returninglist[str | Metabolite]: the entries ofmetsthat are not exchanged, as supplied (ids, names orMetaboliteobjects).scripts/analyze_init_params.pyruns themip_gap,force_onandprep_scalesweeps with theftinitdefaultbig_m(1000, was: 100) and takes--big-mto set it. Thebig_msweep starts at 1000, which is its reference row. The cached sweep results are keyed onbig_m, so a resumed pickle from a run with anotherbig_mis not reused.Models read with
io.read_yaml_modelandio.read_matlab_modelhavemodel.toleranceset to 1e-9, the feasibility and optimality tolerance RAVEN'ssolveLPgives the solver (cobrapy's default is 1e-6 for Gurobi and 1e-7 for GLPK).utils.solver.set_raven_toleranceapplies it to any other model.manipulation.remove_genesdefaults toblocked_reactions="constrain"(was:"remove"), as RAVEN'sremoveGenesdoes: a reaction whose rule loses its last enzyme stays, with the rule dropped and bounds(0, 0). Passblocked_reactions="remove"to delete such reactions.manipulation.remove_genesalso removes every gene that no remaining reaction named in its rule before the removal, also when not requested (was: only the requested genes), as RAVEN'sremoveGenesdoes, when at least one of the requested genes is in the model; when none is, the model is not changed. A gene kept only by a constrained reaction stays.init.merge_linearnumbers the merged groups 1, 2, ... in the order of the first reaction of each group in the original model, as RAVEN'smergeLineardoes, sogroup_idsno longer depends on the merge order.manipulation.merge_compartmentsgives a merged metabolite the id of the copy already in the merged compartment, if any, otherwise the id that sorts first (ACCOA_cforACCOA_candACCOA_m), as RAVEN'smergeCompartmentsdoes. It rewrote the first member's compartment suffix to the merged compartment (ACCOA_s). The merged metabolite also keeps the annotation of that copy (was: dropped), anddrop_single_metabolite_reactionsdefaults toFalse, as RAVEN'sdeleteRxnsWithOneMet(was:True).manipulation.merge_compartmentsstores the base id of each merged metabolite innotes["merged_base_id"](ACCOAfor the keptACCOA_c; the own id when two merged metabolites would get the same base id). The default metabolite key oflocalization.assign_compartments,apply_assignment,relocate_reactionsandcuration_priorityis that stored base id, otherwise the id without the suffix of the metabolite's own compartment, so the mergedACCOA_cinsand a universalACCOA_mshare the keyACCOA. The four functions raiseValueErrorwhen two metabolites in one compartment have the same key (was: one of them stood for both).manipulation.merge_compartmentsdocuments wherenotes["merged_base_id"]survives: YAML written and read by raven-toolbox,copy(), cobra JSON and SBML. RAVEN'sreadYAMLmodelshows it inmetNotes(merged_base_id: ACCOA note: free text note) and no RAVEN function uses it. A round trip through RAVEN YAML or a .mat file loses it, and the localization functions then key a mergedACCOA_cinsasACCOA_c, without an error.io.read_yaml_modelputs the notes thatwrite_yaml_modelwrites as anotesmapping (notes without a RAVEN field) back intonotes(was: nested undernotes["note"]).reconstruction.homology.run_blast,run_diamondandrun_supporth, andreconstruction.kegg.run_hmmsearch,get_kegg_model_from_sequences,build_ko_hmmandbuild_hmm_library, use every CPU the process may run on whenthreadsis not given, as RAVEN'sgetBlast,getDiamond,runSuppOrthandgetKEGGModelForOrganismdo (was: the machine's CPU count minus one).gapfilling.analyse_topologytakes RAVEN'sgapFillTopologicaldefaults. Seeds: the metabolites of every reaction with only substrates andlower_bound < 0or only products andupper_bound > 0, whatever its number of metabolites (was: one-metabolite reactions withlower_bound < 0); aUserWarningwhen there is none (was: a message only whenverbose). Targets: the metabolites of the first objective reaction, substrates and products (was: every metabolite of the model);ValueErrorwhen the model has no objective.New:
utils.parse_gr_rulereads a grRule in the grammar of RAVEN'sparseGrRule(and/orin any case,&,&&,|,||, operators as whole words).manipulation.gpr_to_dnfnow also takes a rule string and reads it with this parser, as RAVEN'sgrRuleToDNFdoes;utils.is_dnfreads a string with it too, and both raiseValueErrorwith the message of RAVEN'sRAVEN:badGrRulefor a malformed rule.G1 && G2,G1 || G2andG1 Or G2are read as rules,G1&G2is one gene id. Whitespace is what MATLAB'sisspacecounts, so a no-break space (U+00A0), U+0085, U+2007 and U+202F are part of a word.curation.batch_curate(andbatch_curate_from_tsv) stores a gene rule asparse_gr_rulereads it, so the reaction gets the genes that were checked:G1&G2 or G3has the genesG1&G2andG3, as in RAVEN'scurateModelFromTables(was:G1,G2andG3).io.read_yaml_modelreads gene rules withparse_gr_rule, soG1&G2written bywrite_yaml_modelis read back as one gene (was:G1andG2, cobra's reading). A rule thatparse_gr_rulerefuses is read by cobra as before.Functions that copy or build a gene rule keep RAVEN's reading of it, so
G1&G2stays one gene (was: the rule was copied as a string and cobra splitG1&G2intoG1andG2):manipulation.merge_compartments,copy_to_compartment,convert_to_irreversible,merge_models,add_reactions_from_model,expand_model,change_gene_reaction_rules,add_reactions_from_equations,localization.apply_assignment,init.fill_tasks,init.remove_low_score_genes,reconstruction.homology.get_model_from_homology,reconstruction.kegg.assemble_model_from_ko_genesandio.read_matlab_model. A rule string is read withparse_gr_rule; one thatparse_gr_rulerefuses is read by cobra. cobra's JSON reader (cobra.io.load_json_model) still splitsG1&G2; cobra's SBML reader keeps it.analysis.fseof(and sogeckopy.ec_fseof) solves each level with pFBA that holds the objective at 0.999999 of its optimum at that level, as RAVEN'ssolveLPdoes, where it held the full value. On the scipy solver (HiGHS) the optimum is only accurate to the solver's feasibility tolerance, so the second step was infeasible at the top level of ecYeastGEM and the scan returned 9 of 10 levels; it now returns all 10, as on Gurobi and GLPK. A level at which the biomass maximisation is infeasible still ends the scan.analysis.fseofclassifies a reaction as a target when its absolute flux exceeds 1e-10 at some level and its standard deviation is above 0, and takes slope and correlation on the absolute flux (was: the signed flux). A knock-out target has a last absolute flux of at most 1e-8.flux_epsgates the check against the theoretical maximum.analysis.fseoftakes the top of the scan asmax_fractionof the target flux in the pFBA solution that maximises the target, as RAVEN'sFSEOFand GECKO'secFSEOFdo, where it took the plain maximum (about 1e-6 relative difference).analysis.fseoflists targets of equal score in model order (a stable sort), as MATLAB'ssortdoes, where their order was arbitrary.analysis.fseofgainedequality:Truefixes the target flux at each level as GECKO'secFSEOFdoes,False(the default) keeps the lower bound of RAVEN'sFSEOF.io.read_yaml_modelreads an ec reaction written as- enzymes: !!omapwith nothing under the tag, the form GECKO and RAVEN write for a reaction without enzymes, as a reaction with no enzymes, asreadYAMLmodeldoes. It raisedAttributeError: 'ScalarNode' object has no attribute 'flow_style'.io.read_yaml_modelreads a scalar written as""text""(invalid YAML, written by older RAVEN and GECKO for a note that carried its own quotes) as"text", asreadYAMLmodeldoes. Files that parse as YAML are read unchanged.io.read_yaml_modelreads a double-quoted scalar with an unescaped quote inside, such as- notes: "a "b" c", asa "b" c: it drops the outer pair of quotes and unescapes\\and\", asreadYAMLmodeldoes. This repair runs only when the strict parse fails.io.read_yaml_modelreads a single-quoted scalar with an apostrophe inside, such as- name: 'it's', asit's: it drops the outer pair of quotes and reads each''as', asreadYAMLmodeldoes. This repair runs only when the strict parse fails; a comment after the closing quote is not handled.init.ftinitandinit.run_ftinitgive each scored reaction its own big-M, its flux capacitymax(min(ub, big_m), min(-lb, big_m), force_on)with an infinite bound counted asbig_m, as RAVEN'sftINITInternalAlgdoes.big_mis the cap on that capacity; its default is 1000 (was 100).tasks.find_task_essential_reactions(and soinit.prep_init_model) re-solves a knock-out from a cold start when the warm-started solve does not report a feasible status, and counts the reaction as essential only if that solve is not feasible either, as RAVEN'ssolveLPdoes. Gurobi could report a feasible knock-out as infeasible when started from the previous knock-out's basis, which added reactions to the essential set.init.ftinitandinit.run_ftinitwithresolve_tiestake each step's fluxes from the least-total-flux solution for the tie-broken on set, so the direction and magnitude at which the next step forces a reaction no longer depend on the solver's vertex. That phase stops at a relative or absolute gap of 1e-6 and has the fulltime_limit, as in RAVEN.init.ftinitandinit.run_ftinitwithresolve_ties: among the least-total-flux solutions, each 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 (newrun_ftinitargumentrank_keys), so they no longer depend on which member names it.init.ftinitandinit.run_ftinitwithresolve_tiesraise aUserWarningnaming the phase (phase2c-minflux,phase2d-direction) when the minimal-flux or the direction phase finds no solution, as RAVEN does, and keep the fluxes of the phase before it. A phase that stops at the time limit is adopted with aUserWarningthat its fluxes are an unproven incumbent.init.ftinitwithresolve_ties: the last step skips the minimal-flux and direction phases, as no step reads its fluxes, and reports the fluxes of the id-rank phase. The reaction set does not change.Docstrings are rewritten in impersonal, present-tense wording with British spelling; the code is unchanged. Statements that differed from the code are corrected, for example
find_good_reactions,sum_biomass,diff_models,compare_models,set_gene_rule,constrain_reversible_reactions,ftinit(essential forcing,mip_gap, determinism figures),fast_lpmetabolite matching andbatch_curateindex matching.
Further changes#
curation.batch_curateandbatch_curate_from_tsvfollowcurateModelFromTables: reaction tables are grouped byrxnIdxand name, the header spellings of RAVEN are accepted, a new reaction without bounds gets lower bound -inf and the storeddefaultUBof the model (+inf when none is stored), new ids use the width of the largest existing id, an empty MIRIAM cell removes the namespace, and an empty charge or score is 0 for a new entity. The new argumentoverwrite_with_empty(defaultTrue) lets an empty cell of an existing entity clear the value. All tables are validated before the model changes: cells are trimmed as MATLABstrtrim, numbers follow the plain decimal rule of RAVEN, a charge must be a finite whole number,revmust be 0, 1,trueorfalse,rxnIdxmust be a whole number of at least 1, a malformed gene rule, a repeatedrxnIdxand a gene listed twice raise, and repeated coefficients are summed.manipulation.merge_modelskeeps all metabolites, genes and compartments of every model, concatenates the objectives, keeps the compartment name of the first model and appends new items in order (was: only items used by reactions, the objective dropped, the last name won).add_transport_reactionssets the subsystem to "Transport betweenand " for a reversible reaction and "Transport from to " otherwise (was: empty). manipulation.simplify_modelandremove_duplicate_reactionsfollowsimplifyModelandcontractModel: the order of the modes, the lowest-index survivor, reserved reactions and orphan metabolites; duplicates are grouped by stoichiometry and reversibility, with bounds and objective merged, andremove_duplicate_reactionshas noreservedoption.remove_zero_interval_reactionsandremove_no_flux_reactionsno longer remove genes.expand_modelkeeps the first isozyme copy at the original position.New:
utils.sort_model(counterpart ofsortModel) andutils.ids.next_ids.utils.generate_new_idstakes the numeric maximum, asgenerateNewIdsdoes.biomass.set_gamstores the exact GAM value, checks the NGAM reaction before it edits the biomass reaction, and refuses an NGAM value without an NGAM reaction. The rebalancing of the charge refuses unset charges.init.ftinittakestissue,celltypeandhpaby position, andtranscrandrxn_scoresas keywords, and has the new argumentsremove_genes,use_scores_for_tasks,no_gene_score,isozyme_scoring,complex_scoring,multiple_cell_scoring,hpa_level_scoresanddata_precedence. Scoring followsscoreModel(levelNonescores -8, tissue and cell type names are compared case-insensitively, an unknown level raises). A call that passesrxn_scoresby position needs the keyword. The output is built from the reference model with the bounds and directions of the template and has no gene or metabolite without a reaction.init.remove_low_score_genestakes the new argumenttied_reactions, a list that receives the ids of the reactions cut to one of tied isozymes.init.prep_init_modelprunes unused genes asprepINITModeldoes, keeps the metabolites that tasks name, accepts repeated and empty task ids and removes a task that cannot be performed by its position.rescale_for_initleaves bounds alone, andprep_init_modelresets them to ±1000.get_init_stepswith the full series ignores no metabolites and carries the single MILP run of RAVEN.comparison.compare_modelsfills the task matrix by position.tasks.parse_task_listleaves a bound unchanged when its CHANGED LB or UB cell is empty (was: -1000 and 1000), raises when the ID column is first, as RAVEN does, and refuses a binary.xlsfile with an error that names.xlsx.check_taskswarns when aname[comp]matches several metabolites, and duplicate or conflicting task inputs and outputs raiseValueError(was: outputs overwrote input bounds).gapfilling.connect_blocked_reactionsrenamesepstothreshold(default 1.0), has the new argumentmin_flux=0.1, prices renamed template reactions by their template id, and restores the steady-state bounds after the net-production check.connect_blocked_reactionsandfill_gaps_fast_lprename a template reaction whose id is already a draft id to<id>_<template id>. FVA and blocked-reaction searches in gap-filling run in the calling process (was: a worker process, which hung on Python 3.14).analysis.reporter_metabolitesraisesValueErrorfor p-values outside [0, 1] (was: they were dropped), centres the z-scores on the first one before taking moments, and returns onlyallwithstd_z0 for a single gene or zero fold changes.io.write_yaml_modelquotes the YAML 1.1 booleans (y,n,yes,no,on,offin any case), writes a single ec code or SMILES annotation as a list, omits empty reaction names, and warns about metabolites with an empty or duplicate name. It writesdefaultLBanddefaultUBeach when the stored metadata has it.io.export_for_gitwrites the formatsyml,xml,mat,xlsxandtxtby default, the txt table headedRxn idwithout padding, the gene name asfbc:labelin SBML, and adependencies.txtwith the versions of python, cobra, libSBML, ruamel.yaml, scipy, openpyxl, raven_toolbox, and the model version and date.main_branch_flagraises when a raven_toolbox checkout is on a branch other thanmainormaster, and the flags must bebool.write_fastawrites only the header line for an empty sequence.manipulation.add_reactions_from_equationsadds new genes in sorted order. The essential set oftasks.find_task_essential_reactionsfollows the reaction order of the model and does not depend on the hash seed.localizationparses UniProt locations by whole words, with isoform blocks, all columns and duplicate genes.init.parse_hpa_rnareads theSampleandValuecolumns, raises when the tissue or value column is missing, and keeps the last of repeated rows.The package supports Python 3.14 and 3.15, and the CI tests both.
Packaging and docs#
Assets are downloaded from
CompMetEng/toolbox-assets;publish_to_raven_data.pyis renamedpublish_to_toolbox_assets.py.The package metadata and the README name the GPL-3.0 licence of the
LICENSEfile (was: MIT).The
docs/tree and its Read the Docs build are removed; the documentation is on raven-docs. The project URLs point toCompMetEng, anddata/deeplocis not part of the source distribution.Docstrings are corrected for
reporter_metabolites,random_sampling,remove_no_flux_reactions,check_tasks,connect_blocked_reactionsandfind_leak_metabolite.
3.0.0b1 (2026-09-07)#
First beta toward 3.0, matching the upcoming MATLAB RAVEN 3.0 beta.
keep
ftinit()as the only extraction pipeline.analysis.compare_fluxesreplacesfollow_changed: acompareFluxesport, following RAVEN droppingfollowChanged/followFluxes/mapCompartments.comparison.compare_modelsgained EC-code / metabolite-name / equation overlap matrices, folded fromcompareRxnsGenesMetsComps.New:
curation.rename_model_genes, ported fromrenameModelGenes.New:
curation.get_gene_data,download_genome_data,process_protein_fasta_file: the genome-data cluster.New:
manipulation.replace_metabolite, ported fromreplaceMets.New:
gapfilling.find_leak_metabolite, ported fromfindLeakMetabolite.New:
manipulation.remove_bad_reactions, ported fromremoveBadRxns.New:
gapfilling.gap_report, ported fromgapReport.New:
analysis.trace_flux_path, ported fromtraceFluxPath.New:
analysis.get_flux_z/analyze_sampling, ported fromgetFluxZ/analyzeSampling.New:
analysis.fit_parameters, ported fromfitParameters.New:
utils.guess_composition, ported fromguessComposition.New:
analysis.walk_fluxes/FluxWalker, ported fromwalkFluxes.New:
analysis.get_min_nr_fluxes, ported fromgetMinNrFluxes.New:
utils.generate_new_ids, ported fromgenerateNewIds.init.ftinitimplements the metabolomics production-bonus (metabolomics=,prod_weight=).init.ftinitreproducibility parameters renamed:strict_gap/canonicalare nowprove_abs_gap/resolve_ties, with corrected determinism numbers.ftINIT task gap-filling now edits the reference model in place instead of copying it, and is ~23% faster on a genome-scale extraction.
Fixed three ftINIT/task-essential bugs: a task-essential boundary default, a checkpoint file-handle leak, and a non-finite tie-break objective.
manipulation.close_modelboundary-reaction detection is now structural, matching RAVEN.manipulation.convert_to_irreversiblenow splits exchange reactions too, carries a negative objective coefficient onto the reverse reaction, and gained an optionalrxnsrestriction.conditions.apply_conditionraises on unknown charge during charge balancing instead of silently miscalculating.annotation.load_delta_g_csvnow always records CSV values literally, matchingdeltaGCSV.manipulation.remove_dead_end_reactionsdead-end detection is now bounds-blind, matching RAVEN.analysis.get_min_nr_fluxesno longer crashes withGurobiErrorreading fluxes from an infeasible solve.analysis.fseofgained an explicitmin_targetscan-floor override.Fixed six redundant-calculation hot spots:
merge_linear, batchedadd_reactionscallers,analyse_topology,trace_flux_path,remove_dead_end_reactions,find_task_essential_reactions.random_samplingandfill_gaps_fast_lpparallelized withProcessPool.io.write_yaml_modelfixed: an infinite/NaN bound wrote as a bare word instead of the YAML token;sort_ids=Truedropped the!!omaptag oncompartments; unknownmetaDatafields are now preserved on write; emptygene_reaction_ruleis now dropped.read_yaml_modeltreats a null genes/reactions/metabolites key as empty.Parameter defaults measured and unified: BLAST/DIAMOND/HMMER threading, homology
min_align_len/evalue,get_init_model.allow_excretion.Removed
io.export_model_to_sif: a mislabeled port of a MATLAB function that never existed.
0.4.0 (2026-08-28)#
A raven-gecko-parity cross-validation harness closed six MATLAB-parity divergences and brought
the YAML writer to byte-parity; ftINIT gained an opt-in deterministic-extraction mode; compartment
placement and gap-filling in assign_compartments were fixed for determinism and reliability.
convert_to_irreversiblenow carries a reaction's annotations, subsystem and notes onto its_REVhalf, matchingconvertToIrrev.ftinitgained opt-in deterministic extraction (strict_gap,canonical) for reproducible MILP tie-breaking, default off.assign_compartments's gap-fill now uses a flux-based fill (pFBA) instead of cobra's unreliable indicator-MILP gapfill.assign_compartmentsreaction placement is now deterministic and score-aligned instead of a solver tie-break (yeast agreement 52.8% → 72.5%).diff_modelscompares GPRs as logic (DNF-normalised), not text; operand order no longer registers as a difference.load_delta_g_csvnow stamps every matched value literally by default, matchingdeltaGCSV.confidence.annotate_confidenceruns every applicable scorer in one call;curation_prioritycan now drop curator-settled placements from the review queue.New
thiele_palsson_scorederives the Thiele & Palsson 2010 confidence score from thegene_associationfacet.merge_compartments/copy_to_compartmentare now public API;merge_compartmentsno longer drops single-metabolite reactions or the model objective.Six MATLAB-parity divergences closed via the new
raven-gecko-parityharness:check_tasksboundary semantics,apply_conditionexchange-reset direction,remove_duplicate_reactionsGPR union,add_reactions_from_equationsmetabolite naming,export_to_exceldefault-bound cells.write_yaml_modelbrought to byte-parity withwriteYAMLmodel.m: numeric coercion,metaDatafield order, MIRIAM collapsing, compartment defaulting, quoting, indentation.read_yaml_modelno longer crashes on a model with no genes.BLAST/homology defaults matched to RAVEN and measured:
run_blast.evalue→1e-4,min_align_len→100; newreview_identitysurfaces near-miss homology candidates.New
set_exchange_bounds, RAVEN'ssetExchangeBoundsport.New cross-language parity testing harness (
tests/parity/): exact, set-level, and statistical comparison tiers against real MATLAB RAVEN output.Fixed a downloaded binary bundle leaving its non-primary executables non-executable.
0.3.0 (2026-07-16)#
Compartment localisation and per-reaction confidence tracking, new gap-filling and
flux-sampling algorithms, ftINIT brought to parity with RAVEN, and KEGG artefact hosting
moved to the dedicated raven-data repository.
export_for_gitcan pin the MATLAB.matvariable name viavarname.ftinit/prep_init_modelnow match RAVEN's model preparation, solver parameters, and gap schedule; newmanipulation.simplify_model. Human-GEM prep model sizes now match RAVEN's.New confidence facets
equationandgene_association(mass/charge balance, GPR presence) plusfacet_summary; validated against yeast-GEM's own curated confidence levels.Fixed
get_elemental_balancecrashing on an unparseable polymer formula (nowunknown).Fixed
score_localization_confidencevetoing reactions it simply couldn't measure.Fixed gap-fill materialising on the wrong compartment metabolite in
assign_compartments.New
localization.transport_evidence: per-gene transporter evidence lowers a metabolite's transport cost in the assignment MILPs.assign_compartments/apply_assignment/AssignmentProposalconsolidated into raven-toolbox from the standaloneassignCompartmentsrepo.Benchmarked the compartment-assignment MILP against CarveFungi's own carve-MILP and against RAVEN's
predictLocalization, more accurate and deterministic on both.New
triage_localization: flags genes/reactions whose localisation call is shakiest, each with a plain-English reason.Retuned
DEEPLOC_COMPARTMENT_TRUSTand themin_confidence/membrane_thresholdgates from real yeast validation data.Cross-species DeepLoc benchmarks (yeast, Arabidopsis, Chlamydomonas, Human-GEM): DeepLoc 2.1 generalises across kingdoms.
load_deeplocgainednormalise=Falsefor raw calibrated probabilities (accuracy-neutral for assignment).New
combine_scores(weighted-sum consensus across localisation predictors) andmin_confidence=/membrane_split=loader gates.New
prepare_deeploc_input,fetch_protein_sequences,write_fasta: writes a DeepLoc-ready protein FASTA for a model's genes.New localisation loaders:
load_mulocdeep,load_compartments,load_uniprot,fetch_uniprot_localization. Removedload_wolfpsort.Flux sampling: CHRR and ACHR unified under
random_sampling(method=...); ACHR is now the default. Breaking: passmethod="random_objective"for the previous default.New gap-filling algorithms:
fill_gaps_fast_lp(+ SWIFTCORE variant),fill_gaps_kumar_milp,analyse_topology.KEGG artefacts moved from
raven-toolboxreleases to the dedicatedraven-datarepository.Refreshed
kegg118artefact set; fixed 404ing release-asset URLs.Binary provisioning split into
runtime/buildsets with an explicitraven-toolbox-binariesfetch CLI; native-Windows HMMER support;RAVEN_PYTHON_AUTOFETCH=0toggle.KEGG artefact build is now resumable (skips completed stages) and reports progress via
tqdm.export_to_excelwrites populatedmodel.ecdata (ENZYMES/ENZRXNS sheets).CI now runs on macOS and Windows in addition to Linux.
Docstring rendering fixes for
set_gamandadd_sbo_terms(no API change).
0.2.0 (2026-06-14)#
Project rename plus KEGG-reconstruction and CI improvements.
Project renamed
raven-python→raven-toolbox; import package is nowraven_toolbox.get_kegg_model_from_sequencesuseshmmsearchinstead ofhmmscan.get_kegg_model_for_organism_from_artefactsauto-resolves its taxonomy artefact.Test data no longer ships real KEGG records; they are generated at runtime instead.
Removed the unimplemented
visualizationstub and its extra.CI updated to Node 24 /
actions/checkout@v5/actions/setup-python@v6.
0.1.0 (2026-06-10)#
First release with published, downloadable KEGG artefacts, plus a cobra-aligned hardening pass.
KEGG artefacts published (
kegg116):ensure_kegg_data/ensure_kegg_hmm_libraryfetch version-pinned, SHA256-verified files from the GitHub release; gzip instead of xz so MATLAB and Windows can read them without an external tool.New
reconstruction.kegg.phyl_dist(PhylDist), a port of RAVEN'sgetPhylDist.raven_toolbox.__version__now derives from installed package metadata.Solver/feasibility failures now raise
cobra.exceptions.OptimizationErrorconsistently.Hardening pass: path-traversal guard on ZIP extraction,
random_samplingNaN guard,connect_blocked_reactionsnon-positive-penalty guard, SHA256 cache re-verification, and fixes for a handful of latent edge-case crashes, each with a regression test.
0.1.0a1 (2026-05-30)#
First alpha release. Covers the functional scope of RAVEN built on cobrapy: de-novo reconstruction (KEGG / homology), context-specific modeling (tINIT / ftINIT), metabolic-task validation, connectivity gap-filling, HPA omics ingestion, sub-cellular localisation, N-model comparison, reporter metabolites, FSEOF, flux sampling, and the RAVEN-style I/O formats (YAML / SIF / Excel). Validated against MATLAB RAVEN on Human-GEM (Jaccard 0.975–0.980).
Licensed under MIT (previously GPL-3.0-or-later).
Sphinx + MyST documentation site.
Not yet implemented: visualization, metabolomics-based (f)tINIT scoring, published binary/KEGG-artefact release bundles.