%Code for semi-stochastic model simulation for 5 ng/mL and 50 ng/mL of death %ligand (DL) with the clustering and disrupted clustering option. The code %compiled as the supplimentary material to the manuscript: %Heterogeneous responses to low level death receptor activation are explained by random molecular assembly of the Caspase-8 activation platform. %Anna Matveeva, Michael Fichtner, Katherine McAllister, Christopher McCann, Marc Sturrock, Daniel B. Longley, Jochen H.M. Prehn. BaseNameMV='MVfb'; BaseNameMVfollow='MVfollowfb'; BaseNameTF='TFfb'; % DL dose DLdose=5; %5 ng/mL of DL; %DLdose=50; %50 ng/mL of DL % Scenario clustering=1; %if DR clustering scenario %clustering=0; %if DR disrupted clustering scenario for kkk=1:1 % calculate trajectory for 1 cell FileNameMV=[BaseNameMV,num2str(kkk)]; FileNameMVfollow=[BaseNameMVfollow,num2str(kkk)]; FileNameTF=[BaseNameTF,num2str(kkk)]; %------------------------------------------------------------------------------------------------------------------------------------------ tic; if DLdose==5 d=155+0; %DR5+DR4 functional origins in Hela treated with 50 ng/ml DL end if DLdose==50 d=289+34; %DR5+DR4 functional origins in Hela treated with 50 ng/ml DL end sf=100000000; %time looping tmax=600; %max time in minutes for simulation tstep=1; %step to record in output %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%% Initial ODE param %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% proCas8=54801; proCas3=187888; proCas6=1204; XIAP=98641; keffc8c3=3.33391E-05; keffc3c6=7.66416E-06; keffc6c8=2.56749E-08; keffc3c3=1.53283E-06; kdon=4.97404E-09; kdoff=0.0257; kxiapon=9.96341E-05; kxiapoff=0.144; kcat=1.75; y=[0,0,0,0,0,0]; y(end,1)=0; %Dimer of active Caspase 8 (Casp8*) y(end,2)=0; %Monomer of active Caspase 3 (Casp3*) y(end,3)=0; %Monomer of active Caspase 6 (Casp6*) y(end,4)=0; %Monomer of active Caspase 8 (Cs8*) y(end,5)=0; %Monomeric active Caspase 3 in the complex with XIAP (Casp3*:XIAP) y(end,6)=0; %Ubiquitinated monomeric Caspase 3 (Casp3*ub) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% aon=2.22261E-07; aoff=0.0609; % DED to DED bon=2.22261E-07; boff=0.0609; % DED to DED1 con=2.22261E-07; coff=0.0609; % DED2 to DED1 don=9.19660E-07; doff=0.4651; % DD to DD eon=1.14962E-04; eoff=0.6000; % RHIM-RHIM % G{j,1} is a matrix (M,V) size of (ix2) describing the composition of j-th filament %%% - M is the molecular type: (1) FADD %%% (2) Casp8 %%% (3) RIP1 %%% (4) RIP3 %%% (5) CAI (DED1-DED2) %%% - V is type of domain via M associated with j-th filament: (1) DD %%% (2) DED %%% (3) DED1 %%% (4) RHIM %%% (5) DED2 %%% (0) not bound yet MV=cell(d,1); %to follow a current state of a filament MVfollow=cell(d,tmax/tstep); %to record filament conformation each time step TF=cell(14,1); %to follow remaining free or modified components for j=1:d MV{j,1}=[3 0]; % initially each origin is represented as one molecule of RIP1 end % CF is a matrix (P,A) of size (jx2) that is describing the domains at the end of j-th filament CF=zeros(d,2); for j=1:d CF(j,1)=1; CF(j,2)=4; end P=CF(:,1); A=CF(:,2); % Mfree is a vector of size (1x7) that is describing the amount of free species in the single cell: Fc=proCas8; %amount of free proCasp8 Ff=236574; %amount of free FADD Fr1=1942026; %amount of free RIP1 Fr3=100; %amount of free RIP3 Fcifree=0; %amount of free inactivated Casp8 so only DED1-DED2 Fcibound=0; %... Casact=0; %amount of active caspase8 dimer Mfree=[Ff,Fc,Fr1,Fr3,Fcifree,Fcibound,Casact]; % GG array for reaction propensities of j-th filament (total=d): % Association rates: %%% (kup,kua,krp,kra,knp,kna,kep,kea,krpi,krai) % Dissociation rates: %%% (kdp,kda,klp,kla,ksp,ksa,kwp,kwa,klpi,klai) GG=zeros(d,20); %Association kup=GG(:,1); kua=GG(:,2); krp=GG(:,3); kra=GG(:,4); knp=GG(:,5); kna=GG(:,6); kep=GG(:,7); kea=GG(:,8); krpi=GG(:,9); krai=GG(:,10); %Dissociation kdp=GG(:,11); kda=GG(:,12); klp=GG(:,13); kla=GG(:,14); ksp=GG(:,15); ksa=GG(:,16); kwp=GG(:,17); kwa=GG(:,18); klpi=GG(:,19); klai=GG(:,20); ta=0; % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % TIME LOOP ..... % % % % % % % % % % % % % % tn=0; for v=1:sf % old time tiold=tn; if tiold<=tmax %++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ % CASPASE ACTIVATION EVENT if DIMER IS BOUND EITHER at P or A tail for j=1:d if MV{j}(1,1) == 2 && MV{j}(2,1) == 2 MV{j}(1,1)=5; MV{j}(2,1)=5; Fcibound=Fcibound+2; Casact=Casact+1; end if MV{j}(end,1) == 2 && MV{j}(end-1,1) == 2 MV{j}(end,1)=5; MV{j}(end-1,1)=5; Fcibound=Fcibound+2; Casact=Casact+1; end end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%% CLUSTERING OPTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% START %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% if clustering==1 if DLdose==5 % CASPASE ACTIVATION EVENT if two ProCasp8 molecules are BOUND within one cluster EITHER at P or A tail Funvn =[1,2,3,4,5,6,7]; %TRAIL DR5 and DR4 stimulation with 5 ng/ml of DL FUNclust=[16,14,6,6,6,3,3]; end if DLdose==50 % CASPASE ACTIVATION EVENT if two ProCasp8 molecules are BOUND within one cluster EITHER at P or A tail Funvn =[1,2,3,4,5,6,7,1,2,3,4,5,6,7]; %TRAIL DR5 and DR4 stimulation with 50 ng/ml of DL FUNclust=[30,26,11,12,11,6,5,3,3,1,1,1,1,1]; end l=Funvn.*FUNclust; ll=cumsum(l); for cnl=2:7 for li=1:FUNclust(cnl) jind=[]; a=0; jind2=[]; a2=0; for j=(ll(cnl-1)+1)+cnl*(li-1):(ll(cnl-1))+cnl*li ind1=find(MV{j}(1,1) == 2); if ind1==1 jind=[jind;j]; a=a+1; end ind2=find(MV{j}(end,1) == 2); if ind2==1 jind2=[jind2;j]; a2=a2+1; end end if a==2 MV{jind(1)}(1,1)=5; MV{jind(2)}(1,1)=5; Fcibound=Fcibound+2; Casact=Casact+1; end if a2==2 MV{jind2(1)}(end,1)=5; MV{jind2(2)}(end,1)=5; Fcibound=Fcibound+2; Casact=Casact+1; end end end if DLdose==50 for cnl=9:14 for li=1:FUNclust(cnl) jind=[]; a=0; jind2=[]; a2=0; for j=(ll(cnl-1)+1)+(cnl-7)*(li-1):(ll(cnl-1))+(cnl-7)*li ind1=find(MV{j}(1,1) == 2); if ind1==1 jind=[jind;j]; a=a+1; end ind2=find(MV{j}(end,1) == 2); if ind2==1 jind2=[jind2;j]; a2=a2+1; end end if a==2 MV{jind(1)}(1,1)=5; MV{jind(2)}(1,1)=5; Fcibound=Fcibound+2; Casact=Casact+1; end if a2==2 MV{jind2(1)}(end,1)=5; MV{jind2(2)}(end,1)=5; Fcibound=Fcibound+2; Casact=Casact+1; end end end end end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%% CLUSTERING OPTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %ASSIGNING RATES FOR CURRENT SYSTEM CONFORMATION for j=1:d %ASSOCIATION if P(j)==1 %Prepend tail association with filament via DD kup(j)=don*Ff; krp(j)=0; knp(j)=don*Fr1; kep(j)=0; krpi(j)=0; end if A(j)==1 %Append tail association with filament via DD kua(j)=don*Ff; kra(j)=0; kna(j)=don*Fr1; kea(j)=0; krai(j)=0; end if P(j)==2 % ... with filament via DED kup(j)=aon*Ff; krp(j)=bon*Fc; knp(j)=0; kep(j)=0; krpi(j)=bon*Fcifree; end if A(j)==2 kua(j)=aon*Ff; kra(j)=bon*Fc; kna(j)=0; kea(j)=0; krai(j)=bon*Fcifree; end if P(j)==3 % ... with filament via DED1 would not work for initial setup with RIP1 origin release kup(j)=bon*Ff; krp(j)=con*Fc; knp(j)=0; kep(j)=0; krpi(j)=con*Fcifree; end if A(j)==3 % would not work for initial setup with RIP1 origin release kua(j)=bon*Ff; kra(j)=con*Fc; kna(j)=0; kea(j)=0; krai(j)=con*Fcifree; end if P(j)==4 % ... with filament via RHIM kup(j)=0; krp(j)=0; knp(j)=eon*Fr1; kep(j)=eon*Fr3; krpi(j)=0; end if A(j)==4 kua(j)=0; kra(j)=0; kna(j)=eon*Fr1; kea(j)=eon*Fr3; krai(j)=0; end if P(j)==5 % ... with filament via DED2 kup(j)=0; krp(j)=con*Fc; knp(j)=0; kep(j)=0; krpi(j)=con*Fcifree; end if A(j)==5 kua(j)=0; kra(j)=con*Fc; kna(j)=0; kea(j)=0; krai(j)=con*Fcifree; end %DISSOCIATION %%% PREPEND TAIL if MV{j}(1,1)==1 % Prepend tail First M(j) -FADD if MV{j}(1,2)==1 % Prepend tail First V(j) -via DD kdp(j)=doff; klp(j)=0; ksp(j)=0; kwp(j)=0; klpi(j)=0; elseif MV{j}(1,2)==2 % Prepend tail First V(j) -via DED kdp(j)=aoff; klp(j)=0; ksp(j)=0; kwp(j)=0; klpi(j)=0; end end if MV{j}(1,1)==2 % Prepend tail First M(j) -Casp8 if MV{j}(1,2)==3 % Prepend tail First V(j) -via DED1 kdp(j)=0; klp(j)=boff; ksp(j)=0; kwp(j)=0; klpi(j)=0; elseif MV{j}(1,2)==5 % Prepend tail First V(j) -via DED2 kdp(j)=0; klp(j)=coff; ksp(j)=0; kwp(j)=0; klpi(j)=0; end end if MV{j}(1,1)==3 % Prepend tail First M(j) -RIP1 if MV{j}(1,2)==1 % Prepend tail First V(j) -via DD kdp(j)=0; klp(j)=0; ksp(j)=doff; kwp(j)=0; klpi(j)=0; elseif MV{j}(1,2)==4 % Prepend tail First V(j) -via RHIM kdp(j)=0; klp(j)=0; ksp(j)=eoff; kwp(j)=0; klpi(j)=0; end end if MV{j}(1,1)==4 % Prepend tail First M(j) -RIP3 if MV{j}(1,2)==4 % Prepend tail First V(j) -via RHIM kdp(j)=0; klp(j)=0; ksp(j)=0; kwp(j)=eoff; klpi(j)=0; end end if MV{j}(1,1)==5 % Prepend tail First M(j) -CAI (DED1-DED2) if MV{j}(1,2)==3 % Prepend tail First V(j) -via DED1 kdp(j)=0; klp(j)=0; ksp(j)=0; kwp(j)=0; klpi(j)=boff; elseif MV{j}(1,2)==5 % Prepend tail First V(j) -via DED2 kdp(j)=0; klp(j)=0; ksp(j)=0; kwp(j)=0; klpi(j)=coff; end end %%% APPEND TAIL if MV{j}(end,1)==1 % Append tail First M(j) -FADD if MV{j}(end,2)==1 % Append tail First V(j) -via DD kda(j)=doff; kla(j)=0; ksa(j)=0; kwa(j)=0; klai(j)=0; elseif MV{j}(end,2)==2 % Append tail First V(j) -via DED kda(j)=aoff; kla(j)=0; ksa(j)=0; kwa(j)=0; klai(j)=0; end end if MV{j}(end,1)==2 % Append tail First M(j) -Casp8 if MV{j}(end,2)==3 % Append tail First V(j) -via DED1 kda(j)=0; kla(j)=boff; ksa(j)=0; kwa(j)=0; klai(j)=0; elseif MV{j}(end,2)==5 % Append tail First V(j) -via DED2 kda(j)=0; kla(j)=coff; ksa(j)=0; kwa(j)=0; klai(j)=0; end end if MV{j}(end,1)==3 % Append tail First M(j) -RIP1 if MV{j}(end,2)==1 % Append tail First V(j) -via DD kda(j)=0; kla(j)=0; ksa(j)=doff; kwa(j)=0; klai(j)=0; elseif MV{j}(end,2)==4 % Append tail First V(j) -via RHIM kda(j)=0; kla(j)=0; ksa(j)=eoff; kwa(j)=0; klai(j)=0; end end if MV{j}(end,1)==4 % Append tail First M(j) -RIP3 if MV{j}(end,2)==4 % Append tail First V(j) -via RHIM kda(j)=0; kla(j)=0; ksa(j)=0; kwa(j)=eoff; klai(j)=0; end end if MV{j}(end,1)==5 % Append tail First M(j) -CAI (DED1-DED2) if MV{j}(end,2)==3 % Append tail First V(j) -via DED1 kda(j)=0; kla(j)=0; ksa(j)=0; kwa(j)=0; klai(j)=boff; elseif MV{j}(end,2)==5 % Append tail First V(j) -via DED2 kda(j)=0; kla(j)=0; ksa(j)=0; kwa(j)=0; klai(j)=coff; end end end %UPDATE RATES MATRIX GG %Association GG(:,1)=kup; GG(:,2)=kua; GG(:,3)=krp; GG(:,4)=kra; GG(:,5)=knp; GG(:,6)=kna; GG(:,7)=kep; GG(:,8)=kea; GG(:,9)=krpi; GG(:,10)=krai; %Dissociation GG(:,11)=kdp; GG(:,12)=kda; GG(:,13)=klp; GG(:,14)=kla; GG(:,15)=ksp; GG(:,16)=ksa; GG(:,17)=kwp; GG(:,18)=kwa; GG(:,19)=klpi; GG(:,20)=klai; %Monte Carlo Algorithm poss=cat(1,kup,kua,krp,kra,knp,kna,kep,kea,krpi,krai,kdp,kda,klp,kla,ksp,ksa,kwp,kwa,klpi,klai); po=cumsum(poss/sum(poss)); r1=rand; dt=-log(r1)/sum(poss); r2=rand; %UPDATE SYSTEM ACCORDING TO RANDOMLY CHOSEN REACTION: % % FADD binding %kup if r2 >= 0 && r2 < po(1) if P(1)==1 MV{1}=[[1 1];MV{1}]; P(1)=2; Ff=Ff-1; elseif P(1)==2 MV{1}=[[1 2];MV{1}]; P(1)=1; Ff=Ff-1; end end for i=1:(d-1) if r2 >= po(i) && r2 < po(i+1) if P(i+1)==1 MV{i+1}=[[1 1];MV{i+1}]; P(i+1)=2; Ff=Ff-1; elseif P(i+1)==2 MV{i+1}=[[1 2];MV{i+1}]; P(i+1)=1; Ff=Ff-1; end end end for i=1:d %kua if r2 >= po(i-1+d*1) && r2 < po(i+d*1) if A(i)==1 MV{i}=[MV{i};[1 1]]; A(i)=2; Ff=Ff-1; elseif A(i)==2 MV{i}=[MV{i};[1 2]]; A(i)=1; Ff=Ff-1; end end % % Casp8 binding %krp if r2 >= po(i-1+d*2) && r2 < po(i+d*2) if P(i)==2 MV{i}=[[2 3];MV{i}]; P(i)=5; Fc=Fc-1; elseif P(i)==5 MV{i}=[[2 3];MV{i}]; P(i)=5; Fc=Fc-1; end end %kra if r2 >= po(i-1+d*3) && r2 < po(i+d*3) if A(i)==2 MV{i}=[MV{i};[2 3]]; A(i)=5; Fc=Fc-1; elseif A(i)==5 MV{i}=[MV{i};[2 3]]; A(i)=5; Fc=Fc-1; end end % % RIP1 binding %knp if r2 >= po(i-1+d*4) && r2 < po(i+d*4) if P(i)==1 MV{i}=[[3 1];MV{i}]; P(i)=4; Fr1=Fr1-1; elseif P(i)==4 MV{i}=[[3 4];MV{i}]; P(i)=1; Fr1=Fr1-1; end end %kna if r2 >= po(i-1+d*5) && r2 < po(i+d*5) if A(i)==1 MV{i}=[MV{i};[3 1]]; A(i)=4; Fr1=Fr1-1; elseif A(i)==4 MV{i}=[MV{i};[3 4]]; A(i)=1; Fr1=Fr1-1; end end % % RIP3 binding %kep if r2 >= po(i-1+d*6) && r2 < po(i+d*6) if P(i)==4 MV{i}=[[4 4];MV{i}]; P(i)=4; Fr3=Fr3-1; end end %kea if r2 >= po(i-1+d*7) && r2 < po(i+d*7) if A(i)==4 MV{i}=[MV{i};[4 4]]; A(i)=4; Fr3=Fr3-1; end end % % CAI binding (DED1-DED2) %krpi if r2 >= po(i-1+d*8) && r2 < po(i+d*8) if P(i)==2 MV{i}=[[5 3];MV{i}]; P(i)=5; Fcifree=Fcifree-1; Fcibound=Fcibound+1; elseif P(i)==5 MV{i}=[[5 3];MV{i}]; P(i)=5; Fcifree=Fcifree-1; Fcibound=Fcibound+1; end end %krai if r2 >= po(i-1+d*9) && r2 < po(i+d*9) if A(i)==2 MV{i}=[MV{i};[5 3]]; A(i)=5; Fcifree=Fcifree-1; Fcibound=Fcibound+1; elseif A(i)==5 MV{i}=[MV{i};[5 3]]; A(i)=5; Fcifree=Fcifree-1; Fcibound=Fcibound+1; end end % % FADD dissociation %kdp if r2 >= po(i-1+d*10) && r2 < po(i+d*10) if MV{i}(1,1)==1 if MV{i}(1,2)==1 MV{i}(1,:)=[]; P(i)=1; Ff=Ff+1; elseif MV{i}(1,2)==2 MV{i}(1,:)=[]; P(i)=2; Ff=Ff+1; end end end %kda if r2 >= po(i-1+d*11) && r2 < po(i+d*11) if MV{i}(end,1)==1 if MV{i}(end,2)==1 MV{i}(end,:)=[]; A(i)=1; Ff=Ff+1; elseif MV{i}(end,2)==2 MV{i}(end,:)=[]; A(i)=2; Ff=Ff+1; end end end % % Casp8 dissociation %klp if r2 >= po(i-1+d*12) && r2 < po(i+d*12) if MV{i}(1,1)==2 if MV{i}(1,2)==3 MV{i}(1,:)=[]; P(i)=5; Fc=Fc+1; end end end %kla if r2 >= po(i-1+d*13) && r2 < po(i+d*13) if MV{i}(end,1)==2 if MV{i}(end,2)==3 MV{i}(end,:)=[]; A(i)=5; Fc=Fc+1; end end end % % RIP1 dissociation %ksp if r2 >= po(i-1+d*14) && r2 < po(i+d*14) if MV{i}(1,1)==3 if MV{i}(1,2)==1 MV{i}(1,:)=[]; P(i)=1; Fr1=Fr1+1; elseif MV{i}(1,2)==4 MV{i}(1,:)=[]; P(i)=4; Fr1=Fr1+1; end end end %ksa if r2 >= po(i-1+d*15) && r2 < po(i+d*15) if MV{i}(end,1)==3 if MV{i}(end,2)==1 MV{i}(end,:)=[]; A(i)=1; Fr1=Fr1+1; elseif MV{i}(end,2)==4 MV{i}(end,:)=[]; A(i)=4; Fr1=Fr1+1; end end end % % RIP3 dissociation %kwp if r2 >= po(i-1+d*16) && r2 < po(i+d*16) if MV{i}(1,1)==4 if MV{i}(1,2)==4 MV{i}(1,:)=[]; P(i)=4; Fr3=Fr3+1; end end end %kwa if r2 >= po(i-1+d*17) && r2 < po(i+d*17) if MV{i}(end,1)==4 if MV{i}(end,2)==4 MV{i}(end,:)=[]; A(i)=4; Fr3=Fr3+1; end end end % % CAI dissociation (DED1-DED2) %klpi if r2 >= po(i-1+d*18) && r2 < po(i+d*18) if MV{i}(1,1)==5 if MV{i}(1,2)==3 MV{i}(1,:)=[]; P(i)=5; Fcifree=Fcifree+1; Fcibound=Fcibound-1; end end end %klai if r2 >= po(i-1+d*19) && r2 < po(i+d*19) if MV{i}(end,1)==5 if MV{i}(end,2)==3 MV{i}(end,:)=[]; A(i)=5; Fcifree=Fcifree+1; Fcibound=Fcibound-1; end end end end tn = ta + dt; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ODE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% y(end,1)=Casact; %amount of active caspase8 dimer proCas8bound=proCas8-Fc-Fcibound-Fcifree; tspan = [ta ta+dt]; y0 = [y(end,1) y(end,2) y(end,3) y(end,4) y(end,5) y(end,6)]; [t,y] = ode15s(@(t,y) odefcn2(t,y,proCas8,proCas8bound,proCas3,proCas6,XIAP,keffc8c3,keffc3c6,keffc6c8,keffc3c3,kdon,kdoff,kxiapon,kxiapoff,kcat), tspan, y0); Casact=y(end,1); %amount of active caspase8 dimer update Fcifree=2*y(end,1)+y(end,4)-Fcibound; %amount of free inactivated Casp8 (CAI) update Fc=proCas8-proCas8bound-Fcifree-Fcibound; %amount of free proCasp8 update %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ta=tn; ti=tn; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OUTPUT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% for wi=0:tmax/tstep if tiold<=wi*tstep && ti>=wi*tstep % RIP1 and RIP3 together in filament, total number over all filaments R1R3=0; for j=1:d k=find(MV{j}(:,1)==4); kz=size(k,1); for kk=1:size(k,1) if k(kk)~=size(MV{j},1) && MV{j}(k(kk)+1,1)==3 R1R3=R1R3+1; end if k(kk)~=1 && MV{j}(k(kk)-1,1)==3 R1R3=R1R3+1; end end end TF{1}=[TF{1},Ff]; TF{2}=[TF{2},Fc]; TF{3}=[TF{3},Fr1]; TF{4}=[TF{4},Fr3]; TF{5}=[TF{5},Casact];% Casp8* dimer TF{6}=[TF{6},Fcifree]; TF{7}=[TF{7},Fcibound]; TF{8}=[TF{8},R1R3]; % RIP1 and RIP3 together in filament, total number over all filaments TF{9}=[TF{9},y(end,2)];% Casp3* monomer TF{10}=[TF{10},y(end,3)];% Casp6* monomer TF{11}=[TF{11},y(end,4)];% Cs8 monomer TF{12}=[TF{12},y(end,5)];% [Casp3*:XIAP] TF{13}=[TF{13},y(end,6)];% Casp3*ub TF{14}=[TF{14},wi]; %time for j=1:d MVfollow{j,wi+1}=MV{j}; end end end %%%%%%%%%%%%%%%%%%%%%%%%%%%% OUTPUT.....END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% end end % % % % % % % % % % % % % TIME LOOP.....END % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % save(FileNameMV,'MV') save(FileNameMVfollow,'MVfollow') save(FileNameTF,'TF') end %%%PLOT%%% % % % % % % % % % % % % % % % % % % % % % set(0,'defaultFigureColor',[1 1 1]) set(0, 'DefaultFigureRenderer', 'painters'); % % % % % % % % % % % % % % % % % % % % % keff=1.03466E-04; QQ = 2.61E-03*1; %threshold rate of FRET probe cleavage f1 = figure('Units','inches','Position',[0 0 4 4],'PaperPositionMode','auto'); for kkk=1 % show cell number ... load(['TFfb',num2str(kkk),'.mat']); semilogy(TF{14},TF{5},TF{14},TF{9},TF{14},TF{10},TF{14},TF{11},TF{14},TF{12},TF{14},TF{13}) legend('Casp8* dimer','Casp3* monomer','Casp6* monomer','Cs8 cleaved monomer','Casp3*:XIAP','Casp3*ub') xlabel('Time, min') ylabel ('Molecules per cell, #') set(gca,'XLim',[0 tmax],'YLim',[0.01 1000000],'Units','normalized','FontUnits','points','FontWeight','normal','FontSize',12); hold on end hold off f2 = figure('Units','inches','Position',[0 0 4 4],'PaperPositionMode','auto'); for kkk=1 % show cells numbers [1,2,3] load(['TFfb',num2str(kkk),'.mat']); y7=1-exp(-keff.*cumsum(TF{5})); lin=keff*TF{5}.*(1-y7); linb = find(lin > QQ); sz=size(linb); if sz(end)==0 lin=lin; axesTF=TF{14}; else lin=lin(1:(linb(1))); axesTF=TF{14}(1:(linb(1))); end plot(axesTF,lin,'-') set(gca,'XLim',[0 tmax],'YLim',[0 0.005],'Units','normalized','FontUnits','points','FontWeight','normal','FontSize',12); xlabel('Time, min') ylabel ('Rate of FRET probe cleavage, a.u.') axis square hold on end hold off function dydt = odefcn2(t,y,proCas8,proCas8bound,proCas3,proCas6,XIAP,keffc8c3,keffc3c6,keffc6c8,keffc3c3,kdon,kdoff,kxiapon,kxiapoff,kcat) dydt = zeros(6,1); dydt(1) = kdon*(y(4))^2 - kdoff*y(1); dydt(2) = (keffc8c3*y(1) + keffc3c3*(y(2)^2))*(proCas3-y(2)-y(5)-y(6))-kxiapon*y(2)*(XIAP-y(5))+kxiapoff*y(5); dydt(3) = keffc3c6*(y(2)^2)*(proCas6-y(3)); dydt(4) = keffc6c8*(y(3)^2)*(proCas8-2*y(1)-y(4)-proCas8bound) + 2*kdoff*y(1) - 2*kdon*(y(4))^2; dydt(5) = kxiapon*y(2)*(XIAP-y(5))-y(5)*(kxiapoff+kcat); dydt(6) = kcat*y(5); end