% 2n OBJECTIVES OPTIMIZATION % This script optimize experimental data for n types of genetic circuits % n FOD objectives + n OD objectives clear all % Experiment directory = 'C:\Users\Usuario\Documents\Carlos AV\UPV\iGEM\Modelling\Experimentos\Experiment6_GFP_pITU6_20_21_2n\'; fname = 'Exp6_GFP_data.mat'; % Generate spMODEparam for optimization run([directory 'spMODEparam_exp6GFP']); % Optimization OUT = spMODE(spMODEDat); % Pareto solutions diagrams levelDiagram(OUT.PFront,OUT.PSet) %% % Decision making of p, dp and mu values Crl = input('Cr value for low promoter: '); Crm = input('Cr value for medium promoter: '); Crs = input('Cr value for strong promoter: '); dp = input('dp value: '); mul = input('mu value for low colony: '); mum = input('mu value for medium colony: '); mus = input('mu value for strong colony: '); cn = 500; Cr = cn*[Crl Crs Crm];%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% mu = [mul mus mum];%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Other parameters p = 2.4; % min-1 dm = 0.247; % min-1 Vculture = 200; % uL Ccells_OD600_1 = 8e5; % cells/uL when OD = 1 % Kmax_exp = max(max(spMODEDat.DataOD,[],1)); % OD % Kmax = Vculture*Kmax_exp*Ccells_OD600_1; % cells Kmax_exp = max(max(spMODEDat.DataOD,[],1)); % OD Kmax = Vculture*Kmax_exp*Ccells_OD600_1; % cells OD_0 = min(min(spMODEDat.DataOD,[],1)); % OD Ncells_0 = Vculture*OD_0*Ccells_OD600_1; % cells VAL_per_obj = length(indexes_VAL)/(spMODEDat.NOBJ/2); % Colors blue = [68 146 198]/255; red = [246 80 88]/255; yellow = [255 198 0]/255; color = [blue; red; yellow]; k = 1; fig = figure('Color','w'); for i=1:length(Cr) param = [Cr(i) p dm dp mu(i) Kmax]; % Initial conditions PoI_0 = mean(spMODEDat.DataXFP_per_cell_VAL(1,k:(k+VAL_per_obj-1))); n0 = [Cr(i)/(dm+mu(i)) PoI_0 Ncells_0]; % ODE options options = odeset('RelTol',1e-6,'Stats','off','Abstol',1e-6); % Model simulation [t,n]=ode45(@mc_simple,spMODEDat.DataTime,n0,options,param); % Graphs XFP = n(:,2); N = n(:,3); data_XFP_VAL = spMODEDat.DataXFP_per_cell_VAL(:,k:(k+VAL_per_obj-1))'; data_Ncells_VAL = Vculture*Ccells_OD600_1*spMODEDat.DataOD_VAL(:,k:(k+VAL_per_obj-1))'; hold on subplot(211) errorbar(t,mean(data_XFP_VAL,1),std(data_XFP_VAL),'Color',color(i,:),'MarkerSize',6,... 'MarkerFaceColor',color(i,:), 'MarkerEdgeColor',[0 0 0],... 'Marker','o', 'LineStyle','none'); hold on plot(t,XFP,'Color',color(i,:),'LineWidth',1.8) title('Protein molecules per cell vs. MEFL (experimental data)','FontName','Lato','FontSize',14) xlabel('Time (min)','FontName','Lato') ylabel('Protein (MEFL)','FontName','Lato') xlim([t(1) t(end)]) subplot(212) errorbar(t,mean(data_Ncells_VAL,1),std(data_Ncells_VAL),'Color',color(i,:),'MarkerSize',6,... 'MarkerFaceColor',color(i,:), 'MarkerEdgeColor',[0 0 0],... 'Marker','o', 'LineStyle','none'); hold on plot(t,N,'Color',color(i,:),'LineWidth',1.8) title('Number of cells vs. Number of cells (experimental data)','FontName','Lato','FontSize',14) xlabel('Time (min)','FontName','Lato') ylabel('Number of cells','FontName','Lato') xlim([t(1) t(end)]) hold on k = k + VAL_per_obj; end labels = {'BBa-id6 experimental','BBa-id simulation'... 'BBa-id21 experimental','BBa-id simulation'... 'BBa-id20 experimental','BBa-id simulation'}; legend(labels,'Location','southeastoutside')