File formats, reconstruction, and GPR parsing#
1. File formats and model I/O#
SBML I/O#
RAVEN 2 |
RAVEN 3 |
|
|---|---|---|
|
SBML Level 3 Version 1, FBC v2 |
unchanged |
|
any SBML level/version; L2-style notes-based gene associations ( |
only SBML Level 3 Version 1, FBC v2; anything else errors |
MIRIAM prefixes read on import |
|
unchanged |
Older SBML files must be converted first (e.g. re-exported from COBRApy/COBRA
Toolbox) before importModel will accept them.
Excel I/O#
RAVEN 2 |
RAVEN 3 |
|
|---|---|---|
Excel engine |
Apache POI (Java), bundled |
dependency-free OOXML writer ( |
Full-model |
|
removed, no equivalent importer |
Nearest replacement for curation |
no equivalent |
|
|
fell back to tab-delimited text export |
errors, |
If your pipeline depends on the old Excel curation template, either convert it
to the .tsv shape curateModelFromTables expects, or build the model via
importModel/YAML and use curateModelFromTables for incremental edits.
YAML I/O#
readYAMLmodel/writeYAMLmodel are pure-MATLAB in both branches; model YAML
I/O has no Python dependency in RAVEN 2 or RAVEN 3. (io/parseYAML.m is an
unrelated, new, pure-MATLAB generic YAML parser used only by
conditions/applyCondition.m to read condition files; it doesn't affect
model I/O.) Output format changes, visible as diffs in version-controlled
model files:
RAVEN 2 |
RAVEN 3 |
|
|---|---|---|
Quote style |
single quotes |
double quotes |
Reaction EC codes |
top-level |
also written under |
Gene-less model |
|
|
Empty |
written as an empty string |
omitted |
|
ignored |
honored |
RAVEN⇄COBRA interoperability#
conversion/ravenCobraWrapper.m keeps its signature
(newModel = ravenCobraWrapper(model)) unchanged. Two correctness fixes change
output for affected models: a stale-variable bug that could reuse the wrong
MIRIAM data during gene-annotation conversion, and gene IDs containing regex
metacharacters (e.g. ENSG00000141510.16) that could be mis-matched during
annotation conversion; both fixed.
2. Reconstruction: KEGG and homology pipelines#
KEGG-based reconstruction (getModelFromKEGG, getKEGGModelForOrganism)#
RAVEN 2 |
RAVEN 3 |
|
|---|---|---|
Reaction/gene database source |
local KEGG FTP dump (license required), parsed by |
prebuilt artifacts (a gene-free reference model plus KO/reaction/organism tables) fetched on demand from the |
|
required |
removed, not needed |
Ortholog HMM library |
one |
one concatenated per-domain library ( |
|
arbitrary local folder |
must be |
|
configurable |
removed, no local clustering step |
|
|
|
|
|
|
Calling convention |
positional |
positional-or-named ( |
Homology-based reconstruction (getModelFromHomology)#
RAVEN 2 |
RAVEN 3 |
|
|---|---|---|
|
|
unchanged |
Best-hit tie-break at |
E-value |
bitscore by default ( |
|
|
|
GPR gene substitution when merging homology hits |
regex/ |
exact-token-based substitution |
3. Gene-reaction-rule (GPR) parsing#
RAVEN 3 adds a proper grRule tokenizer/parser: utils/parseGrRule.m builds a
parse tree (type: 'gene'|'and'|'or', with children); utils/grRuleToDNF.m
converts it to disjunctive normal form (RAVEN's canonical "OR of AND-clauses"
shape for enzyme-complex/isozyme structure); utils/isDnfGrRule.m checks
whether a rule is already in that form; utils/grRuleToString.m renders a tree
back to a canonical string. These are used internally by four functions,
they are not applied automatically to every loaded model; a grRule keeps
its original text unless one of these functions is called on it.
Function |
RAVEN 2 parsing |
RAVEN 3 parsing |
|---|---|---|
|
substring match on gene ID ( |
exact gene-token match |
|
naive split on |
parse-tree-based isozyme expansion, preserves nested |
|
string-pattern check for |
parse-tree-based non-DNF detection |
|
split on the substrings "and"/"or" anywhere (could shred an ID like |
split only on space-bounded |
|
(function didn't exist) |
grRules compared as logical DNF equality, not string equality |
The accepted grRule syntax itself is unchanged: ' and '/' or '
(case-insensitive) still work exactly as before, and
manipulation/standardizeGrRules.m (which runs on import) uses the same
string-splitting logic it always did.