0001 function errorFlag=followFluxes(model, fluxesA, lowerFlux, upperFlux, fluxesB)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 if nargin>3
0019 if upperFlux<=lowerFlux
0020 errorFlag=1;
0021 return;
0022 end
0023 end
0024
0025
0026 if nargin<4
0027 fluxIndexes=find(fluxesA>=lowerFlux);
0028 else
0029 fluxIndexes=find(fluxesA>=lowerFlux & fluxesA<=upperFlux);
0030 end
0031
0032
0033 formulas = constructEquations(model,model.rxns(fluxIndexes));
0034
0035 if nargin>3
0036 fprintf('These reactions have flux values between %s and %s\n\n',num2str(lowerFlux),num2str(upperFlux));
0037 else
0038 fprintf('These reactions have flux values above %s\n\n',num2str(lowerFlux));
0039 end
0040 for i=1:length(formulas)
0041 if nargin>4
0042 fluxText=['Flux: ' num2str(fluxesA(fluxIndexes(i))) ' Reference flux: ' num2str(fluxesB(fluxIndexes(i)))];
0043 else
0044 fluxText=['Flux: ' num2str(fluxesA(fluxIndexes(i)))];
0045 end
0046 fprintf('%s: %s\n\t%s\n\t%s\n', char(model.rxns(fluxIndexes(i))), char(formulas(i)),...
0047 char(model.rxnNames(fluxIndexes(i))),fluxText);
0048 end
0049 end