In [2]:
%pylab inline
Populating the interactive namespace from numpy and matplotlib
In [17]:
import tellurium as te
import pandas as pd
from scipy.stats import linregress
In [6]:
U2019_5= te.loadAntimonyModel("Models/U2019.5.txt")
U2020_5= te.loadAntimonyModel("Models/U2020.5.txt")
In [9]:
U2019_5_res = U2019_5.simulate(0,24*15,1000)
U2020_5_res = U2020_5.simulate(0,24*15,1000)
In [24]:
 
Out[24]:
[<matplotlib.lines.Line2D at 0x408645da50>]
In [18]:
calibration = pd.read_excel('../protein_cuantitation/calibration_long_time_series_.xlsx', header=None)
figure(figsize=(7,5))
xticks(fontsize=16)
yticks(fontsize=16)
errorbar(array([1e2,1e3,1e4,1e5,1e6]),log((mean(calibration)-mean(calibration)[0])[1:]),
         yerr = std(log((mean(calibration)-mean(calibration)[0])[1:]))/sqrt(24),
         fmt='s-', color="black", lw=2)

ylabel('ln(RLU)', fontsize=22)
xlabel('#molecules/cell', fontsize=22)
xscale("log")
#xlim(0,8)
#ylim(0,3)

reg = linregress(log10(array([1e2,1e3,1e4,1e5,1e6])),log((mean(calibration)-mean(calibration)[0])[1:]))
y=reg.slope*log10(array([1e2,1e3,1e4,1e5,1e6]))+reg.intercept
plot(array([1e2,1e3,1e4,1e5,1e6]),y, color="red", lw=2)

tight_layout()
#savefig('Calibration_NL.png', format='png', dpi=600)
#savefig('Calibration_NL.pdf', format='pdf', dpi=600)
#savefig('Calibration_NL.svg', format='svg', dpi=600)
In [20]:
data = pd.read_excel('../protein_cuantitation/lhy1.xlsx', sheetname='series', header=None)
In [21]:
abs_unit = 10**((log(data)-reg.intercept)/reg.slope)
abs_unit.to_excel('protein_abs_units_timeseries.xls')
In [26]:
figure(figsize=(7,5),dpi=600)

genes = ['LHY','CCA1','PRR7','TOC1','LUX','Col-0','empty']
genes_colors = {'CCA1':'crimson','LHY':'gold','PRR7':'indigo','TOC1':'#87CEFA','LUX':'plum','empty':'black','Col-0':'red'}


errorbar(array(range(-24,24*2+12,2))[:6],mean(abs_unit.iloc[0:6,:], axis=0)[:6],color=genes_colors['LHY'],barsabove=True,
         yerr=std(abs_unit.iloc[0:6,:], axis=0)[:6]/sqrt(2), fmt='o--', lw=2, alpha=0.5)
errorbar(array(range(-24,24*2+12,2))[:6],mean(abs_unit.iloc[6:12,:], axis=0)[:6],color=genes_colors['CCA1'], 
         yerr=std(abs_unit.iloc[6:12,:], axis=0)[:6]/sqrt(2), fmt='o--', lw=2, alpha=0.5)
errorbar(array(range(-24,24*2+12,2))[:6],mean(abs_unit.iloc[12:18,:], axis=0)[:6], 
         yerr=std(abs_unit.iloc[12:18,:], axis=0)[:6]/sqrt(2), fmt='o--', lw=2, color=genes_colors['TOC1'], alpha=0.5)
errorbar(array(range(-24,24*2+12,2))[:6],mean(abs_unit.iloc[18:24,:], axis=0)[:6],
         yerr=std(abs_unit.iloc[18:24,:], axis=0)[:6]/sqrt(2), fmt='o--', lw=2, color=genes_colors['PRR7'], alpha=0.5)


errorbar(array(range(-24,24*2+12,2))[6:],mean(abs_unit.iloc[0:6,:], axis=0)[6:],color=genes_colors['LHY'],barsabove=False,
         yerr=std(abs_unit.iloc[0:6,:], axis=0)[6:]/sqrt(2), fmt='o-', lw=3, label='LHY')
