MATLAB vs Python#
RAVEN ships as a MATLAB toolbox and as the Python package raven-toolbox. This page is generated from the source of both toolboxes at build time. Pairs are found automatically where the names match, completed from a curated list where they do not, and marked with a cobrapy badge where cobrapy covers the function instead of raven-toolbox. Every name is verified to exist.
Paired functions#
130 RAVEN functions listed: 53 matched automatically, 49 from a curated list, 28 covered by cobrapy instead of raven-toolbox.
RAVEN (MATLAB) |
raven-toolbox (Python) |
Summary |
|---|---|---|
|
Add exchange reactions for some metabolites. |
|
|
Add genes to a model. |
|
|
Add identifier prefixes required by SBML. |
|
|
Add metabolites to a model. |
|
Add reactions to a model. |
||
Copy reactions from a source model into another model. |
||
Add transport reactions between compartments. |
||
Compare flux change significance with expression change. |
||
Apply a deterministic condition to a model. |
||
Assign reactions to compartments by a functionality-constrained MILP. |
||
Assign SBO terms to metabolites and reactions. |
||
Check which metabolites a model can produce or consume. |
||
Change multiple grRules at the same time. |
||
Modify the equations of reactions in a model. |
||
Perform a number of checks to ensure a model structure is ok. |
||
Check which metabolites can be produced from a model. |
||
Perform a set of simulations as defined in a task file. |
||
Add boundary metabolites and their exchange reactions. |
||
Find the most significant flux changes between two conditions. |
||
Compare two or more condition-specific models. |
||
|
Construct equation strings for reactions. |
|
Contract a model by grouping all identical reactions. |
||
Convert a model to irreversible form. |
||
Copy reactions to new compartment(s). |
||
Curate or add mets, rxns and genes from tables. |
||
Delete all genes not associated to any reaction. |
||
Report the semantic differences between two models. |
||
Download genome annotation files from NCBI. |
||
Expand reactions that use several gene associations. |
||
Export a model for a Git-maintained model repository. |
||
|
Export a constraint-based model to an SBML file (L3V1 FBCv2). |
|
Export a model to the Microsoft Excel model format. |
||
Use template model(s) to fill gaps in a model. |
||
Find reactions that share identical stoichiometry. |
||
|
Delete genes and track the resulting fluxes. |
|
Find a metabolite that can be freely made or consumed. |
||
Fit stoichiometric parameters such as maintenance ATP to measured data. |
||
Fill gaps in a model so it can perform a list of tasks. |
||
Flux Scanning based on Enforced Objective Flux. |
||
Generate a model using the ftINIT algorithm. |
||
Variant of fillGaps specially adapted to speed up generation of ftINIT models. |
||
This function runs the MILP for a step in ftINIT. |
||
L1-norm LP subroutine for fastGapFill. |
||
LP-based gap-filling (fastGapFill / swiftGapFill). |
||
Objective-based gap-filling via a global growth-floor MILP. |
||
SWIFTCORE LP subroutine for swiftGapFill. |
||
BFS metabolite-producibility pre-screening. |
||
Perform a gap analysis and summarize the results. |
||
Generate a list of new metabolite or reaction ids. |
||
|
Return the minimal and maximal fluxes through reactions. |
|
|
Find all reactions annotated by the genes of a set. |
|
Get all metabolic subgraphs in a model. |
||
Compute mass fraction per biomass component. |
||
Bidirectional BLAST between an organism and template organisms. |
||
Bidirectional BLAST with DIAMOND against template organisms. |
||
Check whether the reactions of a model are balanced. |
||
Calculate the essential reactions for a solvable model. |
||
|
Retrieve the exchange reactions from a model. |
|
Calculate Z scores between two sets of random flux distributions. |
||
Build a gene-mapping table from NCBI genome annotation files. |
||
|
Extract gene list and rxnGeneMat from grRules array. |
|
|
Retrieve the indexes for a list of reactions or metabolites. |
|
Define the steps used as input to ftINIT. |
||
Reconstruct a model from KEGG protein homology. |
||
|
Find the minimal set of uptake reactions for growth. |
|
Find the minimal set of fluxes that satisfy the model. |
||
Construct a new model from existing models and homology. |
||
Load the global KEGG model. |
||
Load the pre-built KEGG phylogenetic distance matrix. |
||
|
Get the reactions in a specified compartment. |
|
Fetch curated subcellular locations from UniProt -> gene scoring structure. |
||
This function sums up the reaction scores for all reactions that were merged |
||
Convert a grRule to disjunctive normal form. |
||
|
Render a grRule syntax tree back to a string. |
|
Guess the composition of metabolites without one. |
||
Check which reactions can carry a flux. |
||
Read SuppOrth consensus orthologs into a blastStructure. |
||
|
Import a constraint-based model from an SBML file. |
|
Test whether a grRule is in disjunctive normal form. |
||
Load metDeltaG and rxnDeltaG from CSV files. |
||
Make a fake blastStructure from an ortholog list. |
||
Merge all compartments in a model. |
||
Simplifies a model by merging rxns with linear dependencies. There are two |
||
Merge models into one model structure. |
||
|
Print a concise overview of a RAVEN model and its flux state. |
|
|
Optimize an LP or MILP formulated in COBRA terms. |
|
|
Parse a grRule into a syntax tree. |
|
Parse a database dump of the Human Protein Atlas (HPA). |
||
Parse a dump of Human Protein Atlas (HPA) RNA-Seq data. |
||
Parse predictor / database output into a gene scoring structure (GSS). |
||
Parse a task list file. |
||
Assign reactions to compartments using localization predictors. |
||
Precompute omics-independent data for ftINIT. |
||
|
Print some statistics about a model to the screen. |
|
Rename protein FASTA headers using a gene mapping table. |
||
Sample the flux solution space (entry point for all samplers). |
||
Read a gzipped KEGG relational table into a table with |
||
Read a model structure from a YAML file. |
||
Delete a set of genes from a model. |
||
|
Remove SBML-required identifier prefixes. |
|
Remove low-scoring genes from model. |
||
Delete a set of metabolites from a model. |
||
|
Delete a set of reactions from a model. |
|
Replace gene identifiers in a RAVEN model. |
||
Replace a metabolite with another already in the model. |
||
Identify metabolites around which transcriptional changes occur. |
||
Rescale a model to avoid large stoichiometric differences. |
||
|
Run phenotype phase plane analysis and plot the results. |
|
|
Calculate the byproduct secretion envelope. |
|
Run SuppOrth on an organism and template proteomes. |
||
Artificially Centered Hit-and-Run flux sampling. |
||
Coordinate Hit-and-Run with Rounding flux sampling. |
||
Save metDeltaG and rxnDeltaG to CSV files. |
||
Rescale a biomass component to a target value. |
||
Rescale a biomass component pseudoreaction. |
||
Score reactions and genes in a model with complex gene rules. |
||
Define exchange flux bounds for a set of metabolites. |
||
|
Define exchange flux bounds for a set of metabolites. |
|
Set the growth-associated maintenance (GAM) coefficient. |
||
|
Set parameters for reactions. |
|
|
Set the solver for RAVEN. |
|
Simplify a model by deleting reactions and metabolites. |
||
|
Solve a linear programming problem. |
|
Sort model identifiers alphabetically. |
||
Standardize a model's internal ordering: by default orients |
||
Standardize gene-reaction rules in a model. |
||
Find the highest-flux-fraction path between two reactions. |
||
Interactively navigate a flux distribution reaction by reaction. |
||
Write sequences to a FASTA file. |
||
Write a model to a yaml file in the standard cobra-format |
Deliberately not ported#
RAVEN (MATLAB) |
Why not |
|---|---|
Internal helper for building an equation string from raw metabolites and coefficients; the equivalent is inside add_reactions_from_equations and cobra.Reaction.build_reaction_string, both already mapped. |
|
Internal to assembling the global KEGG reference model; the equivalent is inside build_reference_model, already mapped from getModelFromKEGG. |
|
Internal to assembling the global KEGG reference model; the equivalent is inside build_reference_model, already mapped from getModelFromKEGG. |
|
A generic file-existence check; Python's own pathlib/os.path cover this directly. |
|
Checks whether a Mosek solution is feasible and optimal; Mosek is not a solver either toolbox supports through this site's documented setup. |
|
Internal to the old Excel-import pipeline (importExcelModel), which RAVEN 3 removed; raven-toolbox never had an Excel reader either. |
|
Internal helper for building a stoichiometric matrix from equation strings; the equivalent is inside add_reactions_from_equations, already mapped from addRxns. |
|
MATLAB char-array/string-array normalisation; Python has one string type. |
|
raven-toolbox exposes the same table as a module-level constant, localization.DEFAULT_COMPARTMENT_MAP, not a function. |
|
Emits RAVEN's own one-time deprecated-function notice; Python's warnings.warn covers this directly. |
|
cobra's .annotation is already a {namespace: id} dictionary -- read and write it directly. |
|
cobra's .annotation is already a {namespace: id} dictionary -- read and write it directly. |
|
Detects grRules that are not in disjunctive normal form. cobrapy's own GPR class represents a parsed rule directly, so raven-toolbox has no equivalent "detect an invalid legacy string" step. |
|
The original tINIT implementation. RAVEN keeps it for models already built with it; raven-toolbox, a new implementation with no such installed base, carries ftINIT alone. |
|
Classifies which reactions move a metabolite between compartments. raven-toolbox has no equivalent classifier yet. |
|
Internal to assembling the global KEGG reference model; the equivalent is inside build_reference_model, already mapped from getModelFromKEGG. |
|
Emits RAVEN's own one-time legacy-method notice; Python's warnings.warn covers this directly. |
|
Returns a parfor worker count for the Parallel Computing Toolbox; raven-toolbox's parallelism is configured directly through cobra.Configuration().processes. |
|
Internal formula-to-elemental-composition parser; the equivalent is inside get_elemental_balance, not exposed separately. |
|
Resolves RAVEN's positional-or-named optional arguments; Python functions take native keyword arguments directly. |
|
Internal helper for extracting metabolite names from equation strings; the equivalent is inside add_reactions_from_equations, already mapped from addRxns. |
|
A generic YAML parser for condition files; Python's standard YAML libraries (PyYAML) cover this directly, with no toolbox wrapper needed. |
|
Reorders the parallel arrays of a RAVEN MATLAB struct; a cobra.Model has no comparable field-order concept to reorder. |
|
No equivalent yet. Use cobra's model.summary(), or the solution's fluxes Series directly. |
|
Prints coloured text to the MATLAB Command Window; not applicable outside the MATLAB GUI. |
|
Not needed: a raven-toolbox model is a cobra.Model already, so there is nothing to convert. |
|
Formats a header and item list for a MATLAB warning()/error() call; Python's own string formatting covers this directly. |
|
A registry of RAVEN's own MATLAB struct fields, used internally by permuteModel and removeReactions; a cobra.Model has no comparable struct-field concept. |
|
raven-toolbox has no public FASTA reader; the closest relative is write_fasta (already auto-matched from writeFasta), the read side stays internal to the functions that need it. |
|
Iteratively removes reactions that let the model make or consume something from nothing. raven-toolbox has no equivalent yet; see find_leak_metabolite (mapped from makeSomething/consumeSomething) for finding the same kind of issue. |
|
Negates a reaction's stoichiometry and bounds to reverse its direction. Simple enough to do directly against a cobra.Reaction's own API; no dedicated function exists. |
|
Dynamic FBA is covered by maintained Python packages (dfba, reframed, mewpy). |
|
The original tINIT implementation. RAVEN keeps it for models already built with it; raven-toolbox, a new implementation with no such installed base, carries ftINIT alone. |
|
Runs RAVEN's own MATLAB unit test suite. raven-toolbox's tests run through pytest, the standard Python testing workflow, not a toolbox function. |
|
Robustness analysis for one reaction against an objective. raven-toolbox has no equivalent yet. |
|
A simple, brute-force OptKnock implementation. raven-toolbox has no equivalent; strain-design algorithms like OptKnock are explicitly out of scope for both toolboxes, see RAVEN 3 and raven-toolbox. |
|
Internal rounding-step subroutine of RAVEN's own sampleCHRR; raven-toolbox's random_sampling (already mapped from sampleACHR/sampleCHRR) handles rounding and warmup internally without exposing separate functions. |
|
Internal rounding-step subroutine of RAVEN's own sampleCHRR; raven-toolbox's random_sampling (already mapped from sampleACHR/sampleCHRR) handles rounding and warmup internally without exposing separate functions. |
|
Internal warmup-point generator for RAVEN's own sampleACHR; raven-toolbox's random_sampling (already mapped from sampleACHR/sampleCHRR) handles warmup internally. |
|
Sets a preference for how RAVEN reports progress in the MATLAB GUI or console; no equivalent concept in Python. |
|
Improves LP numerical conditioning by splitting wide-ratio columns before solving; cobrapy and the solvers it wraps (through optlang) handle numerical scaling internally, with no equivalent public option. |
|
Orders the fields of a RAVEN MATLAB struct to a canonical layout; a cobra.Model has no comparable field-order concept. |
|
Internal low-level .xlsx writer; the equivalent is inside export_to_excel, already mapped from exportToExcelFormat. |