From ec3de169c65d31f4d292dc14bb16ee7a67de3809 Mon Sep 17 00:00:00 2001 From: "Cody, Jonathan William" Date: Sun, 25 Dec 2022 09:00:13 -0600 Subject: [PATCH] Delete HIV_models.m --- Legacy Code/HIV_models.m | 209 --------------------------------------- 1 file changed, 209 deletions(-) delete mode 100644 Legacy Code/HIV_models.m diff --git a/Legacy Code/HIV_models.m b/Legacy Code/HIV_models.m deleted file mode 100644 index 5d711a5..0000000 --- a/Legacy Code/HIV_models.m +++ /dev/null @@ -1,209 +0,0 @@ -%% -% /--------------------------------------------------------------\ -% | Date: 9/13/2018 | -% | Author: Jonathan Cody | -% | Affiliation: Purdue University | -% | Weldon School of Biomedical Engineering | -% | Pienaar Computational Systems Pharmacology Lab | -% \--------------------------------------------------------------/ - -% Solves host-level models for ALT-803 project - -% Nomenclature: T = target CD4+ T cell -% I = infected CD4+ T cell -% R = resting CD8+ T cell -% E = effector CD8+ T cell -% K = natural killer cell -% V = HIV/SIV virion -% C = immunomodulator ALT-803 -% Ct = IL15 tolerance pool -% Ce = IL15 effect pool -% Cy = IL15 killing inhibition pool - -%% ======================================================================== -% INPUTS -% ======================================================================== - -% t = time points at which to evaluate solution [day] (inc. initial time) -% td = dosing regimen [day] -% P = parameter vector corresponding to list below -% S = binary switch vector corresponding to parameters - -% P(1) = [X X] ;% T i.c. [/無] -% P(2) = [X X] ;% T decay rate [/d] -% P(3) = [X X] ;% T inf into I rate [無/d] -% P(4) = [X X] ;% I decay rate [/d] - -% P(5) = [X X] ;% V i.c. [log(/mL)] -% P(6) = [X X] ;% V production rate [/d] -% P(7) = [X X] ;% V decay rate [/d] -% P(8) = [X X] ;% V/I ratio [] - -% P(9) = [X X] ;% R i.c. [/無] -% P(10) = [X X] ;% R decay rate [/d] -% P(11) = [X X] ;% R act into E rate [無/d] -% P(12) = [X X] ;% E decay rate [/d] -% P(13) = [X X] ;% I death by E rate [無/d] - -% P(14) = [X X] ;% K i.c. [/無] -% P(15) = [X X] ;% K decay rate [/d] -% P(16) = [X X] ;% I death by K rate [無/d] - -% P(17) = [X X] ;% R prol by V max rate [/d] -% P(18) = [X X] ;% E prol by V max rate [/d] -% P(19) = [X X] ;% K prol by V max rate [/d] -% P(20) = [X X] ;% R prol by V half [/無] -% P(21) = [X X] ;% E prol by V half [/無] -% P(22) = [X X] ;% K prol by V half [/無] - -% P(23) = [X X] ;% R prol by C max rate [/d] -% P(24) = [X X] ;% E prol by C max rate [/d] -% P(25) = [X X] ;% K prol by C max rate [/d] -% P(26) = [X X] ;% C i.c. [nM] -% P(27) = [X X] ;% C decay rate [/d] -% P(28) = [X X] ;% C half [nM] -% P(29) = [X X] ;% C/V ratio [nM-無] - -% P(30) = [X X] ;% Ct prod max rate [/d] -% P(31) = [X X] ;% Ct decay rate [/d] -% P(32) = [X X] ;% Ct half [] - -% P(33) = [X X] ;% Ce prod max rate [/d] -% P(34) = [X X] ;% Ce decay rate [/d] -% P(35) = [X X] ;% Ce half [] - -% P(36) = [X X] ;% Cy prod max rate [/d] -% P(37) = [X X] ;% Cy decay rate [/d] -% P(38) = [X X] ;% Cy half [] - -% P(39) = [X X] ;% T*(R,E,K prol)? - -%% ======================================================================== -% OUTPUTS -% ======================================================================== - -% Ym(:,1) = V concentration at each time point in 't' [log(#/mL)] -% Ym(:,2) = T+I concentration at each time point in 't' [#/無] -% Ym(:,3) = R+E concentration at each time point in 't' [#/無] -% Ym(:,4) = K concentration at each time point in 't' [#/無] - -%% ======================================================================== -% FUNCTION -% ======================================================================== - -function YM = HIV_models(t,td,P,S) - -% If R or K parameters are off, equate to E parameters -------------------- - -if ~S(17) ; P(17) = P(18) ; end % R prol by V max rate [/d] -if ~S(20) ; S(20) = S(21) ; % switch for... - P(20) = P(21) ; end % R prol by V half [/無] -if ~S(23) ; P(23) = P(24) ; end % R prol by C max rate [/d] -if ~S(15) ; P(15) = P(12) ; end % K decay rate [/d] -if ~S(16) ; P(16) = P(13) ; end % I death by K rate [無/d] -if ~S(19) ; P(19) = P(18) ; end % K prol by V max rate [/d] -if ~S(22) ; S(22) = S(21) ; % switch for... - P(22) = P(21) ; end % K prol by V half [/無] -if ~S(25) ; P(25) = P(24) ; end % K prol by C max rate [/d] - -% Declare generation terms and initial conditions ------------------------- - -P(5) = 10.^(P(5)-3) ;% convert V to [#/無] - -sT = P(2)*P(1) ;% T generation rate -sR = P(10)*P(9) ;% R generation rate -sE = ~S(11)*P(12)*P(9) ;% E generation rate -sK = P(15)*P(14) ;% K generation rate - -I(1) = P(1) ;% T i.c. -if S(8) ; I(2) = P(5)/P(8) ;% I i.c. -else ; I(2) = 0 ; end -I(3) = S(11)*P(9) ;% R i.c. -I(4) = ~S(11)*P(9) ;% E i.c. -I(5) = P(14) ;% K i.c. -I(6) = P(5) ;% V i.c. -I(7) = 0 ;% C i.c. -I(8) = 0 ;% Ct i.c. -I(9) = 0 ;% Ce i.c. -I(10) = 0 ;% Cy i.c. - -% Solve for each treatment cycle ------------------------------------------ - -D = [1;find(ismember(t,td));length(t)] ;% index in 't' for dose -Y = zeros(length(t),10) ;% percolate output matrix - -for n = 1:length(D)-1 - - % Solve ODEs (see MATLAB help for ode15s algorithm) - [~,YTEMP] = ode15s(@system,t(D(n):D(n+1)),I) ; - - % For solutions of 2 timepoints, exclude the transition timepoints that - % ode15s adds by default - if length(t(D(n):D(n+1))) == 2 - YTEMP = [YTEMP(1,:);YTEMP(end,:)] ; - end - - Y(D(n):D(n+1),:) = YTEMP ;% add to full solution - I = [Y(D(n+1),1:6) P(26) Y(D(n+1),8:10)] ;% i.c. for next cycle -end - -% 'system' function ------------------------------------------------------- - -function dY = system(~,Y) - - dY = zeros(10,1) ;% percolate dY/dt - - if S(8) ; Y(6) = P(8)*Y(2) ; end % apply V = kI assumption - - % Generation Transition Decay - dY(1) = sT - S(2)*P(3) *Y(6)*Y(1) - P(2) *Y(1) ;% dT/dt - dY(2) = + P(3) *Y(6)*Y(1) - P(4) *Y(2) ;% dI/dt - dY(3) = sR - P(11)*Y(6)*Y(3) - P(10)*Y(3) ;% dR/dt - dY(4) = sE + P(11)*Y(6)*Y(3) - P(12)*Y(4) ;% dE/dt - dY(5) = sK - P(15)*Y(5) ;% dK/dt - dY(6) = P(6)*Y(2) - P(7) *Y(6) ;% dV/dt - dY(7) = - P(27)*Y(7) ;% dC/dt - dY(8) = P(30)*MM(28,P(29)*Y(6)+Y(7)) - P(31)*Y(8) ;% dCt/dt - dY(9) = P(33)*MM(28,P(29)*Y(6)+Y(7)) - P(34)*Y(9) ;% dCe/dt - dY(10) = P(36)*MM(28,P(29)*Y(6)+Y(7)) - P(37)*Y(10) ;% dCy/dt - - % Killing - dY(2) = dY(2) - (P(13)*Y(4)+P(16)*Y(5))*Y(2)... - * onoff(36,P(38)/(P(38)+Y(10)),1) ;% dI/dt - - % Proliferation - dY(3) = dY(3) + prol(17,20,23)*Y(3) ;% dR/dt - dY(4) = dY(4) + prol(18,21,24)*Y(4) ;% dE/dt - dY(5) = dY(5) + prol(19,22,25)*Y(5) ;% dK/dt - - function y = prol(pin,hin,rin) - y = P(rin)*onoff(33,MM(35,Y(9)),... % prol by Ce - MM(28,P(29)*Y(6)+Y(7))) ;% prol by C & V - y = y * onoff(30,P(32)/(P(32)+Y(8)),1) ;% inhibition Ct - y = y + P(pin)*MM(hin,Y(6)) ;% prol by V only - y = y * onoff(39,Y(1),1) ;% prol by T - end - - function y = MM(in,x) - y = onoff(in,x/(P(in)+x),x) ;% Michaelis-Menten eq. - end - - function y = onoff(in,A,B) - if S(in) ; y = A ; - else ; y = B ; end - end - -end - -% preparing outputs ------------------------------------------------------- - -Y = abs(Y) ;% removing negatives res無ting from numerical error - -if S(8) ; Y(:,6) = P(8)*Y(:,2) ; end % V [#/無] - -YM(:,1) = log10(Y(:,6))+3 ;% V [log(#/mL)] -YM(:,2) = Y(:,1)+Y(:,2) ;% T+I [#/無] -YM(:,3) = Y(:,3)+Y(:,4) ;% R+E [#/無] -YM(:,4) = Y(:,5) ;% K [#/無] - -end