%pylab inline
!pip install xlrd
!pip install xlwt
Populating the interactive namespace from numpy and matplotlib
/usr/local/lib/python2.7/dist-packages/IPython/core/magics/pylab.py:161: UserWarning: pylab import has clobbered these variables: ['f', 'e'] `%matplotlib` prevents importing * from pylab and numpy
Requirement already satisfied: xlrd in /usr/local/lib/python2.7/dist-packages Requirement already satisfied: xlwt in /usr/local/lib/python2.7/dist-packages
import tellurium as te
import pandas as pd
from scipy.stats import linregress
U2019_5= te.loadAntimonyModel("Models/U2019.5.txt")
U2020_5= te.loadAntimonyModel("Models/U2020.5.txt")
U2019_5_res = U2019_5.simulate(0,24*15,1000)
U2020_5_res = U2020_5.simulate(0,24*15,1000)
[<matplotlib.lines.Line2D at 0x408645da50>]
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)
data = pd.read_excel('../protein_cuantitation/lhy1.xlsx', sheet_name='series', header=None)
abs_unit = 10**((log(data)-reg.intercept)/reg.slope)
#abs_unit.to_excel('protein_abs_units_timeseries.xls')
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)
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()
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)
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)
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)
data = pd.read_excel("../protein_predictions/Clock_proteins_time_series/LongDay/120419t.xlsx", sheetname='Sheet1')
scaled=data
time=data.iloc[:,0]/3600+8
for i in range(0,data.shape[0]):
scaled.iloc[i,1:] = data.iloc[i,1:]*exp(0.029*(time.iloc[i]-8))
data = scaled
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'}
data = pd.read_excel("../protein_predictions/Clock_proteins_time_series/LongDay/120419t.xlsx", sheetname='Sheet1')
scaled=data
time=data.iloc[:,0]/3600+8
for i in range(0,data.shape[0]):
scaled.iloc[i,1:] = data.iloc[i,1:]*exp(0.02*(time.iloc[i]-8))
data = scaled
figure(dpi=300)
#data = pd.read_excel("../protein_predictions/Clock_proteins_time_series/LongDay/120419t.xlsx", sheetname='Sheet1')
time=data.iloc[:,0]/3600+8
ylim(1e2,1e6)
for i in range(0,10):
axvspan(12+24*i,24+24*i, color='gray')
errorbar(time,data.iloc[:,1+8:9+8].mean(axis=1),yerr=data.iloc[:,1+8:9+8].sem(axis=1), lw=2,
label='LHY-NL', color=genes_colors["LHY"], fmt="s-", markeredgecolor="black")
errorbar(time,data.iloc[:,1+8*3:9+8*3].mean(axis=1),yerr=data.iloc[:,1+8*3:9+8*3].sem(axis=1),lw=2,
label='CCA1-NL', color=genes_colors["CCA1"], fmt="s-", markeredgecolor="black")
legend(loc='lower right')
yscale('log')
ylabel('NanoLUC [RLU]', fontsize=22)
xlabel("h", fontsize=22)
xticks(range(0,24*10,48))
([<matplotlib.axis.XTick at 0x40b78a7e90>, <matplotlib.axis.XTick at 0x40b78a7910>, <matplotlib.axis.XTick at 0x40b78a7750>, <matplotlib.axis.XTick at 0x40c51b9510>, <matplotlib.axis.XTick at 0x40c5105e50>], <a list of 5 Text xticklabel objects>)
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'}
data = pd.read_excel("../protein_predictions/Clock_proteins_time_series/All clock proteins 12L12D/290319t.xlsx", sheetname='Sheet1')
scaled=data
time=data.iloc[:,0]/3600+8
for i in range(0,data.shape[0]):
scaled.iloc[i,1:] = data.iloc[i,1:]*exp(0.02*(time.iloc[i]-8))
data = scaled
time=data.iloc[:,0]/3600+8
subplot(1,3,1)
ylim(1e2,1e6)
sf = 5/2.5
time_sh = time-24*3 #time shifted
errorbar(time_sh,sf*(data.iloc[:,1+8:9+8]).mean(axis=1),yerr=sf*(data.iloc[:,1+8:9+8]).sem(axis=1), fmt="-s",lw=2,label='in vivo', color=genes_colors["LHY"], markeredgecolor="black")
#errorbar(time_sh,sf*(data.iloc[:,1+8*3:9+8*3]).mean(axis=1),yerr=sf*(data.iloc[:,1+8*3:9+8*3]).sem(axis=1), label='CCA1-NL', color=genes_colors["CCA1"])
legend(loc='upper right')
yscale('log')
ylabel('cps')
subplot(1,3,2)
errorbar(time_sh,sf*(data.iloc[:,1+8*7:9+8*7]).mean(axis=1),yerr=sf*(data.iloc[:,1+8*7:9+8*7]).sem(axis=1), fmt="-s", lw=2,label='in vivo', color=genes_colors["TOC1"], markeredgecolor="black")
legend(loc='upper right')
yscale('log')
subplot(1,3,3)
errorbar(time_sh,sf*(data.iloc[:,1+8*9:9+8*9]).mean(axis=1),yerr=sf*(data.iloc[:,1+8*9:9+8*9]).sem(axis=1), fmt="-s", lw=2,label='in vivo #6.1', color=genes_colors["LUX"], markeredgecolor="black")
#errorbar(time,data.iloc[:,1+8*10:9+8*10].mean(axis=1),yerr=data.iloc[:,1+8*10:9+8*10].sem(axis=1))
errorbar(time_sh,sf*(data.iloc[:,1+8*11:9+8*11]).mean(axis=1),yerr=sf*(data.iloc[:,1+8*11:9+8*11]).sem(axis=1), fmt="-^",lw=2, label='in vivo #12.1', color=genes_colors["LUX"], markeredgecolor="black")
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)
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=2, label='extract', 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')
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", fontsize=22)
subplot(1,3,2)
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=2, label='extract', 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")
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)
xticks(range(0,23*3,24),fontsize=22)
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("TOC1", fontsize=22)
subplot(1,3,3)
U2019_ELF3_total = U2019_5_res["[cE3c]"]+U2019_5_res["[cE3n]"]+U2019_5_res["[cEC]"]+U2019_5_res["[cEGn]"]+U2019_5_res["[cEGc]"]+U2019_5_res["[cE34]"]
U2020_ELF3_total = U2020_5_res["[cE3c]"]+U2020_5_res["[cE3n]"]+U2020_5_res["[cEC]"]+U2020_5_res["[cEGn]"]+U2020_5_res["[cEGc]"]+U2020_5_res["[cE34]"]
plot(U2019_5_res["time"]-24*11,U2019_ELF3_total, "-", lw=2, color="black", label="U2019.5")
plot(U2020_5_res["time"]-24*11,U2020_ELF3_total, "--",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)
xticks(range(0,23*3,24),fontsize=22)
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("ELF3", fontsize=22)
tight_layout()
#savefig('ProteinTimeseries_live_vs_manual_vsU2019_5_U2020_5.pdf', format='pdf', dpi=600)
#savefig('ProteinTimeseries_live_vs_manual_vsU2019_5_U2020_5.svg', format='svg', dpi=600)
#savefig('ProteinTimeseries_live_vs_manual_vsU2019_5_U2020_5.png', format='png', dpi=600)
#savefig('ProteinTimeseries_live_vs_manual_vsU2019_5_U2020_5_transparent.pdf', format='pdf', dpi=600, transparent=True)
#savefig('ProteinTimeseries_live_vs_manual_vsU2019_5_U2020_5_transparent.svg', format='svg', dpi=600, transparent=True)
#savefig('ProteinTimeseries_live_vs_manual_vsU2019_5_U2020_5_transparent.png', format='png', dpi=600, transparent=True)
f = 68-30
e= 68
errorbar(time_sh[f:e],sf*(data.iloc[f:e,1+8*9:9+8*9]).mean(axis=1),yerr=sf*(data.iloc[f:e,1+8*9:9+8*9]).sem(axis=1), fmt="-s", lw=2,label='in vivo #6.1', color="black", markeredgecolor="black")
#errorbar(time,data.iloc[:,1+8*10:9+8*10].mean(axis=1),yerr=data.iloc[:,1+8*10:9+8*10].sem(axis=1))
errorbar(time_sh[f:e],sf*(data.iloc[f:e,1+8*11:9+8*11]).mean(axis=1),yerr=sf*(data.iloc[f:e,1+8*11:9+8*11]).sem(axis=1), fmt="-^",lw=2, label='in vivo #12.1', color=genes_colors["LUX"], markeredgecolor="black")
yscale("log")
#ylim(10e3,35e3)
f = 68
e= 68+30
errorbar(time_sh[f:e],sf*(data.iloc[f:e,1+8*9:9+8*9]).mean(axis=1),yerr=sf*(data.iloc[f:e,1+8*9:9+8*9]).sem(axis=1), fmt="-s", lw=2,label='in vivo #6.1', color="black", markeredgecolor="black")
#errorbar(time,data.iloc[:,1+8*10:9+8*10].mean(axis=1),yerr=data.iloc[:,1+8*10:9+8*10].sem(axis=1))
errorbar(time_sh[f:e],sf*(data.iloc[f:e,1+8*11:9+8*11]).mean(axis=1),yerr=sf*(data.iloc[f:e,1+8*11:9+8*11]).sem(axis=1), fmt="-^",lw=2, label='in vivo #12.1', color=genes_colors["LUX"], markeredgecolor="black")
<ErrorbarContainer object of 3 artists>
f = 68-30
e = 68
print min(sf*(data.iloc[f:e,1+8*11:9+8*11]).mean(axis=1))
print max(sf*(data.iloc[f:e,1+8*11:9+8*11]).mean(axis=1))
24897.7853769 67533.5247861
f = 68
e= 68+30
print min(sf*(data.iloc[f:e,1+8*11:9+8*11]).mean(axis=1))
print max(sf*(data.iloc[f:e,1+8*11:9+8*11]).mean(axis=1))
17892.150594 27079.1698597
plot(U2019_5_res["time"]-24*11,U2019_5_res["[cZG]"], "-", lw=2, color="black", label="U2019.5")
figure(dpi=600)
data = pd.read_excel("../protein_predictions/Clock_proteins_time_series/LongDay/120419t.xlsx", sheetname='Sheet1')
time=data.iloc[:,0]/3600+8
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(2,2,1)
ylim(1e2,1e6)
for i in range(0,10):
axvspan(12+24*i,24+24*i, color='gray')
errorbar(time,data.iloc[:,1+8:9+8].mean(axis=1),yerr=data.iloc[:,1+8:9+8].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='LHY-NL', color=genes_colors["LHY"])
errorbar(time,data.iloc[:,1+8*3:9+8*3].mean(axis=1),yerr=data.iloc[:,1+8*3:9+8*3].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='CCA1-NL', color=genes_colors["CCA1"])
legend(loc='upper right')
yscale('log')
ylabel('cps')
subplot(2,2,2)
ylim(1e2,1e6)
errorbar(time,data.iloc[:,1+8*5:9+8*5].mean(axis=1),yerr=data.iloc[:,1+8*5:9+8*5].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='PRR7-NL', color=genes_colors["PRR7"])
errorbar(time,data.iloc[:,1+8*7:9+8*7].mean(axis=1),yerr=data.iloc[:,1+8*7:9+8*7].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='TOC1-NL', color=genes_colors["TOC1"])
#errorbar(time,data.iloc[:,1+8*9:9+8*9].mean(axis=1), label='ELF3-NL 6.2')
legend(loc='upper right')
yscale('log')
for i in range(0,10):
axvspan(12+24*i,24+24*i, color='gray')
subplot(2,2,3)
ylim(1e2,1e6)
errorbar(time,data.iloc[:,1+8*9:9+8*9].mean(axis=1),yerr=data.iloc[:,1+8*9:9+8*9].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='ELF3-NL lines', color=genes_colors["LUX"])
errorbar(time,data.iloc[:,1+8*10:9+8*10].mean(axis=1),yerr=data.iloc[:,1+8*10:9+8*10].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",color=genes_colors["LUX"])
errorbar(time,data.iloc[:,1+8*11:9+8*11].mean(axis=1),yerr=data.iloc[:,1+8*11:9+8*11].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",color=genes_colors["LUX"])
legend(loc='upper right')
yscale('log')
for i in range(0,10):
axvspan(12+24*i,24+24*i, color='gray')
ylabel('cps')
xlabel('Time in hours')
subplot(2,2,4)
errorbar(time,data.iloc[:,1+8*9:9+8*9].mean(axis=1),yerr=data.iloc[:,1+8*9:9+8*9].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='ELF3-NL 1', color=genes_colors["LUX"])
#errorbar(time,data.iloc[:,1+8*10:9+8*10].mean(axis=1),yerr=data.iloc[:,1+8*10:9+8*10].sem(axis=1))
errorbar(time,data.iloc[:,1+8*11:9+8*11].mean(axis=1),yerr=data.iloc[:,1+8*11:9+8*11].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='ELF3-NL 2', color=genes_colors["LUX"])
errorbar(time,data.iloc[:,1+8*7:9+8*7].mean(axis=1),yerr=data.iloc[:,1+8*7:9+8*7].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='TOC1-NL', color=genes_colors["TOC1"])
legend(loc='upper right')
yscale('log')
for i in range(0,10):
axvspan(12+24*i,24+24*i, color='gray')
xlabel('Time in hours')
#savefig('ProteinTimeseries_live_12L12D.pdf', format='pdf', dpi=600)
#savefig('ProteinTimeseries_live_12L12D.svg', format='svg', dpi=600)
#savefig('ProteinTimeseries_live_12L12D.png', format='png', dpi=600)
#savefig('ProteinTimeseries_live_12L12D_transparent.pdf', format='pdf', dpi=600, transparent=True)
#savefig('ProteinTimeseries_live_12L12D_transparent.svg', format='svg', dpi=600, transparent=True)
#savefig('ProteinTimeseries_live_12L12D_transparent.png', format='png', dpi=600, transparent=True)
Text(0.5,0,'Time in hours')
figure(dpi=600)
data = pd.read_excel("../protein_predictions/Clock_proteins_time_series/LongDay/120419t.xlsx", sheetname='Sheet1')
scaled=data
time=data.iloc[:,0]/3600+8
for i in range(0,data.shape[0]):
scaled.iloc[i,1:] = data.iloc[i,1:]*exp(0.02*(time.iloc[i]-8))
data = scaled
time=data.iloc[:,0]/3600+8
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(2,2,1)
ylim(1e2,1e6)
for i in range(0,10):
axvspan(12+24*i,24+24*i, color='gray')
errorbar(time,data.iloc[:,1+8:9+8].mean(axis=1),yerr=data.iloc[:,1+8:9+8].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='LHY-NL', color=genes_colors["LHY"])
errorbar(time,data.iloc[:,1+8*3:9+8*3].mean(axis=1),yerr=data.iloc[:,1+8*3:9+8*3].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='CCA1-NL', color=genes_colors["CCA1"])
legend(loc='lower right', fontsize=7)
yscale('log')
ylabel('cps')
subplot(2,2,2)
ylim(1e2,1e6)
errorbar(time,data.iloc[:,1+8*5:9+8*5].mean(axis=1),yerr=data.iloc[:,1+8*5:9+8*5].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='PRR7-NL', color=genes_colors["PRR7"])
errorbar(time,data.iloc[:,1+8*7:9+8*7].mean(axis=1),yerr=data.iloc[:,1+8*7:9+8*7].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='TOC1-NL', color=genes_colors["TOC1"])
#errorbar(time,data.iloc[:,1+8*9:9+8*9].mean(axis=1), label='ELF3-NL 6.2')
legend(loc='lower right', fontsize=7)
yscale('log')
for i in range(0,10):
axvspan(12+24*i,24+24*i, color='gray')
subplot(2,2,3)
ylim(1e2,1e6)
errorbar(time,data.iloc[:,1+8*9:9+8*9].mean(axis=1),yerr=data.iloc[:,1+8*9:9+8*9].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='ELF3-NL lines', color=genes_colors["LUX"])
errorbar(time,data.iloc[:,1+8*10:9+8*10].mean(axis=1),yerr=data.iloc[:,1+8*10:9+8*10].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",color=genes_colors["LUX"])
errorbar(time,data.iloc[:,1+8*11:9+8*11].mean(axis=1),yerr=data.iloc[:,1+8*11:9+8*11].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",color=genes_colors["LUX"])
legend(loc='lower right', fontsize=7)
yscale('log')
for i in range(0,10):
axvspan(12+24*i,24+24*i, color='gray')
ylabel('cps')
xlabel('Time in hours')
subplot(2,2,4)
errorbar(time,data.iloc[:,1+8*9:9+8*9].mean(axis=1),yerr=data.iloc[:,1+8*9:9+8*9].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='ELF3-NL 1', color=genes_colors["LUX"])
#errorbar(time,data.iloc[:,1+8*10:9+8*10].mean(axis=1),yerr=data.iloc[:,1+8*10:9+8*10].sem(axis=1))
errorbar(time,data.iloc[:,1+8*11:9+8*11].mean(axis=1),yerr=data.iloc[:,1+8*11:9+8*11].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='ELF3-NL 2', color=genes_colors["LUX"])
errorbar(time,data.iloc[:,1+8*7:9+8*7].mean(axis=1),yerr=data.iloc[:,1+8*7:9+8*7].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='TOC1-NL', color=genes_colors["TOC1"])
legend(loc='lower right', fontsize=7)
yscale('log')
for i in range(0,10):
axvspan(12+24*i,24+24*i, color='gray')
ylim(1e2,1e6)
xlabel('Time in hours')
#savefig('ProteinTimeseries_live_12L12D_detrended.pdf', format='pdf', dpi=600)
#savefig('ProteinTimeseries_live_12L12D_detrended.svg', format='svg', dpi=600)
#savefig('ProteinTimeseries_live_12L12D_detrended.png', format='png', dpi=600)
#savefig('ProteinTimeseries_live_12L12D_detrended_transparent.pdf', format='pdf', dpi=600, transparent=True)
#savefig('ProteinTimeseries_live_12L12D_detrended_transparent.svg', format='svg', dpi=600, transparent=True)
#savefig('ProteinTimeseries_live_12L12D_detrended_transparent.png', format='png', dpi=600, transparent=True)
figure(dpi=600)
data = pd.read_excel("../protein_predictions/Clock_proteins_time_series/All clock proteins 12L12D/290319t.xlsx", sheetname='Sheet1')
time=data.iloc[:,0]/3600+8
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(2,2,1)
ylim(1e2,1e6)
for i in range(0,7):
axvspan(12+24*i,24+24*i, color='gray')
errorbar(time,data.iloc[:,1+8:9+8].mean(axis=1),yerr=data.iloc[:,1+8:9+8].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='LHY-NL', color=genes_colors["LHY"])
errorbar(time,data.iloc[:,1+8*3:9+8*3].mean(axis=1),yerr=data.iloc[:,1+8*3:9+8*3].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='CCA1-NL', color=genes_colors["CCA1"])
legend(loc='upper right', fontsize=7)
yscale('log')
ylabel('cps')
subplot(2,2,2)
ylim(1e2,1e6)
errorbar(time,data.iloc[:,1+8*5:9+8*5].mean(axis=1),yerr=data.iloc[:,1+8*5:9+8*5].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='PRR7-NL', color=genes_colors["PRR7"])
errorbar(time,data.iloc[:,1+8*7:9+8*7].mean(axis=1),yerr=data.iloc[:,1+8*7:9+8*7].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='TOC1-NL', color=genes_colors["TOC1"])
#errorbar(time,data.iloc[:,1+8*9:9+8*9].mean(axis=1), label='ELF3-NL 6.2')
legend(loc='upper right', fontsize=7)
yscale('log')
for i in range(0,7):
axvspan(12+24*i,24+24*i, color='gray')
subplot(2,2,3)
ylim(1e2,1e6)
errorbar(time,data.iloc[:,1+8*9:9+8*9].mean(axis=1),yerr=data.iloc[:,1+8*9:9+8*9].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='ELF3-NL lines', color=genes_colors["LUX"])
errorbar(time,data.iloc[:,1+8*10:9+8*10].mean(axis=1),yerr=data.iloc[:,1+8*10:9+8*10].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",color=genes_colors["LUX"])
errorbar(time,data.iloc[:,1+8*11:9+8*11].mean(axis=1),yerr=data.iloc[:,1+8*11:9+8*11].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",color=genes_colors["LUX"])
legend(loc='upper right', fontsize=7)
yscale('log')
for i in range(0,7):
axvspan(12+24*i,24+24*i, color='gray')
ylabel('cps')
xlabel('Time in hours')
subplot(2,2,4)
errorbar(time,data.iloc[:,1+8*9:9+8*9].mean(axis=1),yerr=data.iloc[:,1+8*9:9+8*9].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='ELF3-NL 1', color=genes_colors["LUX"])
#errorbar(time,data.iloc[:,1+8*10:9+8*10].mean(axis=1),yerr=data.iloc[:,1+8*10:9+8*10].sem(axis=1))
errorbar(time,data.iloc[:,1+8*11:9+8*11].mean(axis=1),yerr=data.iloc[:,1+8*11:9+8*11].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='ELF3-NL 2', color=genes_colors["LUX"])
errorbar(time,data.iloc[:,1+8*7:9+8*7].mean(axis=1),yerr=data.iloc[:,1+8*7:9+8*7].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='TOC1-NL', color=genes_colors["TOC1"])
legend(loc='upper right', fontsize=7)
yscale('log')
for i in range(0,7):
axvspan(12+24*i,24+24*i, color='gray')
ylim(1e2,1e6)
xlabel('Time in hours')
savefig('ProteinTimeseries_live_12L12D_to_LL.pdf', format='pdf', dpi=600)
savefig('ProteinTimeseries_live_12L12D_to_LL.svg', format='svg', dpi=600)
savefig('ProteinTimeseries_live_12L12D_to_LL.png', format='png', dpi=600)
savefig('ProteinTimeseries_live_12L12D_to_LL_transparent.pdf', format='pdf', dpi=600, transparent=True)
savefig('ProteinTimeseries_live_12L12D_to_LL_transparent.svg', format='svg', dpi=600, transparent=True)
savefig('ProteinTimeseries_live_12L12D_to_LL_transparent.png', format='png', dpi=600, transparent=True)
figure(dpi=600)
data = pd.read_excel("../protein_predictions/Clock_proteins_time_series/All clock proteins 12L12D/290319t.xlsx", sheetname='Sheet1')
scaled=data
time=data.iloc[:,0]/3600+8
for i in range(0,data.shape[0]):
scaled.iloc[i,1:] = data.iloc[i,1:]*exp(0.02*(time.iloc[i]-8))
data = scaled
time=data.iloc[:,0]/3600+8
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(2,2,1)
ylim(1e2,1e6)
for i in range(0,7):
axvspan(12+24*i,24+24*i, color='gray')
errorbar(time,data.iloc[:,1+8:9+8].mean(axis=1),yerr=data.iloc[:,1+8:9+8].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='LHY-NL', color=genes_colors["LHY"])
errorbar(time,data.iloc[:,1+8*3:9+8*3].mean(axis=1),yerr=data.iloc[:,1+8*3:9+8*3].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='CCA1-NL', color=genes_colors["CCA1"])
legend(loc='lower right', fontsize=7)
yscale('log')
ylabel('cps')
subplot(2,2,2)
ylim(1e2,1e6)
errorbar(time,data.iloc[:,1+8*5:9+8*5].mean(axis=1),yerr=data.iloc[:,1+8*5:9+8*5].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='PRR7-NL', color=genes_colors["PRR7"])
errorbar(time,data.iloc[:,1+8*7:9+8*7].mean(axis=1),yerr=data.iloc[:,1+8*7:9+8*7].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='TOC1-NL', color=genes_colors["TOC1"])
#errorbar(time,data.iloc[:,1+8*9:9+8*9].mean(axis=1), label='ELF3-NL 6.2')
legend(loc='lower right', fontsize=7)
yscale('log')
for i in range(0,7):
axvspan(12+24*i,24+24*i, color='gray')
subplot(2,2,3)
ylim(1e2,1e6)
errorbar(time,data.iloc[:,1+8*9:9+8*9].mean(axis=1),yerr=data.iloc[:,1+8*9:9+8*9].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='ELF3-NL lines', color=genes_colors["LUX"])
errorbar(time,data.iloc[:,1+8*10:9+8*10].mean(axis=1),yerr=data.iloc[:,1+8*10:9+8*10].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",color=genes_colors["LUX"])
errorbar(time,data.iloc[:,1+8*11:9+8*11].mean(axis=1),yerr=data.iloc[:,1+8*11:9+8*11].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",color=genes_colors["LUX"])
legend(loc='lower right', fontsize=7)
yscale('log')
for i in range(0,7):
axvspan(12+24*i,24+24*i, color='gray')
ylabel('cps')
xlabel('Time in hours')
subplot(2,2,4)
errorbar(time,data.iloc[:,1+8*9:9+8*9].mean(axis=1),yerr=data.iloc[:,1+8*9:9+8*9].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='ELF3-NL 1', color=genes_colors["LUX"])
#errorbar(time,data.iloc[:,1+8*10:9+8*10].mean(axis=1),yerr=data.iloc[:,1+8*10:9+8*10].sem(axis=1))
errorbar(time,data.iloc[:,1+8*11:9+8*11].mean(axis=1),yerr=data.iloc[:,1+8*11:9+8*11].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='ELF3-NL 2', color=genes_colors["LUX"])
errorbar(time,data.iloc[:,1+8*7:9+8*7].mean(axis=1),yerr=data.iloc[:,1+8*7:9+8*7].sem(axis=1), fmt="-",lw=2,markeredgecolor="black",label='TOC1-NL', color=genes_colors["TOC1"])
legend(loc='upper right', fontsize=7)
yscale('log')
for i in range(0,7):
axvspan(12+24*i,24+24*i, color='gray')
ylim(1e2,1e6)
xlabel('Time in hours')
savefig('ProteinTimeseries_live_12L12D_to_LL_detrended.pdf', format='pdf', dpi=600)
savefig('ProteinTimeseries_live_12L12D_to_LL_detrended.svg', format='svg', dpi=600)
savefig('ProteinTimeseries_live_12L12D_to_LL_detrended.png', format='png', dpi=600)
savefig('ProteinTimeseries_live_12L12D_to_LL_detrended_transparent.pdf', format='pdf', dpi=600, transparent=True)
savefig('ProteinTimeseries_live_12L12D_to_LL_detrended_transparent.svg', format='svg', dpi=600, transparent=True)
savefig('ProteinTimeseries_live_12L12D_to_LL_detrended_transparent.png', format='png', dpi=600, transparent=True)