马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
%#####Optimal Experimental Design based on the Fisher Information Matrix####
%#####The NF-kB model with 24 states and 64 parameters######################
clc;
close all;
clear all;
format long;
parameters_hoff; % parametrization of ODE's and simulation times
IKK_normal=0.9; %the initial concentration of IKK
para=[3 4 5]; %the id of parameters analysed
for k=1:100
Y01(1)=IKK_normal*k/10;
IKK(k)=Y01(1);
tspan=[t0:tau:t0+tw];
[T,Y]=ode15s(@model_hoff,tspan,Y01,[],par,Source);
%%The local sensitivity analysis method is used to gain the absolute sensitivity matrix
error=10;%input gain value[0-100]
disp('please wait......')
abso_s=[]; %the absolute sensitivity matrix
%%the local sensitivity analysis using the infite difference method%%%%%%%%
for j=1:length(para)
i=para(j);
%parameter i is decreased with error%
par(i,1)=par(i,1)*(1-error/100);
%############ IKK on ####################################
[T1,Y1]=ode15s(@model_hoff,tspan,Y01,[],par,Source);
%parameter i is returned to its original value
par(i,1)=par(i,1)/(1-error/100);
%parameter i is increased with 1error%
par(i,1)=par(i,1)*(1+error/100);
%############ IKK on ####################################
[T2,Y2]=ode15s(@model_hoff,tspan,Y01,[],par,Source);
%parameter i is returned to its original value
par(i,1)=par(i,1)/(1+error/100);
%the absolute sensitivity S(i,j)=[x(p+error%*p)-x(p-error%*p)]/(2*error%*p)
S=(Y2-Y1)/(2*par(i,1)*error/100);
abso_s=[abso_s S(:,9)]; %the absolute sensitivity matrix of the system output states x9 w.r.t the i-th parameter
end
relative_error=0.05; %the relative error of the measure value
absolute_error=0.001; %the absolute error of the measure value
cova_v=[]; %the error covariance matrix
v=[]; %the diagnoal elements of the error covariance matrix
for j=9
for i=1:max(size(Y))
sigma(:,i)=relative_error*Y(i,j)+absolute_error;
end
v=[v sigma];
end
cova_v=diag(v.^2);
%the Fisher information matrix FIM
FIM=abso_s'*inv(cova_v)*abso_s;
[vec,lam]=eig(FIM); %to calculate the eigenvalue of FIM
for j=1:length(para)
lambda(j)=lam(j,j); %the eigenvalue lamda of FIM
end
%Optimal experimental design w.r.t initial value of IKK
oed_a(k)=trace(inv(FIM)); %A-optimal criterion
oed_d(k)=det(FIM); %D-optimal criterion
oed_e(k)=min(lambda); %E-optimal criterion
oed_me(k)=max(lambda)/min(lambda); %Modified E-optimal criterion
end
%################# PLOTTING ###############################
figure
plot(IKK,oed_a,'r-');
hold on;
[a,b]=min(oed_a);
IKK1=b/10*IKK_normal*ones(size(oed_a));
plot(IKK1,oed_a,'b--');
text(0.1,2e-3,['IKK=' num2str(b/10*IKK_normal) '\muM']);
xlabel('Initial concentration of IKK (\muM)');
ylabel('Trace(FIM^-^1)');
legend('A-optimal criterion');
figure
plot(IKK,oed_d,'r-');
hold on;
[a,b]=max(oed_d);
IKK1=b/10*IKK_normal*ones(size(oed_d));
plot(IKK1,oed_d,'b--');
text(0.1,10e25,['IKK=' num2str(b/10*IKK_normal) '\muM']);
xlabel('Initial concentration of IKK (\muM)');
ylabel('Det(FIM)');
legend('D-optimal criterion');
figure
plot(IKK,oed_e,'r-');
hold on;
[a,b]=max(oed_e);
IKK1=b/10*IKK_normal*ones(size(oed_e));
plot(IKK1,oed_e,'b--');
text(0.1,5e6,['IKK=' num2str(b/10*IKK_normal) '\muM']);
xlabel('Initial concentration of IKK (\muM)');
ylabel('\lambda_m_i_n(FIM)');
legend('E-optimal criterion');
figure
plot(IKK,oed_me,'r-');
hold on;
[a,b]=min(oed_me);
IKK1=b/10*IKK_normal*ones(size(oed_me));
plot(IKK1,oed_me,'b--');
text(0.1,8e5,['IKK=' num2str(b/10*IKK_normal) '\muM']);
xlabel('Initial concentration of IKK (\muM)');
ylabel('\lambda_m_a_x(FIM)/\lambda_m_i_n(FIM)');
legend('modified E-optimal criterion');
%######################################################################################################
%######################################################################################################
另外
parameter_hoff
%######################################################################################################
%######################################################################################################
num=600; %the number of sampling
%############## Simulation time points ##################################
t0=0; %time when IKK is being introduced into the system
tw=6000; %length of IKK stimulation
tau=(tw-t0)/num; %defines the period (in seconds) in between to successive data points
%############### Initial condition for total NF-kB ######################
y0=zeros(1,10); %Initial condition set to zero for each reaction participant
NF=0.9;
EF=1.5e-5;
SF=0.8;
y0(8)=NF; %NF-kB is given in cytoplasm
y0(1)=1.5e-5;
y0(6)=0.8;
Source=1;
%############### Parametrization for system of ODE's ####################
par=zeros(11,1);
par(1,1)=100000;
par(2,1)=1000;
par(3,1)=100;
par(4,1)=10000;
par(5,1)=50000;
par(6,1)=200;
par(7,1)=1000;
par(8,1)=20000;
par(9,1)=5000;
par(10,1)=100;
par(11,1)=500;
%######################################################################################################
%######################################################################################################
model_hoff
%######################################################################################################
function dy=model_hoff(t,y,par,Source)
dy=zeros(10,1);
par(1,1) = 100000;
par(2,1) = 1000;
par(3,1) = 100;
par(4,1) = 10000;
par(5,1) = 50000;
par(6,1) = 200;
par(7,1) = 1000;
par(8,1) = 20000;
par(9,1) = 5000;
par(10,1) = 100;
par(11,1) = 500;
dy(1)=-par(1,1)*y(1)*y(6)+par(2,1)*y(2)+par(7,1)*y(4)-par(8,1)*y(1)*y(9)+par(11,1)*y(5);
dy(2)=par(1,1)*y(1)*y(6) - par(2,1)*y(2) - par(3,1)*y(2) + par(4,1)*y(3)*y(7);
dy(3)=par(3,1)*y(2) - par(4,1)*y(3)*y(7) - par(5,1)*y(3)*y(8) + par(6,1)*y(4) - par(9,1)*y(3) + par(10,1)*y(5);
dy(4)=par(5,1)*y(3)*y(8) - par(6,1)*y(4) - par(7,1)*y(4) + par(8,1)*y(1)*y(9);
dy(5)=par(9,1)*y(3) - par(10,1)*y(5) - par(11,1)*y(5);
dy(6)=-par(1,1)*y(1)*y(6) + par(2,1)*y(2);
dy(7)=par(3,1)*y(2) - par(4,1)*y(3)*y(7);
dy(8)=-par(5,1)*y(3)*y(8) + par(6,1)*y(4);
dy(9)=par(7,1)*y(4) - par(8,1)*y(1)*y(9);
dy(10)=par(11,1)*y(5);
%######################################################################################################
%######################################################################################################
怎么错了? 希望帮下忙
谢谢!!! |