
mat1=dlmread('wm_km_growth_rateNoRSYmat.csv',' ');
hist(-mat1,20);
xlabel('OD increase per hour','fontsize',16);
ylabel('Frequency counts','fontsize',16);
title('Histogram of differences in Growth Rate (knockout-wtype)','fontsize',14,'fontweight','b');
     
h = findobj(gca,'Type','patch');
set(h,'FaceColor','b','EdgeColor','w');
line([0 0],[0 16],[0 0],'Color','r','LineStyle','--','LineWidth',2,'Marker','none');
%set(gca,'XTickMode','manual');
%set(gca,'XTickLabelMode','manual');
%set(gca,'XTick',[-0.3 -0.2 -0.1 0 0.1]);
%set(gca,'XTickLabel',{'-0.3';'-0.2';'-0.1';'0';'0.1'});
%set(gca,'YTickMode','manual');
%set(gca,'YTickLabelMode','manual');
%set(gca,'YTick',[4 8 12 16]);
%set(gca,'YTickLabel',{'4';'8';'12';'16'});
%set(gca,'FontName','FixedWidth');
%set(gca,'FontSize',16);
%set(gca,'FontWeight','b');
%set(gca,'TickLength',[0.03 0]);
set(gca,'xlim',[-0.3 0.1])
set(gca,'XTick',[-0.3:0.1:0.1]);
set(gca,'XTickLabel',{'-0.3';'-0.2';'-0.1';'0';'0.1'});
set(gca,'YTick',[4 8 12 16]);
set(gca,'YTickLabel',{'4';'8';'12';'16'});
set(gca,'XTickMode','manual','YTickMode','manual')
set(gca,'FontName','FixedWidth');
set(gca,'FontSize',16);
set(gca,'FontWeight','b');
set(gca,'TickLength',[0.03 0]);

fname='km_wm_growth_rate2.tiff';
saveas(gcf,fname,'tiff');


mat1a=dlmread('wm_km_lag_timeNoRSYmat.csv',' ');
%hist(-mat1a,20);
mat1a=-mat1a;
mat1arange= -0.2:0.1:2.8; % this gives the range 30 bins
bar(mat1arange,histc(mat1a,mat1arange),'histc');
legend_handle=legend('k-w in minimal',1);
set(legend_handle,'FontSize',14);
xlabel('Lag in hours','fontsize',16);
ylabel('Frequency counts','fontsize',16);
title('Histogram of differences in Lag time (knockout-wtype)','fontsize',14,'fontweight','b');
     
h = findobj(gca,'Type','patch');
set(h,'FaceColor','b','EdgeColor','w');
line([0 0],[0 10],[0 0],'Color','r','LineStyle','--','LineWidth',2,'Marker','none');
%set(gca,'XTickMode','manual');
%set(gca,'XTickLabelMode','manual');
%set(gca,'XTick',[-0.3 -0.2 -0.1 0 0.1]);
%set(gca,'XTickLabel',{'-0.3';'-0.2';'-0.1';'0';'0.1'});
%set(gca,'YTickMode','manual');
%set(gca,'YTickLabelMode','manual');
%set(gca,'YTick',[4 8 12 16]);
%set(gca,'YTickLabel',{'4';'8';'12';'16'});
%set(gca,'FontName','FixedWidth');
%set(gca,'FontSize',16);
%set(gca,'FontWeight','b');
%set(gca,'TickLength',[0.03 0]);
%set(gca,'xlim',[-0.3 0.1])
%set(gca,'XTick',[-0.3:0.1:0.1]);
%set(gca,'XTickLabel',{'-0.3';'-0.2';'-0.1';'0';'0.1'});
set(gca,'YTick',[1 2 3 4 5 6 7 8 9 10]);
set(gca,'YTickLabel',{'1';'2';'3';'4';'5';'6';'7';'8';'9';'10'});
%set(gca,'XTickMode','manual','YTickMode','manual')
set(gca,'FontName','FixedWidth');
set(gca,'FontSize',16);
set(gca,'FontWeight','b');
set(gca,'TickLength',[0.02 0]);

fname='km_wm_lag_time2bar.tiff';
saveas(gcf,fname,'tiff');

mat1b=dlmread('wm_km_global_max_odNoRSYmat.csv',' ');
%hist(-mat1b,20);
xlabel('Optical Density (OD)','fontsize',16);
ylabel('Frequency counts','fontsize',16);
title('Histogram of differences in OD (knockout-wtype)','fontsize',14,'fontweight','b');
     
