Vous êtes sur la page 1sur 6

function rm19m

clear; clg;

% Program de simulare dinamica modele de reglare


% homeostatica proteina P (denumite RM1-RM9;
% Sewell et al., 2002; Maria, 2003)
% (c) G. Maria, 2003

% Notatii:
% n= nr. incremente de integrare
% m= nr. variabile independente (x)
% r= nr. observatii (y)
% p= nr. constante cinetice (k)
% model = index model (1=RM1; 2=RM2; ... ; 9=RM9)
% k = [p,1] vector constante cinetice
% x = [n,m] matrice variabile independente (x)
% (timp de reactie, temperatura, etc.)
% y = [n,r] matrice observatii (y)
% (concentratii specii)

global model n m r p P0 G0 k ky Gtot

% alegere index model


clc; clg;
while 1
clc
disp(' ')
disp(' KINETIC MODEL BANK - HOMEOSTATIC PROTEIN REGULATORY MECHANISMS')
disp(' ')
disp(' Gheorghe Maria, Oct. 2001')
disp(' ')
disp(' ')
disp(' 1. RM1 - unregulated mechanism (species: P,G)')
disp(' 2. RM2 - basic negative feedback (species: P,G,GP1)')
disp(' 3. RM3 - multiple binding feedback (species: P,G,GP1,GP2)')
disp(' 4. RM4 - boolean negative feedback (species: P,G,GP1)')
disp(' 5. RM5 - dimerization (species: P,G,GP2,P2)')
disp(' 6. RM6 - two dimer binding (species: P,G,GP2,GP4,P2)')
disp(' 7. RM7 - transcription/translation cascade (species: P,G,GP1,M)')
disp(' 8. RM8 - transcription/translation feedback (species: P,G,GP1,M,MP1)')
disp(' 9. RM9 - degradation negative feedback (species: P,G,GP1)')
disp(' ')
model=input('Selecteaza indexul modelului =');
if model>=1 & model<=9
break, end
end; % while 1

%input date initiale


n=2000; m=1; r=8; p=21;
tmax=1000; % timp maxim de integrare (min)
x=linspace(0,tmax,n); % domeniul de timp [tmin, tmax, nr. incremente]
Gtot=1; % conc. totala gena (nM)(forma active si inactive)
% ciclu de simulare a 4 traiectorii de revenire la starea stationara
for norun=1:4

% setare concentratii initiale perturbate (indice '0')(nM)


if model==1 | model==3
if norun==1 P0=1800; G0=1; GP10=0; GP20=0; GP40=0; end;
if norun==2 P0=1100; G0=1; GP10=0; GP20=0; GP40=0; end;
if norun==3 P0= 600; G0=1; GP10=0; GP20=0; GP40=0; end;
if norun==4 P0=1500; G0=1; GP10=0; GP20=0; GP40=0; end;
end;
if model==2 | model==4 | model==7 | model==8 | model==9
if norun==1 P0=1100; G0=0.5; GP10=0.5; GP20=0; GP40=0; end;
if norun==2 P0=1100; G0=0.6; GP10=0.4; GP20=0; GP40=0; end;
if norun==3 P0= 600; G0=0.8; GP10=0.2; GP20=0; GP40=0; end;
if norun==4 P0=1500; G0=0.4; GP10=0.6; GP20=0; GP40=0; end;
end
if model==5
if norun==1 P0=1100; G0=0.5; GP10=0; GP20=0.5; GP40=0; end;
if norun==2 P0=1100; G0=0.6; GP10=0.0; GP20=0.4; GP40=0; end;
if norun==3 P0= 600; G0=0.8; GP10=0.0; GP20=0.2; GP40=0; end;
if norun==4 P0=1500; G0=0.4; GP10=0.0; GP20=0.6; GP40=0; end;
end;
if model==6
if norun==1 P0=1100; G0=0.5; GP10=0; GP20=0.5; GP40=0; end;
if norun==2 P0=1100; G0=0.6; GP10=0; GP20=0.2; GP40=0.2; end;
if norun==3 P0= 600; G0=0.8; GP10=0; GP20=0.1; GP40=0.1; end;
if norun==4 P0=1500; G0=0.4; GP10=0; GP20=0.3; GP40=0.3; end;
end
y(1,1:r)=[P0, G0, GP10, GP20, GP40, zeros(1,r-5)]; % initial species concentrations
% end inputs

% integrare model cinetic ODE pentru a obtine trajectoriile


% ym[n,r] de revenire la stationaritate
options=odeset('Abstol',ones(1,r)*1e-16);
[tm,ym]=ode15s('rm19mf',x,y(1,1:r),options);

disp(' ')
disp('constante cinetice k1=k21 si apartenenta lor la modelul selectat (0=NU, 1=DA)')
for i=1:p
fprintf('k(%2.0f)= %11.4e ; aparteneta= %2.0f',i,k(i),ky(i))
fprintf('\n');
end

disp('Curbe de concentratie simulate:')


disp('time(min) [P, G, GP1, GP2, GP4, M, MP1, P2] (nM)')
nn=max(size(tm));
for i=1:round(nn/10):nn
fprintf('t=%5.1f C(nM)=',tm(i));
fprintf(' %11.4e ',ym(i,1:r));
fprintf('\n');
end

disp(' ')
figure(1)
o=200; % increment maxim de timp in reprezentari grafice
if model==1 semilogy(tm(1:o),ym(1:o,1),'r-',tm(1:o),ym(1:o,2),'b-'); end;
if model==2 semilogy(tm(1:o),ym(1:o,1),'r-',tm(1:o),ym(1:o,2),'b-',tm(1:o),ym(1:o,3),'g-'); end;
if model==3 semilogy(tm(1:o),ym(1:o,1),'r-',tm(1:o),ym(1:o,2),'b-',tm(1:o),ym(1:o,3),'g-',...
tm(1:o),ym(1:o,4),'g--'); end;
if model==4 semilogy(tm(1:o),ym(1:o,1),'r-',tm(1:o),ym(1:o,2),'b-',tm(1:o),ym(1:o,3),'g-'); end;
if model==5 semilogy(tm(1:o),ym(1:o,1),'r-',tm(1:o),ym(1:o,2),'b-',tm(1:o),ym(1:o,4),'g--',...
tm(1:o),ym(1:o,8),'r:'); end;
if model==6 semilogy(tm(1:o),ym(1:o,1),'r-',tm(1:o),ym(1:o,2),'b-',tm(1:o),ym(1:o,4),'g--',...
tm(1:o),ym(1:o,5),'g-.',tm(1:o),ym(1:o,8),'r:'); end;
if model==7 semilogy(tm(1:o),ym(1:o,1),'r-',tm(1:o),ym(1:o,2),'b-',tm(1:o),ym(1:o,3),'g-',...
tm(1:o),ym(1:o,6),'c-'); end;
if model==8 semilogy(tm(1:o),ym(1:o,1),'r-',tm(1:o),ym(1:o,2),'b-',tm(1:o),ym(1:o,3),'g-',...
tm(1:o),ym(1:o,6),'c-',tm(1:o),ym(1:o,7),'c:'); end;
if model==9 semilogy(tm(1:o),ym(1:o,1),'r-',tm(1:o),ym(1:o,2),'b-',tm(1:o),ym(1:o,3),'g-'); end;

title(['Model RM',num2str(model),';P(r-);G(b-);GP1(g-);GP2(g--)(nM)'])
ylabel('GP4(g-.);M(c-);MP1(c:);P2(r:)(nM)')
xlabel('time (min)')

figure(2)
if model~=7 & model~=8
plot(ym(:,1),ym(:,2),'b-')
title(['Model RM',num2str(model)])
ylabel('G (nM)'); xlabel('P (nM)')
hold on
end

if model==7 | model==8
subplot(2,1,1), plot(ym(:,1),ym(:,2),'b-')
title(['Model RM',num2str(model)])
ylabel('G (nM)'); xlabel('P (nM)')
hold on
subplot(2,1,2), plot(ym(:,1),ym(:,6),'b-')
ylabel('M (nM)'); xlabel('P (nM)')
hold on
end
end; % for norun
return

-----------------------------------------------------------------------------
function dy=rm19mf(t,C)

% rutina evaluare derivate modele cinetice de reglare RM1-RM9


% Notatii:
% dy= vector derivate concentratii specii
% (evaluate pentru modelul curent 'model' si vectorul constantelor
% cinetice k*ky)
% k[p] = vectorul constantelor cinetice
% ky[p]= vector Boolean (0,1) ce multiplica constantele cinetice

global model n m r p P0 G0 k ky Gtot


% verifica pozitivitatea concentratiilor
for i=1:r
if C(i)<0 C(i)=1e-20; else; end;
end

% Definire constante cinetice (unitati: nM,min); k=[k1-k21]


k=zeros(1,p);
k(1)=20; k(2)=0.01; % constante Sewell et al. (2002)
if model==2
k(5)=1.9e-5;
k(6)=1.9e-2;
end;
if model==3
k(5)=2.893930420055447e-005;
k(6)=7.700027125671231e+002;
k(7)=8.779768867868089e+001;
k(8)=3.299857877326508e+000;
end;
if model==5
k(9)=1.200368201744990e-009;
k(10)=4.100000000000000e-003;
k(11)=9.690005277663438e-002;
k(12)=2.851626651073981e-002;
end;
if model==6
k(9)=1.809440589953476e-001;
k(10)=8.153184486947383e+006;
k(11)=9.990726576742958e+000;
k(12)=2.217213470261938e-001;
k(13)=4.187793042404640e+001;
k(14)=1.260769705166686e+007;
end;
if model==7
k(5)=6.800000147214092e-003;
k(6)=6.800000147213857e+000;
k(15)=9.999815887417152e-001;
k(16)=3.749807958390233e-002;
k(17)=7.499753996681847e-001;
end;
if model==8
k(5)=1.894222845320709e-001;
k(6)=1.894228097755085e+002;
k(15)=7.255655269355833e+001;
k(16)=6.100000000000000e-003;
k(17)=1.212786139443892e+003;
k(18)=5.911930497585159e+001;
k(19)=8.169338471124294e+001;
k(20)=6.568639592605040e+000;
end;
if model==9
k(5)=2.900000000000000e-005;
k(6)=2.900000000000000e-002;
k(21)=2.000000000000000e-002;
end;
k(3)=0; k(4)=0; % absenta reactiilor de perturbare sinteza/consum P

if model==1 pp=4; ky=[ones(1,pp),zeros(1,p-pp)]; end;


if model==2 pp=6; ky=[ones(1,pp),zeros(1,p-pp)]; end;
if model==3 pp=8; ky=[ones(1,8),zeros(1,p-8)]; end;
if model==4 pp=6; ky=[ones(1,pp),zeros(1,p-pp)]; end;
if model==5 ky=[ones(1,4),zeros(1,4),ones(1,4),zeros(1,p-12)];end;
if model==6 ky=[ones(1,4),zeros(1,4),ones(1,6),zeros(1,p-14)];end;
if model==7 ky=[0,ones(1,5),zeros(1,8),ones(1,3),zeros(1,p-17)];end;
if model==8 ky=[0,ones(1,5),zeros(1,8),ones(1,6),zeros(1,p-20)];end;
if model==9 ky=[1,0,1,1,1,1,zeros(1,14),ones(1,1)];end;
k=k.*ky;

% Vector concentratii [P, G, GP1, GP2, GP4, M, MP1, P2] (nM)


P=C(1); G=C(2); GP1=C(3); GP2=C(4); GP4=C(5);
M=C(6); MP1=C(7); P2=C(8);

if model==4
Psp=k(1)/2/k(2);
if P<Psp G=1; end;
if P==Psp G=0.5; end;
if P<Psp G=0; end;
end

% v= vector viteze de reactie (nM/min)


v=[k(1)*G, k(2)*P, k(3), k(4)*P, k(5)*G*P, k(6)*GP1, k(7)*GP1, ...
k(8)*GP2, k(9)*P*P, k(10)*P2, k(11)*G*P2, k(12)*GP2, ...
k(13)*GP2*P2, k(14)*GP4, k(15)*G, k(16)*M, k(17)*M, k(18)*M*P, ...
k(19)*MP1, k(20)*MP1, k(21)*P*GP1 ];
nv=max(size(v));
% vy= matrice coeficienti stoiciometrici [nr.specii x nr. reactii]
% Reactiile sunt in ordinea urmatoare:
%[k(1)*G, k(2)*P, k(3), k(4)*P, k(5)*G*P, k(6)*GP1, k(7)*GP1, k(8)*GP2, k(9)*P*P, k(10)*P2, k(11)*G*P2, k(12)*GP2, k(13)*GP2*P2, k(14)*GP4, k(15)*G, k(16)*M,
k(17)*M, k(18)*M*P, k(19)*MP1, k(20)*MP1, k(21)*P*GP1 ];
vy(1:r,1:nv)=...
[+1, -1, +1, -1, -1, +1, -1, +1, -2, +2, 0, 0, 0, 0, 0, 0, +1, -1, +1, +1, -1 ;%P
0, 0, 0, 0, -1, +1, 0, 0, 0, 0, -1, +1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;%G
0, 0, 0, 0, +1, -1, -1, +1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;%GP1
0, 0, 0, 0, 0, 0, +1, -1, 0, 0, +1, -1, -1, +1, 0, 0, 0, 0, 0, 0, 0 ;%GP2
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +1, -1, 0, 0, 0, 0, 0, 0, 0 ;%GP4
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +1, -1, 0, -1, +1, 0, 0 ;%M
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +1, -1, -1, 0 ;%MP1
0, 0, 0, 0, 0, 0, 0, 0, +1, -1, -1, +1, -1, +1, 0, 0, 0, 0, 0, 0, 0 ];%P2

%evaluare derivate concentratii


dy=zeros(1,r);
for i=1:r
dy(i)= sum( v.*vy(i,:) );
end
if model==4 dy(2)=0; end;
dy=dy';
return
------------------------------------------------------------------------------

Vous aimerez peut-être aussi