Skip to content

Remove importExcelModel and convert tutorial models to YAML#631

Merged
edkerk merged 2 commits into
develop3from
feat/remove-excel-import
Jun 11, 2026
Merged

Remove importExcelModel and convert tutorial models to YAML#631
edkerk merged 2 commits into
develop3from
feat/remove-excel-import

Conversation

@edkerk

@edkerk edkerk commented Jun 11, 2026

Copy link
Copy Markdown
Member

Summary

Removes importExcelModel and all references to it. Tutorial models that were only available in Excel are converted to YAML, and the tutorials are rewritten to load models via importModel/readYAMLmodel.

Changes

  • Removed io/importExcelModel.m and its generated documentation. No .m files reference it anymore.
  • Converted the tutorial models small, smallYeast and smallYeastBad from Excel to YAML; rewrote tutorials 1–4 and their solutions to load via importModel/readYAMLmodel.
  • Dropped the smallYeastBad2 section of tutorial 4 — its duplicate metabolite names cannot be represented in SBML/YAML (only importExcelModel with ignoreErrors could load it).
  • Removed Excel-import coverage from tIO and importExportTests.

Pre-existing bugs fixed along the way

These were surfaced by running the tutorials end-to-end; each was verified to fail identically with the original Excel-loaded model (i.e. not caused by the conversion):

  • readYAMLmodel: gene-less models received a [0×0] rxnGeneMat, inconsistent with the reaction count, which broke removeReactions (and hence printFluxes(...,true)). Now sized [nRxns×nGenes].
  • followChanged: when no reactions differ, the empty reaction list was expanded to all reactions by constructEquations, causing an out-of-bounds index.
  • fillGaps: an empty toCheck list was passed to haveFlux, which interprets an empty reaction list as all reactions, causing an out-of-bounds index.
  • tutorial3_solutions: lower bounds were set before upper bounds, so a lower bound transiently exceeded the previous upper bound.
  • tutorial4: the reference model was used before being defined.

Verification

All tutorials run end-to-end (MATLAB R2024b). Remaining non-passes are environment-only: qMOMA in tutorial 3 needs the Optimization Toolbox (quadprog), and tutorial 4 needs a MILP-capable solver.

Function tests green: tIO 17/0, tAnalysis 18/0, tGapfilling 9/0, importExportTests 6/0.

Note

The orphaned tutorial .xlsx model files (small.xlsx, smallYeast.xlsx, smallYeastBad.xlsx, smallYeastBad2.xlsx, empty.xlsx, iAL1006 v1.00.xlsx) are left in place; with importExcelModel gone, no RAVEN function reads them. They can be removed separately if desired.

- Remove io/importExcelModel.m and its generated documentation
- Convert tutorial models small, smallYeast and smallYeastBad from Excel
  to YAML; rewrite tutorials 1-4 and their solutions to load models via
  importModel/readYAMLmodel instead of importExcelModel
- Drop the smallYeastBad2 section of tutorial 4 (duplicate metabolite
  names cannot be represented in SBML/YAML)
- readYAMLmodel: keep rxnGeneMat dimensionally consistent for gene-less
  models, which were left with an empty matrix that broke removeReactions
- followChanged: handle the case where no reactions differ, where the
  empty reaction list was expanded to all reactions by constructEquations
- fillGaps: guard against an empty toCheck list, which haveFlux otherwise
  interprets as all reactions
- tutorial3_solutions: set upper bounds before lower bounds so a lower
  bound never transiently exceeds the previous upper bound
- tutorial4: define the reference model before it is used
- Remove Excel import coverage from tIO and importExportTests
@github-actions

Copy link
Copy Markdown

Function test results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit 8dc575a.

With importExcelModel gone, nothing can read the Excel source models, so
the now-unreferenced tutorial/{small,smallYeast,smallYeastBad,
smallYeastBad2}.xlsx and "iAL1006 v1.00.xlsx" are removed. The small,
smallYeast and smallYeastBad models remain as YAML; iAL1006 remains as
SBML. The empty.{xml,xlsx,yml,mat} set is kept on purpose, as each format
is used to test a different importer (importModel, loadWorkbook/loadSheet,
readYAMLmodel/parseYAML and the MAT-based importExportTests). Update the
tutorial1 header that referred to the removed Excel file.
@edkerk edkerk merged commit b0725c6 into develop3 Jun 11, 2026
1 check passed
@edkerk edkerk deleted the feat/remove-excel-import branch June 11, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant