From df6636f7e073573322a5e6934847861b27d73bbe Mon Sep 17 00:00:00 2001 From: "Cody, Jonathan William" Date: Mon, 15 May 2023 10:23:32 -0500 Subject: [PATCH] Delete N803_plotter_2_parameters.m --- N803_plotter_2_parameters.m | 114 ------------------------------------ 1 file changed, 114 deletions(-) delete mode 100644 N803_plotter_2_parameters.m diff --git a/N803_plotter_2_parameters.m b/N803_plotter_2_parameters.m deleted file mode 100644 index 09b8e09..0000000 --- a/N803_plotter_2_parameters.m +++ /dev/null @@ -1,114 +0,0 @@ -% N803_parameters.m - makes violin plots of parameter distributions - -close all -clear all %#ok -addpath Analyzer -addpath Data - -load('N803_MCMC','C') - -%% Model Parameters ======================================================= - -% Retrieving parameter boundaries ----------------------------------------- -warning off ; load('N803_shared_Results','Results') ; warning on -% q vS vN h pS pN d dA C50 aS1 aN1 dR p2 gN2 -id1 = [ 7 9 10 13 15 16 17 18 23 25 26 27 29 30 ] ; -id2 = [ 1 4 5 10 12 13 14 15 16 18 19 22 25 24 ] ; -Bounds = NaN*ones(2,27) ; -Bounds(:,id2) = Results(1).setup.GuessBOUNDS(:,id1) ; -Bounds(:,4:5) = Bounds(:,4:5)/1000 ;% converting vS,vN to [#/uL] - -% Plotting shared parameters ---------------------------------------------- -PARS = C(1).ParSample(:,[1:15,20:31]) ;% parameter sample -Size = [6.5 3] ;% figure size -figName = 'Fig S1 Parameters' ; - -f = figure('Name', figName, ... - 'Color', [1 1 1], ... - 'PaperUnits', 'Inches', ... - 'PaperSize', Size, ... - 'Units', 'Inches', ... - 'Position', [0 0 Size]) ; - -Names = {'q','g_S','g_N','V_{50,S}','V_{50,N}','a_S','a_N','m_S','m_N',... - 'H','p','p_S','p_N','d','d_A','C_{50}','\rho','\alpha_S','\alpha_N',... - 's_S','s_N','d_R','\lambda_S','\lambda_N','\phi','\zeta_S','\zeta_N'} ; - -parplotter(PARS, ... - 'AxesLims', [0 28 -3 4],... - 'AxesPos', [.075 .2 .9 .75],... - 'Bounds', Bounds,... - 'Factors', [1 1e3 1e3 ones(1,24)],...converting gS0,gN0 to [nL/#-d] - 'figHand', f,... - 'logScale', 1,... - 'Names', Names,... - 'ViolColor', [.5 .5 .5]) ; - -set(gca,'FontSize',10,'FontName','Arial','LineWidth',1,'XTickLabelRotation',315) -set(gcf,'InvertHardcopy','off') -print(figName,'-dtiff','-r300') - -%% Sampled Parameter Convolutions ========================================= -PARS = C(1).ParSample(:,1:31) ;% parameter sample - -% Calculating sampled parameter convolutions ------------------------------ -YIC1 = C(1).ParSample(:,32:end) ;% initial conditions -YIC2 = C(2).ParSample(:,32:end) ;% initial conditions -SN1 = sum( YIC1(:,2:13),2 ) ;% initial: S+N (co 1) -SN2 = sum( YIC2(:,2:13),2 ) ;% initial: S+N (co 2) -R1 = YIC1(:,end) ;% initial R (co 1) -R2 = YIC2(:,end) ;% initial R (co 2) -mS = PARS(:,08) ;% Sa reversion rate constant [/d] -mN = PARS(:,09) ;% Na reversion rate constant [/d] -h = PARS(:,10) ;% 50% S+N proliferation saturation [#/uL] -p0 = PARS(:,11) ;% S0/N0 proliferation rate constant [/d] -pS = PARS(:,12) ;% Sa proliferation rate constant [/d] -pN = PARS(:,13) ;% Na proliferation rate constant [/d] -d = PARS(:,14) ;% S0/N0 death rate constant [/d] -dA = PARS(:,15) ;% Sa/Na death rate constant [/d] -p1 = PARS(:,21) ;% S0/N0 proliferation stimulation factor [] -p2 = PARS(:,29) ;% S0/N0 proliferation regulation factor [] - -psi = PARS(:,03)./PARS(:,02) ;% gN0/gS0 -sig = PARS(:,25)./PARS(:,24) ;% sN/sS -fS1 = sum( YIC1(:,2:10),2 ) ./ SN1 ;% initial: S/(S+N) (co 1) -fS2 = sum( YIC2(:,2:10),2 ) ./ SN2 ;% initial: S/(S+N) (co 2) -fSn = (fS2-fS1)./ (.3-fS1) ;% normalized initial S/(S+N) (co 2) -US = 2*(2*pS./(pS+dA)).^7 ; -UN = 2* 2*pN./(pN+dA) ; -mSn = mS.*(US-1)./dA ;% normalized Sa reversion rate constant [] -mNn = mN.*(UN-1)./dA ;% normalized Na reversion rate constant [] -p0_max1 = d.*(1+p2.*R1).*(h+SN1)./h ; -p0_max2 = d.*(1+p2.*R2).*(h+SN2)./h ; -p0_max = min( [p0_max1 p0_max2],[],2 ) ; -p0n = p0./ p0_max ;% nomalized S0/N0 proliferation rate constant [/d] -pm = p1.*p0 ;% S0/N0 maximum proliferation rate [] - -% Plotting sampled parameter convolutions --------------------------------- -PARCONS = [ fS1 fSn psi mSn mNn p0n pm sig ] ; -id1 = [ 05 06 08 11 12 14 24 28 ] ; -Bounds = Results(1).setup.GuessBOUNDS(:,id1) ; -Size = [3 3*5/7] ;% figure size -figName = 'Fig S2 Convolutions' ;% figure name - -Names = {'f_S','\xi_S','g_N/g_S','\mu_S','\mu_N','\psi','p\cdot\rho','s_N/s_S'} ; - -f = figure('Name', figName, ... - 'Color', [1 1 1], ... - 'PaperUnits', 'Inches', ... - 'PaperSize', Size, ... - 'Units', 'Inches', ... - 'Position', [0 0 Size]) ; - -parplotter(PARCONS,... - 'AxesLims', [0 9 -2 2],... - 'AxesPos', [.2 .25 .75 .7],... - 'Bounds', Bounds,... - 'figHand', f,... - 'logScale', 1,... - 'Names', Names,... - 'ViolColor', [.5 .5 .5]) ; - -set(gca,'FontSize',10,'FontName','Arial','LineWidth',1,'XTickLabelRotation',315) -set(gcf,'InvertHardcopy','off') -print(figName,'-dtiff','-r300')