errorbar(array(range(-24,24*2+12,2))[6:],mean(abs_unit.iloc[6:12,:], axis=0)[6:], color=genes_colors['CCA1'],
         yerr=std(abs_unit.iloc[6:12,:], axis=0)[6:]/sqrt(2), fmt='o-', lw=3, label='CCA1')
errorbar(array(range(-24,24*2+12,2))[6:],mean(abs_unit.iloc[12:18,:], axis=0)[6:],color=genes_colors['TOC1'], 
         yerr=std(abs_unit.iloc[12:18,:], axis=0)[6:]/sqrt(2), fmt='o-', lw=3, label='TOC1')
errorbar(array(range(-24,24*2+12,2))[6:],mean(abs_unit.iloc[18:24,:], axis=0)[6:],color=genes_colors['PRR7'],
         yerr=std(abs_unit.iloc[18:24,:], axis=0)[6:]/sqrt(2), fmt='o-', lw=3, label='PRR7')
#errorbar(array(range(-24,24*2+12,2)),mean(abs_unit.iloc[24:30,:], axis=0),
#         yerr=std(abs_unit.iloc[24:30,:], axis=0)/sqrt(2), fmt='s-', lw=2.5, label='LUX', color='cyan')


yticks(fontsize=16)
#errorbar(range(0,24*3,2),mean(data.iloc[3:6,:], axis=0), yerr=std(data.iloc[3:6,:], axis=0))
ylim(1e3,1e6)
yscale('log')
legend(loc='lower right', fontsize=12)
xlabel('Time in constant light (h)', fontsize=22)
ylabel('#molecules/cell', fontsize=22)
xticks(range(0,23*3,24),fontsize=22)
#savefig('ProteinTimeseries.pdf', format='pdf', dpi=300)
axvspan(-12,0,color='gray')
axvspan(12,24,color='gray', alpha=0.4)
axvspan(12+24,24*2,color='gray', alpha=0.4)
xlim(-24,24*3-12)

tight_layout()
#savefig('lhycca1toc1prr7.svg',format='svg',dpi=600, transparent=True)
#savefig('lhycca1toc1prr7.pdf',format='pdf',dpi=600, transparent=True)
#savefig('lhycca1toc1prr7.png',format='png',dpi=600, transparent=True)
Out[26]:
[<matplotlib.lines.Line2D at 0x40860dd090>]
In [36]:
figure(figsize=(7,5),dpi=600)

genes = ['LHY','CCA1','PRR7','TOC1','LUX','Col-0','empty']
genes_colors = {'CCA1':'crimson','LHY':'gold','PRR7':'indigo','TOC1':'#87CEFA','LUX':'plum','empty':'black','Col-0':'red'}


errorbar(array(range(-24,24*2+12,2))[:6],mean(abs_unit.iloc[0:6,:], axis=0)[:6],color=genes_colors['LHY'],barsabove=True,
         yerr=std(abs_unit.iloc[0:6,:], axis=0)[:6]/sqrt(2), fmt='o--', lw=2, alpha=0.5)
errorbar(array(range(-24,24*2+12,2))[:6],mean(abs_unit.iloc[6:12,:], axis=0)[:6],color=genes_colors['CCA1'], 
         yerr=std(abs_unit.iloc[6:12,:], axis=0)[:6]/sqrt(2), fmt='o--', lw=2, alpha=0.5)

errorbar(array(range(-24,24*2+12,2))[6:],mean(abs_unit.iloc[0:6,:], axis=0)[6:],color=genes_colors['LHY'],barsabove=False,
         yerr=std(abs_unit.iloc[0:6,:], axis=0)[6:]/sqrt(2), fmt='o-', lw=3, label='LHY')
errorbar(array(range(-24,24*2+12,2))[6:],mean(abs_unit.iloc[6:12,:], axis=0)[6:], color=genes_colors['CCA1'],
         yerr=std(abs_unit.iloc[6:12,:], axis=0)[6:]/sqrt(2), fmt='o-', lw=3, label='CCA1')

plot(U2019_5_res["time"]-24*11,U2019_5_res["[cL]"], "-", lw=2, color="black", label="U2019.5")
plot(U2020_5_res["time"]-24*11,U2020_5_res["[cL]"], "--",lw=2,color="black", label="U2020.5")