h = findobj(gca,'Type','patch');
set(h,'FaceColor','b','EdgeColor','w');
line([0 0],[0 12],[0 0],'Color','r','LineStyle','--','LineWidth',2,'Marker','none');
%set(gca,'XTickMode','manual');
%set(gca,'XTickLabelMode','manual');
%set(gca,'XTick',[-0.3 -0.2 -0.1 0 0.1]);
%set(gca,'XTickLabel',{'-0.3';'-0.2';'-0.1';'0';'0.1'});
%set(gca,'YTickMode','manual');
%set(gca,'YTickLabelMode','manual');
%set(gca,'YTick',[4 8 12 16]);
%set(gca,'YTickLabel',{'4';'8';'12';'16'});
%set(gca,'FontName','FixedWidth');
%set(gca,'FontSize',16);
%set(gca,'FontWeight','b');
%set(gca,'TickLength',[0.03 0]);
%set(gca,'xlim',[-0.3 0.1])
%set(gca,'XTick',[-0.3:0.1:0.1]);
%set(gca,'XTickLabel',{'-0.3';'-0.2';'-0.1';'0';'0.1'});
set(gca,'YTick',[2 4 6 8 10 12]);
set(gca,'YTickLabel',{'2';'4';'6';'8';'10';'12'});
%set(gca,'XTickMode','manual','YTickMode','manual')
set(gca,'FontName','FixedWidth');
set(gca,'FontSize',16);
set(gca,'FontWeight','b');
set(gca,'TickLength',[0.03 0]);

fname='km_wm_global_max_od2.tiff';
saveas(gcf,fname,'tiff');

mat2=dlmread('wr_kr_growth_rateNoRSYmat.csv',' ');
hist(-mat2,20);
xlabel('OD increase per hour','fontsize',16);
ylabel('Frequency counts','fontsize',16);
title('Histogram of differences in Growth Rate (knockout-wtype) in rich','fontsize',14,'fontweight','b');
     
h = findobj(gca,'Type','patch');
set(h,'FaceColor','r','EdgeColor','w');
line([0 0],[0 12],[0 0],'Color','b','LineStyle','--','LineWidth',2,'Marker','none');
%set(gca,'YTickMode','manual');
%set(gca,'YTickLabelMode','manual');
%set(gca,'YTick',[4 8 12 16]);
%set(gca,'YTickLabel',{'4';'8';'12';'16'});
%set(gca,'XTickMode','manual');
%set(gca,'XTickLabelMode','manual');
%set(gca,'XTick',[-0.3 -0.2 -0.1 0 0.1]);
%set(gca,'XTickLabel',{'-0.3';'-0.2';'-0.1';'0';'0.1'});
%set(gca,'FontName','FixedWidth');
%set(gca,'FontSize',16);
%set(gca,'FontWeight','b');
%set(gca,'TickLength',[0.03 0]);
%set(gca,'xlim',[-0.3 0.1])
%set(gca,'XTick',[-0.3:0.1:0.1]);
%set(gca,'XTickLabel',{'-0.3';'-0.2';'-0.1';'0';'0.1'});
set(gca,'YTick',[2 4 6 8 10 12]);
set(gca,'YTickLabel',{'2';'4';'6';'8';'10';'12'});
set(gca,'XTickMode','manual','YTickMode','manual')
set(gca,'FontName','FixedWidth');
set(gca,'FontSize',16);
set(gca,'FontWeight','b');
set(gca,'TickLength',[0.03 0]);
fname='kr_wr_growth_rate2.tiff';
saveas(gcf,fname,'tiff');

mat2a=dlmread('wr_kr_global_max_odNoRSYmat.csv',' ');
hist(-mat2a,20);
xlabel('Optical Density (OD)','fontsize',16);
ylabel('Frequency counts','fontsize',16);
title('Histogram of differences in OD (knockout-wtype) in rich','fontsize',14,'fontweight','b');
     
