


followFluxes
Prints fluxes and reactions for each of the reactions that results in
fluxes in the specified interval.
model a model structure
fluxesA flux vector for the test case
lowerFlux only reactions with fluxes above this cutoff
value are displayed
upperFlux only reactions with fluxes below this cutoff
value are displayed (optional, default Inf)
fluxesB flux vector for the reference case(optional)
Usage: errorFlag=followFluxes(model, fluxesA, lowerFlux, upperFlux,
fluxesB)

0001 function errorFlag=followFluxes(model, fluxesA, lowerFlux, upperFlux, fluxesB) 0002 % followFluxes 0003 % Prints fluxes and reactions for each of the reactions that results in 0004 % fluxes in the specified interval. 0005 % 0006 % model a model structure 0007 % fluxesA flux vector for the test case 0008 % lowerFlux only reactions with fluxes above this cutoff 0009 % value are displayed 0010 % upperFlux only reactions with fluxes below this cutoff 0011 % value are displayed (optional, default Inf) 0012 % fluxesB flux vector for the reference case(optional) 0013 % 0014 % Usage: errorFlag=followFluxes(model, fluxesA, lowerFlux, upperFlux, 0015 % fluxesB) 0016 0017 %Checks that the upper flux is larger than the lower flux 0018 if nargin>3 0019 if upperFlux<=lowerFlux 0020 errorFlag=1; 0021 return; 0022 end 0023 end 0024 0025 %Gets the fluxes for the reactions 0026 if nargin<4 0027 fluxIndexes=find(fluxesA>=lowerFlux); 0028 else 0029 fluxIndexes=find(fluxesA>=lowerFlux & fluxesA<=upperFlux); 0030 end 0031 0032 %Finds the involved reactions 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