yticks(fontsize=16)
#errorbar(range(0,24*3,2),mean(data.iloc[3:6,:], axis=0), yerr=std(data.iloc[3:6,:], axis=0))
ylim(1e3,1e6)
yscale('log')
legend(loc='lower right', fontsize=12)
xlabel('Time in constant light (h)', fontsize=22)
ylabel('#molecules/cell', fontsize=22)
xticks(range(0,23*3,24),fontsize=22)
#savefig('ProteinTimeseries.pdf', format='pdf', dpi=300)
axvspan(-12,0,color='gray')
axvspan(12,24,color='gray', alpha=0.4)
axvspan(12+24,24*2,color='gray', alpha=0.4)
xlim(-24,24*3-12)
tight_layout()
In [39]:
figure(figsize=(7,5),dpi=600)

genes = ['LHY','CCA1','PRR7','TOC1','LUX','Col-0','empty']
genes_colors = {'CCA1':'crimson','LHY':'gold','PRR7':'indigo','TOC1':'#87CEFA','LUX':'plum','empty':'black','Col-0':'red'}



errorbar(array(range(-24,24*2+12,2))[:6],mean(abs_unit.iloc[18:24,:], axis=0)[:6],
         yerr=std(abs_unit.iloc[18:24,:], axis=0)[:6]/sqrt(2), fmt='o--', lw=2, color=genes_colors['PRR7'], alpha=0.5)

errorbar(array(range(-24,24*2+12,2))[6:],mean(abs_unit.iloc[18:24,:], axis=0)[6:],color=genes_colors['PRR7'],
         yerr=std(abs_unit.iloc[18:24,:], axis=0)[6:]/sqrt(2), fmt='o-', lw=3, label='PRR7')
#errorbar(array(range(-24,24*2+12,2)),mean(abs_unit.iloc[24:30,:], axis=0),
#         yerr=std(abs_unit.iloc[24:30,:], axis=0)/sqrt(2), fmt='s-', lw=2.5, label='LUX', color='cyan')

plot(U2019_5_res["time"]-24*11,U2019_5_res["[cP7]"], "-", lw=2, color="black", label="U2019.5")
plot(U2020_5_res["time"]-24*11,U2020_5_res["[cP7]"], "--",lw=2,color="black", label="U2020.5")

yticks(fontsize=16)
#errorbar(range(0,24*3,2),mean(data.iloc[3:6,:], axis=0), yerr=std(data.iloc[3:6,:], axis=0))
ylim(1e2,1e6)
yscale('log')
legend(loc='lower right', fontsize=12)
xlabel('Time in constant light (h)', fontsize=22)
ylabel('#molecules/cell', fontsize=22)
xticks(range(0,23*3,24),fontsize=22)
#savefig('ProteinTimeseries.pdf', format='pdf', dpi=300)
axvspan(-12,0,color='gray')
axvspan(12,24,color='gray', alpha=0.4)
axvspan(12+24,24*2,color='gray', alpha=0.4)
xlim(-24,24*3-12)

tight_layout()
#savefig('lhycca1toc1prr7.svg',format='svg',dpi=600, transparent=True)
#savefig('lhycca1toc1prr7.pdf',format='pdf',dpi=600, transparent=True)
#savefig('lhycca1toc1prr7.png',format='png',dpi=600, transparent=True)
In [41]:
figure(figsize=(7,5),dpi=600)

genes = ['LHY','CCA1','PRR7','TOC1','LUX','Col-0','empty']
genes_colors = {'CCA1':'crimson','LHY':'gold','PRR7':'indigo','TOC1':'#87CEFA','LUX':'plum','empty':'black','Col-0':'red'}


errorbar(array(range(-24,24*2+12,2))[:6],mean(abs_unit.iloc[12:18,:], axis=0)[:6], 
         yerr=std(abs_unit.iloc[12:18,:], axis=0)[:6]/sqrt(2), fmt='o--', lw=2, color=genes_colors['TOC1'], alpha=0.5)

errorbar(array(range(-24,24*2+12,2))[6:],mean(abs_unit.iloc[12:18,:], axis=0)[6:],color=genes_colors['TOC1'], 
         yerr=std(abs_unit.iloc[12:18,:], axis=0)[6:]/sqrt(2), fmt='o-', lw=3, label='TOC1')

