In [1]:
#pip install --upgrade --no-deps git+git://github.com/dr3y/murraylab_tools.git@master
import murraylab_tools.biotek as mt_biotek
import os
import pandas as pd
import warnings
import seaborn as sns
import matplotlib.pyplot as plt
warnings.filterwarnings('ignore')
foldname = "biotek_examples"
dataname = "180515_big384wellplate"
suppname = "supp_inductiongrid"
data_filename = os.path.join(foldname,dataname+".csv")
supplementary_filename = os.path.join(foldname,suppname+".csv")
tidy_filename = os.path.join(foldname,dataname+"_tidy.csv")


/Users/sclamons/anaconda/lib/python3.6/importlib/_bootstrap.py:205: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  return f(*args, **kwds)
/Users/sclamons/anaconda/lib/python3.6/importlib/_bootstrap.py:205: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  return f(*args, **kwds)

In [2]:
mt_biotek.tidy_biotek_data(data_filename, supplementary_filename, convert_to_uM = False)


Assuming default volume 10 uL. Make sure this is what you want!

In [3]:
#tidy_filename = os.path.join("180515_big384wellplate_tidy.csv")
df = pd.read_csv(tidy_filename)
df.loc[df.Excitation==580,"Channel"] = "RFP"
df.loc[df.Excitation==485,"Channel"] = "GFP"

In [4]:
plotter = mt_biotek.BiotekCellPlotter(df, "RFP", 100,od_channel = "OD")
#plotter.add_well("L3", "red", "Well M3")
#plotter.add_well("M3", "red", "Well M3")
#plotter.add_well("O3", "red", "Well M3")
#plotter.add_well("P3", "red", "Well M3")
#plotter.add_well("Q3", "red", "Well M3")
#plotter.add_well("N3", "red", "Well M3")
#plotter.add_well("N3", "red", "Well M3")
plotter.add_condition((df.Gain == 100)&(df.Construct=="pQi41")&(df.aTC==250),
                       label = "no pBAD no Lac")
#df.Construct.unique()
plotter.plot()
#df[(df.Gain == -1 )&(df.Construct=="pQi41")&(df.aTC==250)&(df.Well=="B8")]


<Figure size 432x288 with 0 Axes>
Out[4]:
<matplotlib.axes._subplots.AxesSubplot at 0x1107f4be0>

In [5]:
normdf = mt_biotek.normalize(df,norm_channel="OD")
end_df = mt_biotek.window_averages(normdf,15,17,"hours")
end_df.Construct.unique()


Out[5]:
array(['pQi41', 'REC24LB', 'pQi51', 'pQi42', 'pQi52'], dtype=object)

In [6]:
dims = ["Ara","IPTG","aTC"]
#fixedinds = ["Sal"]#,"ATC"]#,"Construct"]
#fixconcs = [500]#,250]
plotdf = end_df.drop(index = end_df[end_df.aTC==200].index)
#we dropped the value which corresponds to a different construct
print(plotdf.aTC.unique())
FPchan = "RFP"
constructs = ['pQi41','pQi42','pQi51','pQi52'] 
mt_biotek.multiPlot(dims,plotdf,[],[],constructs,\
                    FPchan,annot=False,vmin=None,vmax=None,cmap='viridis')
#["REC24M9"]


[500 250 125  25   0]

In [7]:
plt.show()



In [8]:
%timeit normdf = mt_biotek.normalize(df,norm_channel="OD")


1 loop, best of 3: 241 ms per loop

In [ ]: