Day 2: Protein 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 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/PURE Workshop 1 Worksheets - Tue - Platemap.tsv"
data_path = "../2-data/20250513-204155-pure-timecourse-gfp-workshop-day2-measure-biotek-cdk.txt"
data, platemap = pr.load_platereader_data(data_path, platemap_path)
platemap.head()Loading...
Basic Plots¶
Kinetics¶
Kinetic time traces of every well on the plate
exp_data = data[data["Type"] !="Standard"]
names_to_remove = ['NEB Small Molecule Control']
replace_dict = {'PM Viktoriia':'PM 1',
'PM Riku':'PM 2',
'PM Parsa':'PM 3',
'PM Adriana':'PM 4',
'PM Hanqiao':'PM 5',
'PM Severine':'PM 6',
'PM Jake':'PM 7',
'PM Tyler':'PM 8',
'PM bnext':'PM 9',
'NEB Protein Control': 'Protein control',
'NEB +DNA':'Positive',
'NEB -DNA':'Negative'
}
color_map = {'PM 1':'#ff7f0e',
'PM 2':'#ff7f0e',
'PM 3':'#ff7f0e',
'PM 4':'#ff7f0e',
'PM 5':'#ff7f0e',
'PM 6':'#ff7f0e',
'PM 7':'#ff7f0e',
'PM 8':'#ff7f0e',
'PM 9':'#ff7f0e',
'Protein control':'#9467bd',
'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)
# exp_data = data[data["Type"] != "Standard"]
pr.plot_curves(data_drop, palette=color_map);
ppt_data = data[data["Type"] == "Sample"]
replace_dict = {'PM Viktoriia':'PM 1',
'PM Riku':'PM 2',
'PM Parsa':'PM 3',
'PM Adriana':'PM 4',
'PM Hanqiao':'PM 5',
'PM Severine':'PM 6',
'PM Jake':'PM 7',
'PM Tyler':'PM 8',
'PM bnext':'PM 9',
}
orange_color_map = {'PM 1':'#ff4500',
'PM 2':'#ff6600',
'PM 3':'#ff7f0e',
'PM 4':'#ff8c1a',
'PM 5':'#ff9933',
'PM 6':'#ffa64d',
'PM 7':'#ffb366',
'PM 8':'#ffc080',
'PM 9':'#ffcc99'
}
ppt_data['Name'] = ppt_data['Name'].replace(replace_dict)
pr.plot_curves(ppt_data, palette=orange_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.
pr.plot_steadystate(ppt_data, palette=orange_color_map);
Kinetics Analysis¶
These functions calculate key kinetic parameters of the time series.
pr.plot_kinetics(data)PROVIDING AVERAGED KINETICS
(<seaborn.axisgrid.FacetGrid at 0x310667c50>,
Velocity \
Time Data Max
Name Read
NEB +DNA GFP-Gext 0 days 01:34:26.417182696 48877.26 44025.90
NEB -DNA GFP-Gext 0 days 04:31:27.401688226 56.18 11.50
NEB Protein Control GFP-Gext 0 days 01:51:17.114221283 42502.79 34775.58
PM Adriana GFP-Gext 0 days 02:06:51.274595217 134.23 42.05
PM Hanqiao GFP-Gext 0 days 01:41:10.850735775 183.42 103.13
PM Jake GFP-Gext 0 days 01:39:49.094103574 201.96 95.22
PM Parsa GFP-Gext 0 days 02:17:29.207937283 80.83 19.21
PM Riku GFP-Gext 0 days 01:57:23.886568420 465.41 170.92
PM Severine GFP-Gext 0 days 01:34:52.370763448 124.27 67.95
PM Tyler GFP-Gext 0 days 01:41:16.190767039 203.96 82.09
PM Viktoriia GFP-Gext 0 days 01:52:11.268764261 361.48 140.41
PM bnext GFP-Gext 0 days 01:53:14.906515126 156.17 46.08
plamGFP-0 GFP-Gext 0 days 00:00:00 133051.60 7082001.86
plamGFP-100 GFP-Gext 0 days 00:01:46.760541484 38353.42 32372446.32
plamGFP-125 GFP-Gext 0 days 03:42:46.616232956 26347.31 7526.51
plamGFP-150 GFP-Gext 0 days 00:02:18.460345891 9774.66 48873280.43
plamGFP-20 GFP-Gext 0 days 03:14:59.717073174 70851.57 21457.77
plamGFP-300 GFP-Gext 0 days 02:37:06.115786168 70.90 16.76
plamGFP-50 GFP-Gext 0 days 00:00:59.411688552 53279.47 5432308.19
plamGFP-75 GFP-Gext 0 days 00:01:58.295458574 42752.24 17100341.40
Lag \
Time Data
Name Read
NEB +DNA GFP-Gext 0 days 00:27:53.668080349 320.79
NEB -DNA GFP-Gext -1 days +23:50:34.537452884 46.56
NEB Protein Control GFP-Gext 0 days 00:39:47.120495126 2531.76
PM Adriana GFP-Gext -1 days +22:55:08.596272310 20.02
PM Hanqiao GFP-Gext -1 days +23:48:04.669289858 29.24
PM Jake GFP-Gext -1 days +23:32:33.819449849 14.20
PM Parsa GFP-Gext -1 days +22:11:28.737066866 42.73
PM Riku GFP-Gext -1 days +23:08:26.616367990 -60.46
PM Severine GFP-Gext -1 days +23:43:51.773110407 26.25
PM Tyler GFP-Gext -1 days +23:14:16.965314614 1.21
PM Viktoriia GFP-Gext -1 days +23:18:35.863769486 -25.88
PM bnext GFP-Gext -1 days +22:11:49.890825318 -5.12
plamGFP-0 GFP-Gext -1 days +23:58:52.365766566 31788.36
plamGFP-100 GFP-Gext 0 days 00:01:42.495422721 9089.13
plamGFP-125 GFP-Gext 0 days 00:12:44.455715834 52454.39
plamGFP-150 GFP-Gext 0 days 00:02:17.740344998 2302.25
plamGFP-20 GFP-Gext -1 days +23:56:52.852039764 145237.69
plamGFP-300 GFP-Gext -1 days +22:23:16.438942090 41.28
plamGFP-50 GFP-Gext 0 days 00:00:24.103290819 12694.06
plamGFP-75 GFP-Gext 0 days 00:01:49.295166301 10160.10
Steady State \
Time Data
Name Read
NEB +DNA GFP-Gext 0 days 03:12:24.620227161 92866.79
NEB -DNA GFP-Gext 0 days 11:24:58.516870463 106.75
NEB Protein Control GFP-Gext 0 days 03:36:32.926594704 80755.29
PM Adriana GFP-Gext 0 days 06:49:05.741803552 255.04
PM Hanqiao GFP-Gext 0 days 04:27:41.599319164 348.49
PM Jake GFP-Gext 0 days 04:47:09.894256263 383.72
PM Parsa GFP-Gext 0 days 08:19:39.860826984 153.57
PM Riku GFP-Gext 0 days 06:06:08.173328045 884.27
PM Severine GFP-Gext 0 days 04:18:18.232439133 236.11
PM Tyler GFP-Gext 0 days 05:17:40.026360334 387.53
PM Viktoriia GFP-Gext 0 days 05:38:18.367601587 686.82
PM bnext GFP-Gext 0 days 07:19:13.365532894 296.73
plamGFP-0 GFP-Gext 0 days 00:01:39.572436622 252798.04
plamGFP-100 GFP-Gext 0 days 00:01:53.039731738 72871.50
plamGFP-125 GFP-Gext 0 days 08:51:59.762555712 50059.88
plamGFP-150 GFP-Gext 0 days 00:02:19.520343924 18571.85
plamGFP-20 GFP-Gext 0 days 08:06:39.791445152 134617.98
plamGFP-300 GFP-Gext 0 days 08:50:47.542855826 134.72
plamGFP-50 GFP-Gext 0 days 00:01:51.393399027 101230.99
plamGFP-75 GFP-Gext 0 days 00:02:11.545863424 81229.25
Fit \
params
Name Read
NEB +DNA GFP-Gext [97754.51063650895, 1.8035664261639623, 1.5740...
NEB -DNA GFP-Gext [112.36944429163354, 0.4722787468261858, 4.524...
NEB Protein Control GFP-Gext [85005.57195193, 1.699675167219513, 1.85475395...
PM Adriana GFP-Gext [268.46207292233254, 0.6263386281407859, 2.114...
PM Hanqiao GFP-Gext [366.8343151633258, 1.0770865921417312, 1.6863...
PM Jake GFP-Gext [403.9159443604384, 0.9430190369664002, 1.6636...
PM Parsa GFP-Gext [161.65172399071255, 0.5271351354843768, 2.291...
PM Riku GFP-Gext [930.813261234405, 0.716615521252421, 1.956635...
PM Severine GFP-Gext [248.53893339510455, 1.0851994654925834, 1.581...
PM Tyler GFP-Gext [407.92346868091397, 0.8389118763265808, 1.687...
PM Viktoriia GFP-Gext [722.9684268954095, 0.7824765813510346, 1.8697...
PM bnext GFP-Gext [312.343899776752, 0.5537653062079866, 1.88747...
plamGFP-0 GFP-Gext [266103.2038076093, 106.45496569744432, 0.0, -...
plamGFP-100 GFP-Gext [76706.8402618784, 1688.1126225905132, 0.02965...
plamGFP-125 GFP-Gext [52694.61118184868, 0.5713306056341859, 3.7129...
plamGFP-150 GFP-Gext [19549.3121707083, 10000.0, 0.0384612071922013...
plamGFP-20 GFP-Gext [141703.14085402337, 0.6057105872631826, 3.249...
plamGFP-300 GFP-Gext [141.80677100955884, 0.47276118027938946, 2.61...
plamGFP-50 GFP-Gext [106558.94181151256, 203.91749768371213, 0.016...
plamGFP-75 GFP-Gext [85504.47818697528, 799.9740721811875, 0.03285...
R^2 drift
Name Read
NEB +DNA GFP-Gext 1.00 2027.08
NEB -DNA GFP-Gext 0.63 -5.49
NEB Protein Control GFP-Gext 1.00 3401.39
PM Adriana GFP-Gext 0.99 4.93
PM Hanqiao GFP-Gext 0.99 42.49
PM Jake GFP-Gext 0.99 11.16
PM Parsa GFP-Gext 0.91 -4.24
PM Riku GFP-Gext 1.00 28.88
PM Severine GFP-Gext 0.99 9.86
PM Tyler GFP-Gext 0.99 7.43
PM Viktoriia GFP-Gext 1.00 17.36
PM bnext GFP-Gext 0.98 5.99
plamGFP-0 GFP-Gext 0.80 -3623.87
plamGFP-100 GFP-Gext 0.86 -1918.92
plamGFP-125 GFP-Gext 0.97 -7924.61
plamGFP-150 GFP-Gext 0.87 -733.89
plamGFP-20 GFP-Gext 0.78 -21071.89
plamGFP-300 GFP-Gext 0.08 -15.12
plamGFP-50 GFP-Gext 0.87 -1206.17
plamGFP-75 GFP-Gext 0.90 -1063.35 )
We can also calculate the kinetics and display the parameters as a table.
pr.kinetic_analysis(data)Loading...