plot(U2019_5_res["time"]-24*11,U2019_5_res["[cT]"], "-", lw=2, color="black", label="U2019.5")
plot(U2020_5_res["time"]-24*11,U2020_5_res["[cT]"], "--",lw=2,color="black", label="U2020.5")

yticks(fontsize=16)
#errorbar(range(0,24*3,2),mean(data.iloc[3:6,:], axis=0), yerr=std(data.iloc[3:6,:], axis=0))
ylim(1e3,1e6)
yscale('log')
legend(loc='upper right', fontsize=12)
xlabel('Time in constant light (h)', fontsize=22)
ylabel('#molecules/cell', fontsize=22)
xticks(range(0,23*3,24),fontsize=22)
#savefig('ProteinTimeseries.pdf', format='pdf', dpi=300)
axvspan(-12,0,color='gray')
axvspan(12,24,color='gray', alpha=0.4)
axvspan(12+24,24*2,color='gray', alpha=0.4)
xlim(-24,24*3-12)

tight_layout()
#savefig('lhycca1toc1prr7.svg',format='svg',dpi=600, transparent=True)
#savefig('lhycca1toc1prr7.pdf',format='pdf',dpi=600, transparent=True)
#savefig('lhycca1toc1prr7.png',format='png',dpi=600, transparent=True)
In [98]:
figure(figsize=(15,5),dpi=600)

genes = ['LHY','CCA1','PRR7','TOC1','LUX','Col-0','empty']
genes_colors = {'CCA1':'crimson','LHY':'gold','PRR7':'indigo','TOC1':'#87CEFA','LUX':'plum','empty':'black','Col-0':'red'}

subplot(1,3,1)
errorbar(array(range(-24,24*2+12,2))[:6],mean(abs_unit.iloc[0:6,:], axis=0)[:6],color=genes_colors['LHY'],barsabove=True,
         yerr=std(abs_unit.iloc[0:6,:], axis=0)[:6]/sqrt(2), fmt='o--', lw=2, alpha=0.5, markeredgecolor="black")
errorbar(array(range(-24,24*2+12,2))[:6],mean(abs_unit.iloc[6:12,:], axis=0)[:6],color=genes_colors['CCA1'], 
         yerr=std(abs_unit.iloc[6:12,:], axis=0)[:6]/sqrt(2), fmt='o--', lw=2, alpha=0.5, markeredgecolor="black")

errorbar(array(range(-24,24*2+12,2))[6:],mean(abs_unit.iloc[0:6,:], axis=0)[6:],color=genes_colors['LHY'],barsabove=False,
         yerr=std(abs_unit.iloc[0:6,:], axis=0)[6:]/sqrt(2), fmt='o-', lw=3, label='LHY', markeredgecolor="black")
errorbar(array(range(-24,24*2+12,2))[6:],mean(abs_unit.iloc[6:12,:], axis=0)[6:], color=genes_colors['CCA1'],
         yerr=std(abs_unit.iloc[6:12,:], axis=0)[6:]/sqrt(2), fmt='o-', lw=3, label='CCA1', markeredgecolor="black")

plot(U2019_5_res["time"]-24*11,U2019_5_res["[cL]"], "-", lw=2, color="black", label="U2019.5")
plot(U2020_5_res["time"]-24*11,U2020_5_res["[cL]"], "--",lw=2,color="black", label="U2020.5")

yticks(fontsize=16)
#errorbar(range(0,24*3,2),mean(data.iloc[3:6,:], axis=0), yerr=std(data.iloc[3:6,:], axis=0))
ylim(1e2,1e6)
yscale('log')
legend(loc='lower right', fontsize=12)
#xlabel('Time in constant light (h)', fontsize=22)
ylabel('#molecules/cell', fontsize=22)
xticks(range(0,23*3,24),fontsize=22)
#savefig('ProteinTimeseries.pdf', format='pdf', dpi=300)
axvspan(-12,0,color='gray')
axvspan(12,24,color='gray', alpha=0.4)
axvspan(12+24,24*2,color='gray', alpha=0.4)
xlim(-24,24*3-12)
title("LHY and CCA1", fontsize=22)


subplot(1,3,2)
errorbar(array(range(-24,24*2+12,2))[:6],mean(abs_unit.iloc[18:24,:], axis=0)[:6],
         yerr=std(abs_unit.iloc[18:24,:], axis=0)[:6]/sqrt(2), fmt='o--', lw=2, color=genes_colors['PRR7'], alpha=0.5, markeredgecolor="black")