h = findobj(gca,'Type','patch');
set(h,'FaceColor','r','EdgeColor','w');
line([0 0],[0 4],[0 0],'Color','b','LineStyle','--','LineWidth',2,'Marker','none');
%set(gca,'YTickMode','manual');
%set(gca,'YTickLabelMode','manual');
%set(gca,'YTick',[4 8 12 16]);
%set(gca,'YTickLabel',{'4';'8';'12';'16'});
%set(gca,'XTickMode','manual');
%set(gca,'XTickLabelMode','manual');
%set(gca,'XTick',[-0.3 -0.2 -0.1 0 0.1]);
%set(gca,'XTickLabel',{'-0.3';'-0.2';'-0.1';'0';'0.1'});
%set(gca,'FontName','FixedWidth');
%set(gca,'FontSize',16);
%set(gca,'FontWeight','b');
%set(gca,'TickLength',[0.03 0]);
%set(gca,'xlim',[-0.3 0.1])
%set(gca,'XTick',[-0.3:0.1:0.1]);
%set(gca,'XTickLabel',{'-0.3';'-0.2';'-0.1';'0';'0.1'});
set(gca,'YTick',[1 2 3 4]);
set(gca,'YTickLabel',{'1';'2';'3';'4'});
%set(gca,'XTickMode','manual','YTickMode','manual')
set(gca,'FontName','FixedWidth');
set(gca,'FontSize',16);
set(gca,'FontWeight','b');
set(gca,'TickLength',[0.03 0]);
fname='kr_wr_global_max_od2.tiff';
saveas(gcf,fname,'tiff');

mat3=dlmread('wm_wmn_growth_ratemat.csv',' ');
%hist(-mat3,20);
mat3=-mat3;
mat3range= -0.2:0.025:0.3;
bar(mat3range,histc(mat3,mat3range),'histc');
legend_handle=legend('wtype+Nut - wtype',1);
set(legend_handle,'FontSize',14);
xlabel('OD increase per hour','fontsize',16);
ylabel('Frequency counts','fontsize',16);
title('Histogram of differences in Growth Rate (wtype+Nut - wtype)','fontsize',14,'fontweight','b');
     
h = findobj(gca,'Type','patch');
set(h,'FaceColor','r','EdgeColor','w');
line([0 0],[0 30],[0 0],'Color','b','LineStyle','--','LineWidth',2,'Marker','none');
set(gca,'Ytick',[5 10 15 20 25 30]);
set(gca,'YTickLabel',{'5';'10';'15';'20';'25';'30'});
set(gca,'FontName','FixedWidth');
set(gca,'FontSize',16);
set(gca,'FontWeight','b');
fname='wmn_wm_growth_rate1bar.tiff';
saveas(gcf,fname,'tiff');

mat3a=dlmread('wm_wmn_global_max_odmat.csv',' ');
%hist(-mat3a,20);
mat3a=-mat3a;
mat3arange= -0.11:0.0183:0.2562;
bar(mat3arange,histc(mat3a,mat3arange),'histc');
legend_handle=legend('wtype+Nut - wtype',1);
xlabel('Optical Density ','fontsize',16);
ylabel('Frequency counts','fontsize',16);
title('Histogram of differences in Global Max OD (wtype+Nut - wtype)','fontsize',14,'fontweight','b');
     
h = findobj(gca,'Type','patch');
set(h,'FaceColor','r','EdgeColor','w');
line([0 0],[0 16],[0 0],'Color','b','LineStyle','--','LineWidth',2,'Marker','none');
set(gca,'Ytick',[2 4 6 8 10 12 14 16]);
set(gca,'YTickLabel',{'2';'4';'6';'8';'10';'12';'14';'16'});
set(gca,'FontName','FixedWidth');
set(gca,'FontSize',16);
set(gca,'FontWeight','b');
fname='wmn_wm_global_max_od1bar.tiff';
saveas(gcf,fname,'tiff');


mat4=dlmread('wm_wmn_lag_timemat.csv',' ');
%hist(-mat4,20);
mat4=-mat4;
mat4range= -10.8:0.72:3.6;
bar(mat4range,histc(mat4,mat4range),'histc');
legend_handle=legend('wtype+Nut - wtype',2);
set(legend_handle,'FontSize',14);
xlabel('Difference in Lag time (h)','fontsize',16);
ylabel('Frequency counts','fontsize',16);
title('Histogram of differences in Lag time (wtype+Nut - wtype)','fontsize',14,'fontweight','b');
     
h = findobj(gca,'Type','patch');
set(h,'FaceColor','b','EdgeColor','w');
line([0 0],[0 45],[0 0],'Color','r','LineStyle','--','LineWidth',2,'Marker','none');
set(gca,'Ytick',[5 10 15 20 25 30 35 40 45]);
set(gca,'YTickLabel',{'5';'10';'15';'20';'25';'30';'35';'40';'45'});
set(gca,'Xtick',[-12 -10 -8 -6 -4 -2 0 2 4]);
set(gca,'XTickLabel',{'-12';'-10';'-8';'-6';'-4';'-2';'0';'2';'4'});
set(gca,'FontName','FixedWidth');
set(gca,'FontSize',16);
set(gca,'FontWeight','b');
 fname='wmn_wm_lag_time1bar.tiff';
saveas(gcf,fname,'tiff');


