%script to compare the original glucose transport model with the reduced %version with the assumption of constant concentrations of the %transporter in the inner and outer regions of the cellular membrane clear all clc %%%%%%%%%%%%%%%%%%%%%%%%% %load the two models %%%%%%%%%%%%%%%%%%%%%%%%% model = SBmodel('Additional file 4.txt'); %original model redModel = SBmodel('Additional file 7.txt'); %reduced model %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %prepare simulation of the two models %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %simulate the correct model short and use the ic in both models simres = SBsimulate(model,[0 1E-3]); %update the initial condition for the original model model = SBinitialconditions(model,simres.statevalues(end,:)); %update the initial condition for the reduced model icRed = [simres.statevalues(end,1) simres.statevalues(end,2) simres.statevalues(end,5)]; redModel = SBinitialconditions(redModel,icRed); %%%%%%%%%%%%%%%%%%%%%%%%% %simulate the models %%%%%%%%%%%%%%%%%%%%%%%%% simres = SBsimulate(model,180); simresRed = SBsimulate(redModel,180); %%%%%%%%%%%%%%%%%%%%%%% %plot the results %%%%%%%%%%%%%%%%%%%%%%% %plot 1 (three largest state variables) figure(1) %plot(simres.time,simres.statevalues(:,1),'g',simres.time,simres.statevalues(:,2),'b',simres.time,simres.statevalues(:,5),'r',simresRed.time,simresRed.statevalues(:,1),'og',simresRed.time,simresRed.statevalues(:,2),'db',simresRed.time,simresRed.statevalues(:,3),'sr') hold on plot(simres.time,simres.statevalues(:,1),'m'); plot(simres.time,simres.statevalues(:,2),'Color',[1.0000 0.6445 0]); %orange plot(simres.time,simres.statevalues(:,5),'Color',[0.5000 0.5000 0.5000]); %grey plot(simresRed.time,simresRed.statevalues(:,1),'mo'); plot(simresRed.time,simresRed.statevalues(:,2),'d','Color',[1.0000 0.6445 0]); %orange plot(simresRed.time,simresRed.statevalues(:,3),'s','Color',[0.5000 0.5000 0.5000]); %grey hold off %axis labels xlabel('time [sec]') ylabel('concentration [mmole/l]') %axis bounds ylim([0 2.5]) %xlim([0 180]) h_legend = legend('x^e_{Glc} (original model)','x^i_{Glc} (original model)','x^i_{G6P} (original model)','x^e_{Glc} (reduced model)','x^i_{Glc} (reduced model)','x^i_{G6P} (reduced model)'); set(h_legend,'FontSize',8) %plot 2 (six smallest state variables) figure(2) hold on p1 = plot(simres.time,simres.statevalues(:,3),'g',simres.time,simres.statevalues(:,4),'b',simres.time,simres.statevalues(:,6),'r',simresRed.time,simresRed.variablevalues(:,5),'og',simresRed.time,simresRed.variablevalues(:,6),'db',simresRed.time,simresRed.variablevalues(:,7),'sr'); p2 = plot(simres.time,simres.statevalues(:,7),'y',simres.time,simres.statevalues(:,8),'k',simres.time,simres.statevalues(:,9),'c',simresRed.time,simresRed.variablevalues(:,8),'vy',simresRed.time,simresRed.variablevalues(:,9),'^k',simresRed.time,simresRed.variablevalues(:,10),'+c'); %legends L1 = {'x^i_{E-G6P} (original model)','x^i_{E-Glc-G6P} (original model)','x^e_{E-Glc} (original model)','x^i_{E-G6P} (reduced model)','x^i_{E-Glc-G6P} (reduced model)','x^e_{E-Glc} (reduced model)'}; L2 = {'x^i_{E-Glc} (original model)','x^e_E (original model)','x^i_E (original model)','x^i_{E-Glc} (reduced model)','x^e_E (reduced model)','x^i_E (reduced model)'}; l = legend(p1,L1); set(l,'FontSize',8) l = copyobj(l,gcf); l2 = legend(p2,L2); set(l2,'FontSize',8) %axis labels xlabel('time [sec]') ylabel('concentration [mmole/l]') %axis bounds ylim([0 0.012])