errorbar(array(range(-24,24*2+12,2))[6:],mean(abs_unit.iloc[18:24,:], axis=0)[6:],color=genes_colors['PRR7'],
         yerr=std(abs_unit.iloc[18:24,:], axis=0)[6:]/sqrt(2), fmt='o-', lw=3, label='PRR7', markeredgecolor="black")
#errorbar(array(range(-24,24*2+12,2)),mean(abs_unit.iloc[24:30,:], axis=0),
#         yerr=std(abs_unit.iloc[24:30,:], axis=0)/sqrt(2), fmt='s-', lw=2.5, label='LUX', color='cyan')

plot(U2019_5_res["time"]-24*11,U2019_5_res["[cP7]"], "-", lw=2, color="black", label="U2019.5")
plot(U2020_5_res["time"]-24*11,U2020_5_res["[cP7]"], "--",lw=2,color="black", label="U2020.5")

yticks(fontsize=16)
#errorbar(range(0,24*3,2),mean(data.iloc[3:6,:], axis=0), yerr=std(data.iloc[3:6,:], axis=0))
ylim(1e2,1e6)
yscale('log')
legend(loc='lower right', fontsize=12)
xlabel('Time in constant light (h)', fontsize=22)
#ylabel('#molecules/cell', fontsize=22)
xticks(range(0,23*3,24),fontsize=22)
#savefig('ProteinTimeseries.pdf', format='pdf', dpi=300)
axvspan(-12,0,color='gray')
axvspan(12,24,color='gray', alpha=0.4)
axvspan(12+24,24*2,color='gray', alpha=0.4)
xlim(-24,24*3-12)
title("PRR7", fontsize=22)


subplot(1,3,3)
errorbar(array(range(-24,24*2+12,2))[:6],mean(abs_unit.iloc[12:18,:], axis=0)[:6], 
         yerr=std(abs_unit.iloc[12:18,:], axis=0)[:6]/sqrt(2), fmt='o--', lw=2, color=genes_colors['TOC1'], alpha=0.5, markeredgecolor="black")

errorbar(array(range(-24,24*2+12,2))[6:],mean(abs_unit.iloc[12:18,:], axis=0)[6:],color=genes_colors['TOC1'], 
         yerr=std(abs_unit.iloc[12:18,:], axis=0)[6:]/sqrt(2), fmt='o-', lw=3, label='TOC1', markeredgecolor="black")

plot(U2019_5_res["time"]-24*11,U2019_5_res["[cT]"], "-", lw=2, color="black", label="U2019.5")
plot(U2020_5_res["time"]-24*11,U2020_5_res["[cT]"], "--",lw=2,color="black", label="U2020.5")
title("TOC1", fontsize=22)


yticks(fontsize=16)
#errorbar(range(0,24*3,2),mean(data.iloc[3:6,:], axis=0), yerr=std(data.iloc[3:6,:], axis=0))
ylim(1e2,1e6)
yscale('log')
legend(loc='lower right', fontsize=12)
#xlabel('Time in constant light (h)', fontsize=22)
#ylabel('#molecules/cell', fontsize=22)
xticks(range(0,23*3,24),fontsize=22)
#savefig('ProteinTimeseries.pdf', format='pdf', dpi=300)
axvspan(-12,0,color='gray')
axvspan(12,24,color='gray', alpha=0.4)
axvspan(12+24,24*2,color='gray', alpha=0.4)
xlim(-24,24*3-12)
tight_layout()
savefig("Models_U2019_5_U2020_5_vs_NL_data.pdf", format="pdf", dpi=600)
savefig("Models_U2019_5_U2020_5_vs_NL_data.svg", format="svg", dpi=600)
savefig("Models_U2019_5_U2020_5_vs_NL_data.png", format="png", dpi=600)
savefig("Models_U2019_5_U2020_5_vs_NL_data_transparent.pdf", format="pdf", dpi=600, transparent=True)
savefig("Models_U2019_5_U2020_5_vs_NL_data_transparent.svg", format="svg", dpi=600, transparent=True)
savefig("Models_U2019_5_U2020_5_vs_NL_data_transparent.png", format="png", dpi=600, transparent=True)