v3 codebase review: registry, gapfilling, HPA parsers, editMiriam, getExchangeRxns, getGeneData#650
Open
edkerk wants to merge 6 commits into
Open
v3 codebase review: registry, gapfilling, HPA parsers, editMiriam, getExchangeRxns, getGeneData#650edkerk wants to merge 6 commits into
edkerk wants to merge 6 commits into
Conversation
Function test results207 tests 184 ✅ 35s ⏱️ For more details on these failures, see this check. Results for commit 4f2a020. ♻️ This comment has been updated with latest results. |
Delete exportModelToSIF (Cytoscape SIF, niche legacy format), getFullPath (345-line third-party Windows path canonicalizer), and getMD5Hash (per-OS shell-out with a certutil bug). Replace the eight getMD5Hash call sites in getBlast with a toolbox-free local filemd5 using Java MessageDigest. Drop the three corresponding unit tests. Update docs/v3_review.md: expand the "already done" section to include all completed backports and the dispEM removal; remove the resolved §2 FSEOF redesign and §7 bug-fix entries; renumber the roadmap items accordingly.
…actions
ravenModelFields() returns a struct array declaring every 1-D RAVEN model
field with its entity type ('rxn','met','gene','comp') and default value.
Fields requiring 2-D indexing (S, rxnGeneMat, b) or value-remapping
(metComps/rxnComps/geneComps when permuting comps) are excluded and handled
explicitly by callers.
permuteModel: replaced individual isfield/permute blocks with a
registry-driven loop plus four small switch cases for 2-D fields.
Fixes silent drift for pwys, spontaneous, metNotes, and geneFrom.
removeReactions: replaced individual isfield blocks with registry-driven
loops. rxnGeneMat and S are still handled explicitly.
addExchangeRxns, addTransport: add pwys and spontaneous handlers.
addTransport: fix rxnConfidenceScores default (1 to NaN) and rxnDeltaG
default (0 to NaN).
§4.3 redundant helpers: - findDuplicateRxns: rewritten with unique(S','rows') for O(n log n) vs O(n^2) - getMetsInComp: removed (callers can write model.metComps==J inline; only caller was the test suite) - parseRxnEqu: kept (two callers: constructS and prepINITModel) - deleteUnusedGenes: refactored to thin wrapper over removeReactions; verbose output retained §5.5 small consolidations: - loadDeltaGfromCSV + saveDeltaGtoCSV collapsed into deltaGCSV(model,direction,...) with shared loadField/saveField local functions; old files removed - getWoLFScores already delegates to parseScores -- no change needed §4.1: functions kept for teaching; doc updated to reflect decision §5.1: registry already done; doc updated §5.4 (KEGG cache plumbing): no longer relevant after K15 refactor; removed v3_review.md updated throughout to reflect all completed and deferred items
§5.2 — Gapfilling: merge makeSomething/consumeSomething into
findLeakMetabolite(model, direction, ...); originals kept as wrappers.
§6.2 — HPA parsers: rewrite parseHPA and parseHPArna to be fully
header-driven (column positions inferred from the file header row);
auto-detect delimiter; version parameter retained but ignored.
§6.3 — Small expansions:
- editMiriam: add 'remove' mode to clear a named namespace
- getExchangeRxns: add optional third output (metabolite index per
exchange reaction)
- getGeneData: add UniProt column extracted from GFF Dbxref
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements and documents a series of improvements identified during a subsystem-by-subsystem audit of the RAVEN v3 codebase (
docs/v3_review.md).core/modelFields.m) — single source of truth for all optional model fields; wired intopermuteModelandremoveReactionsexportModelToSIF,getMetsInComp, and other functions that have better alternatives or are unusedgetModelField,hasField,requireField;permuteModel/removeReactionsrewritten using the registrymakeSomething/consumeSomethingintofindLeakMetabolite(model, direction, ...); old functions retained as thin wrappers for backward compatibilityparseHPAandparseHPArnarewritten to be header-driven (auto-detect column positions instead of version-number-guessing)editMiriamgains a'remove'mode;getExchangeRxnsgains a 3rd output (exchanged metabolite index per exchange reaction);getGeneDataadds a UniProt columnTest plan
tGapfilling:findLeakMetaboliteProduceReturnsSolution,findLeakMetaboliteConsumeReturnsSolution,findLeakMetaboliteInvalidDirectionErrorstAnnotation:editMiriamRemovesAnnotationtQueries:getExchangeRxnsThirdOutputIsMetIndex