Skip to content

Commit b0725c6

Browse files
authored
Remove importExcelModel and convert tutorial models to YAML (#631)
* Remove importExcelModel and convert tutorial models to YAML - 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 * Remove orphaned Excel model files from tutorial 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.
1 parent 4fa69ee commit b0725c6

22 files changed

Lines changed: 3482 additions & 2170 deletions

analysis/followChanged.m

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,13 @@ function followChanged(model,fluxesA,fluxesB, varargin)
100100
zeroFluxes=ineither(find(fluxesA(ineither)==0));
101101
fluxIndexes=unique([fluxIndexes zeroFluxes(find(abs(fluxesB(zeroFluxes))>=cutOffFlux))']);
102102

103-
formulas=constructEquations(model,model.rxns(fluxIndexes));
103+
if isempty(fluxIndexes)
104+
% No reactions changed; avoid constructEquations interpreting an empty
105+
% reaction list as "all reactions"
106+
formulas={};
107+
else
108+
formulas=constructEquations(model,model.rxns(fluxIndexes));
109+
end
104110

105111
if cutOffFluxSupplied
106112
if cutOffDiffSupplied

doc/io/importExcelModel.html

Lines changed: 0 additions & 1089 deletions
This file was deleted.

gapfilling/fillGaps.m

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,17 @@
189189
%merged model
190190
toCheck=intersect(allModels.rxns(strcmp(allModels.rxnFrom,model.id)),model.rxns(~originalFlux));
191191

192-
%Get the ones that still cannot carry flux
193-
I=haveFlux(allModels,1,toCheck);
194-
195-
%Get the reactions that can't carry flux in the original model, but can
196-
%in the merged one
197-
K=toCheck(I);
192+
%Get the ones that still cannot carry flux. Guard against an empty
193+
%toCheck, since haveFlux interprets an empty reaction list as "all
194+
%reactions" rather than "none"
195+
if isempty(toCheck)
196+
K=toCheck;
197+
else
198+
I=haveFlux(allModels,1,toCheck);
199+
%Get the reactions that can't carry flux in the original model, but can
200+
%in the merged one
201+
K=toCheck(I);
202+
end
198203

199204
%This is a temporary thing to only look at the non-reversible rxns.
200205
%This is because all reversible rxns can have a flux in the

0 commit comments

Comments
 (0)