Day 1: Energy Mix
!pip install nucleus-cdk==0.5.0rc2 | tail -n2Requirement already satisfied: asttokens in /opt/homebrew/anaconda3/lib/python3.12/site-packages (from stack-data->ipython>=6.1.0->ipywidgets==8.*->jupyter-bokeh<5.0.0,>=4.0.5->nucleus-cdk==0.5.0rc2) (2.0.5)
Requirement already satisfied: pure-eval in /opt/homebrew/anaconda3/lib/python3.12/site-packages (from stack-data->ipython>=6.1.0->ipywidgets==8.*->jupyter-bokeh<5.0.0,>=4.0.5->nucleus-cdk==0.5.0rc2) (0.2.2)
from cdk.analysis.cytosol import platereader as pr
import matplotlib.pyplot as plt
import warnings
# Ignore warnings
warnings.filterwarnings('ignore')
# Initialize plotting
pr.plot_setup()Load the data¶
Provide a CSV file containing the data, and a platemap. This function returns both the data with the plate map mapped to it, and the platemap by itself, which is useful for certain tasks.
platemap_path = "../1-design/20250512-OPWS-platemap.tsv"
data_path = "../2-data/20250512-185553-pure-timecourse-gfp-pure-sm-mix-biotek-cdk.txt"
data, platemap = pr.load_platereader_data(data_path, platemap_path)Basic Plots¶
Kinetics¶
Kinetic time traces of every well on the plate
ctrl_data = data[data["Type"]=="Control"]
exp_data = data[data["Type"] !="Standard"]
pr.plot_curves(exp_data, col="Type");
exp_data = data[data["Type"] !="Standard"]
names_to_remove = ['NEB Small Molecule Control']
replace_dict = {'SM Viktoriia':'SM 1',
'SM Riku':'SM 2',
'SM Parsa':'SM 3',
'SM Adriana':'SM 4',
'SM Hanqiao':'SM 5',
'SM Severine':'SM 6',
'SM Jake':'SM 7',
'SM Tyler':'SM 8',
'SM bnext':'SM 9',
'NEB +DNA':'Positive',
'NEB -DNA':'Negative'
}
custom_order = ['no Folinic Acid',
'Folinic Acid',
'Folinic Acid + MTHFS',
'5,10-methenyl-THF',
'Positive',
'Negative']
color_map = {'SM 1':'#ff4500',
'SM 2':'#ff6600',
'SM 3':'#ff7f0e',
'SM 4':'#ff8c1a',
'SM 5':'#ff9933',
'SM 6':'#ffa64d',
'SM 7':'#ffb366',
'SM 8':'#ffc080',
'SM 9':'#ffcc99',
'Positive':'#2ca02c',
'Negative':'#1f77b4'
}
data_drop = exp_data.drop(exp_data[exp_data['Name'].isin(names_to_remove)].index)
data_drop['Name'] = data_drop['Name'].replace(replace_dict)
pr.plot_curves(data_drop, palette=color_map);
Steady state¶
Bar graph of steady-state endpoint of each sample. Steady state is calculated as the maximum fluorescence value over a 3-sample rolling average on the data.
ctrl_data = data[data["Type"]=="Control"]
exp_data = data[data["Type"] !="Standard"]
pr.plot_steadystate(data_drop, palette=color_map);
ctrl_data = data[data["Type"]=="Control"]
exp_data = data[data["Type"] !="Standard"]
pr.plot_curves(exp_data, col="Type");
Kinetics Analysis¶
These functions calculate key kinetic parameters of the time series.
pr.plot_kinetics(data)PROVIDING AVERAGED KINETICS
(<seaborn.axisgrid.FacetGrid at 0x30b49a990>,
Velocity \
Time Data
Name Read
NEB +DNA GFP-Gext 0 days 01:39:31.430706215 69735.45
NEB -DNA GFP-Gext 0 days 06:02:43 80.60
NEB Small Molecule Control GFP-Gext 0 days 00:00:00 45.84
SM Adriana GFP-Gext 0 days 02:16:26.780322514 16657.90
SM Hanqiao GFP-Gext 0 days 02:16:12.445959077 9090.72
SM Jake GFP-Gext 0 days 02:17:03.604461910 11132.98
SM Parsa GFP-Gext 0 days 02:13:52.335808571 7669.92
SM Riku GFP-Gext 0 days 02:12:43.366050645 13209.29
SM Severine GFP-Gext 0 days 02:26:02.691293917 55688.77
SM Tyler GFP-Gext 0 days 02:35:56.376469579 4575.51
SM Viktoriia GFP-Gext 0 days 02:10:22.683343005 6097.14
SM bnext GFP-Gext 0 days 02:12:17.622442495 20243.60
plamGFP-0 GFP-Gext 0 days 06:02:43 33.58
plamGFP-100 GFP-Gext 0 days 00:00:00 46551.58
plamGFP-125 GFP-Gext 0 days 04:08:02.483376100 73897.64
plamGFP-150 GFP-Gext 0 days 04:02:02.504050249 86842.09
plamGFP-20 GFP-Gext 0 days 04:07:43.265912250 9755.52
plamGFP-300 GFP-Gext 0 days 03:54:26.802272520 162083.24
plamGFP-50 GFP-Gext 0 days 04:01:04.590620338 26331.68
plamGFP-75 GFP-Gext 0 days 03:51:34.540019910 41367.21
Lag \
Max Time
Name Read
NEB +DNA GFP-Gext 65007.82 0 days 00:35:11.113823959
NEB -DNA GFP-Gext 14.44 0 days 00:20:22.151278503
NEB Small Molecule Control GFP-Gext 153.29 -1 days +20:48:16.638535075
SM Adriana GFP-Gext 20292.63 0 days 01:27:11.782170538
SM Hanqiao GFP-Gext 11182.65 0 days 01:26:49.180768405
SM Jake GFP-Gext 14395.59 0 days 01:30:37.717888568
SM Parsa GFP-Gext 10653.44 0 days 01:30:40.529123411
SM Riku GFP-Gext 17460.46 0 days 01:27:20.002215160
SM Severine GFP-Gext 43518.53 0 days 01:09:15.313718347
SM Tyler GFP-Gext 5216.48 0 days 01:43:16.825942649
SM Viktoriia GFP-Gext 7724.54 0 days 01:23:00.934509940
SM bnext GFP-Gext 22637.58 0 days 01:18:24.287336099
plamGFP-0 GFP-Gext 3.34 -1 days +20:00:15.454268154
plamGFP-100 GFP-Gext 8610554.83 -1 days +23:59:40.537179698
plamGFP-125 GFP-Gext 21390.79 0 days 00:40:45.749142829
plamGFP-150 GFP-Gext 24848.74 0 days 00:32:21.117941196
plamGFP-20 GFP-Gext 2811.41 0 days 00:39:31.363271787
plamGFP-300 GFP-Gext 46678.47 0 days 00:26:06.399358386
plamGFP-50 GFP-Gext 7654.04 0 days 00:34:39.753624478
plamGFP-75 GFP-Gext 10651.94 -1 days +23:58:33.798838736
Steady State \
Data Time
Name Read
NEB +DNA GFP-Gext 4214.80 0 days 03:14:14.664455922
NEB -DNA GFP-Gext 51.00 0 days 14:26:43.637820370
NEB Small Molecule Control GFP-Gext -0.46 0 days 04:42:15.472944385
SM Adriana GFP-Gext 4852.15 0 days 03:28:57.186192781
SM Hanqiao GFP-Gext 2790.29 0 days 03:28:55.022724735
SM Jake GFP-Gext 3588.05 0 days 03:25:25.040970348
SM Parsa GFP-Gext 2813.82 0 days 03:17:28.044122855
SM Riku GFP-Gext 3955.30 0 days 03:19:32.755365521
SM Severine GFP-Gext 7956.11 0 days 04:19:05.762355925
SM Tyler GFP-Gext 1863.88 0 days 03:53:27.928332794
SM Viktoriia GFP-Gext 1874.94 0 days 03:20:06.361358801
SM bnext GFP-Gext 5029.94 0 days 03:31:37.801401752
plamGFP-0 GFP-Gext 33.78 0 days 20:49:40.121327028
plamGFP-100 GFP-Gext 11110.67 0 days 00:00:28.653543370
plamGFP-125 GFP-Gext 134490.43 0 days 09:13:12.085900942
plamGFP-150 GFP-Gext 160481.48 0 days 09:10:45.065885606
plamGFP-20 GFP-Gext 18012.87 0 days 09:14:14.088441148
plamGFP-300 GFP-Gext 300668.47 0 days 09:01:10.139069586
plamGFP-50 GFP-Gext 49137.38 0 days 09:04:57.789020456
plamGFP-75 GFP-Gext 77952.16 0 days 09:34:37.259664312
\
Data
Name Read
NEB +DNA GFP-Gext 132497.36
NEB -DNA GFP-Gext 153.14
NEB Small Molecule Control GFP-Gext 87.10
SM Adriana GFP-Gext 31650.01
SM Hanqiao GFP-Gext 17272.36
SM Jake GFP-Gext 21152.65
SM Parsa GFP-Gext 14572.85
SM Riku GFP-Gext 25097.64
SM Severine GFP-Gext 105808.66
SM Tyler GFP-Gext 8693.46
SM Viktoriia GFP-Gext 11584.57
SM bnext GFP-Gext 38462.83
plamGFP-0 GFP-Gext 63.80
plamGFP-100 GFP-Gext 88448.00
plamGFP-125 GFP-Gext 140405.52
plamGFP-150 GFP-Gext 164999.97
plamGFP-20 GFP-Gext 18535.49
plamGFP-300 GFP-Gext 307958.15
plamGFP-50 GFP-Gext 50030.20
plamGFP-75 GFP-Gext 78597.70
Fit \
params
Name Read
NEB +DNA GFP-Gext [139470.90504356037, 1.867526193925364, 1.6587...
NEB -DNA GFP-Gext [161.20148649435617, 0.3562608061260868, 6.045...
NEB Small Molecule Control GFP-Gext [91.68438494517216, 10.500992916609253, 0.0, 4...
SM Adriana GFP-Gext [33315.79654144544, 2.4365983244185165, 2.2741...
SM Hanqiao GFP-Gext [18181.431652006082, 2.44118504362779, 2.27012...
SM Jake GFP-Gext [22265.950720515735, 2.5852682562380735, 2.284...
SM Parsa GFP-Gext [15339.84639469259, 2.7779862079065447, 2.2312...
SM Riku GFP-Gext [26418.570375099585, 2.643794749956092, 2.2120...
SM Severine GFP-Gext [111377.53328717715, 1.5627331174249468, 2.434...
SM Tyler GFP-Gext [9151.012691893524, 2.2790338006963835, 2.5989...
SM Viktoriia GFP-Gext [12194.288007696263, 2.533658258039439, 2.1729...
SM bnext GFP-Gext [40487.190057103304, 2.227713818803519, 2.2048...
plamGFP-0 GFP-Gext [67.16201483594043, 0.19918364730517668, 6.045...
plamGFP-100 GFP-Gext [93103.15635370753, 369.9361083448391, 0.0, -1...
plamGFP-125 GFP-Gext [147795.28932366267, 0.5789301166214428, 4.134...
plamGFP-150 GFP-Gext [173684.18323951348, 0.5722739877572592, 4.034...
plamGFP-20 GFP-Gext [19511.036888486025, 0.5763733682027347, 4.128...
plamGFP-300 GFP-Gext [324166.47653743107, 0.575981434339142, 3.9074...
plamGFP-50 GFP-Gext [52663.36580205349, 0.581356056813919, 4.01794...
plamGFP-75 GFP-Gext [82734.42293689334, 0.514994155686395, 3.85959...
R^2 drift
Name Read
NEB +DNA GFP-Gext 1.00 2283.90
NEB -DNA GFP-Gext 0.74 -5.75
NEB Small Molecule Control GFP-Gext 0.85 4.51
SM Adriana GFP-Gext 1.00 1667.23
SM Hanqiao GFP-Gext 1.00 1013.37
SM Jake GFP-Gext 1.00 1342.44
SM Parsa GFP-Gext 1.00 1236.93
SM Riku GFP-Gext 1.00 1338.84
SM Severine GFP-Gext 1.00 1115.49
SM Tyler GFP-Gext 1.00 776.00
SM Viktoriia GFP-Gext 1.00 698.09
SM bnext GFP-Gext 1.00 1613.02
plamGFP-0 GFP-Gext 0.04 -2.57
plamGFP-100 GFP-Gext 0.88 -1837.61
plamGFP-125 GFP-Gext 0.99 -21780.64
plamGFP-150 GFP-Gext 0.99 -25386.09
plamGFP-20 GFP-Gext 0.99 -2912.26
plamGFP-300 GFP-Gext 0.95 -46705.72
plamGFP-50 GFP-Gext 0.99 -7838.91
plamGFP-75 GFP-Gext 0.98 -11218.89 )
We can also calculate the kinetics and display the parameters as a table.
pr.kinetic_analysis(data)Loading...


