golden = 1.61803398875 less_golden = 1.4 ##################### K180R Mg series # Layout: # A WT, Mg 90 mins # B WT, Mg, 0 mins # C WT, No Mg # D K180R, Mg, 90 mins # E K180R, Mg, 0 mins # F K180R, No Mg # G NP No Mg # H NP Mg WT_Ca_Mg_90mins_clean = BioTek.clean_data_K180R_varying_Mg( ["Kinetic read"], ["A1", "A2", "A3"], "WT with Mg, 90 mins pre-incubation") WT_Ca_Mg_0mins_clean = BioTek.clean_data_K180R_varying_Mg( ["Kinetic read"], ["B1", "B2", "B3"], "WT with Mg, 0 mins pre-incubation") WT_Ca_0Mg_clean = BioTek.clean_data_K180R_varying_Mg(["Kinetic read"], ["C1", "C2", "C3"], "WT, no Mg") K180R_Mg_90_clean = BioTek.clean_data_K180R_varying_Mg( ["Kinetic read"], ["D1", "D2", "D3"], "K180R with Mg, 90 mins pre-incubation") K180R_Mg_0_clean = BioTek.clean_data_K180R_varying_Mg( ["Kinetic read"], ["E1", "E2", "E3"], "K180R with Mg, 0 mins pre-incubation") K180R_No_Mg_clean = BioTek.clean_data_K180R_varying_Mg(["Kinetic read"], ["F1", "F2", "F3"], "K180R without Mg")
# print raw # exit() matplotlib.rcParams.update({'font.size': 8}) matplotlib.rcParams.update({"legend.handlelength": 0.5}) matplotlib.rcParams.update({"legend.frameon": False}) golden = 1.61803398875 ##################### Interface mutants # A NP # B WT # C D325I # D D325A WT_Ca_85K_interface_clean = BioTek.clean_data_interface_mutant_D325A( ["Kinetic read"], ["B1", "B2", "B3"], "WT") D325I_Ca_85K_interface_clean = BioTek.clean_data_interface_mutant_D325A( ["Kinetic read"], ["C1", "C2", "C3"], "D325I") # There was a bug here in the submitted version of the paper where well D2 was listed twice (instead of D2 and D3). In that version of the code, the statistics were computed on D1 + D2 + D2. The bug made data quality look worse than it actually is (i.e. the error bars are much smaller now that all the replicates are included). D325A_Ca_85K_interface_clean = BioTek.clean_data_interface_mutant_D325A( ["Kinetic read"], ["D1", "D2", "D3"], "D325A") WT_Ca_85K_interface = BioTek.normalize_for_plot(WT_Ca_85K_interface_clean) D325I_Ca_85K_interface = BioTek.normalize_for_plot( D325I_Ca_85K_interface_clean) D325A_Ca_85K_interface = BioTek.normalize_for_plot( D325A_Ca_85K_interface_clean) # # D325I Turbidity After 1 mM Calcium (in 85 mM KCl) # fig_D325I_Ca_85K_interface = BioTek.plot_vs_WT(WT_Ca_85K_interface, D325I_Ca_85K_interface, "D325I", xLabel, yLabel, 40, 0.13, "CASQ2 D325I Turbidity", "", "lower right", 1.75, golden)
golden = 1.61803398875 ##################### Interface mutants # A NP # B WT # C D325I # D D50A # E D144A E174A # F E184A E187A # G D348A D350A # H D351A D357A # # 85 mM KCl in wells 7-9, 0 mM KCl in wells 10-12 WT_Ca_85K_interface_clean = BioTek.clean_data_interface_mutants( ["Kinetic read"], ["B7", "B8", "B9"], "WT") # D325I_Ca_85K_interface = BioTek.clean_data_interface_mutants(["Kinetic read"], ["C7", "C8", "C9"], "D325I") D50A_Ca_85K_interface_clean = BioTek.clean_data_interface_mutants( ["Kinetic read"], ["D7", "D8", "D9"], "D50A") D144A_E174A_Ca_85K_interface_clean = BioTek.clean_data_interface_mutants( ["Kinetic read"], ["E7", "E8", "E9"], "D144A E174A") E184A_E187A_Ca_85K_interface_clean = BioTek.clean_data_interface_mutants( ["Kinetic read"], ["F7", "F8", "F9"], "E184A E187A") D348A_D350A_Ca_85K_interface_clean = BioTek.clean_data_interface_mutants( ["Kinetic read"], ["G7", "G8", "G9"], "D348A D350A") D351A_E357A_Ca_85K_interface_clean = BioTek.clean_data_interface_mutants( ["Kinetic read"], ["H7", "H8", "H9"], "D351A E357A") WT_Ca_85K_interface = BioTek.normalize_for_plot(WT_Ca_85K_interface_clean) D50A_Ca_85K_interface = BioTek.normalize_for_plot(D50A_Ca_85K_interface_clean) D144A_E174A_Ca_85K_interface = BioTek.normalize_for_plot(
matplotlib.rcParams.update({"legend.frameon": False}) golden = 1.61803398875 less_golden = 1.4 ##################### CPVT mutants # This was done in a batch with the mutants. Not using those data in this paper. # 85 mM KCl # A7-9 NP, A10-12 D325E # B7-9 WT, B10-12 R251H # C7-9 Y55C, C10-12 S173I # D7-9 F189L, D10-12 K180R # E7-9 P308L, E10-12 R33Q WT_Ca_85K_clean = BioTek.clean_data_CPVT_varying_K(["Kinetic read"], ["B7", "B8", "B9"], "WT") S173I_Ca_85K_clean = BioTek.clean_data_CPVT_varying_K(["Kinetic read"], ["C10", "C11", "C12"], "S173I") K180R_Ca_85K_clean = BioTek.clean_data_CPVT_varying_K(["Kinetic read"], ["D10", "D11", "D12"], "K180R") WT_Ca_85K = BioTek.normalize_for_plot(WT_Ca_85K_clean) S173I_Ca_85K = BioTek.normalize_for_plot(S173I_Ca_85K_clean) K180R_Ca_85K = BioTek.normalize_for_plot(K180R_Ca_85K_clean) # S173I Turbidity After 1 mM Calcium (in 85 mM KCl) fig_S173I_85K = BioTek.plot_vs_WT(WT_Ca_85K, S173I_Ca_85K, "S173I", xLabel, yLabel, 40, 0.13, "CASQ2 S173I Turbidity", "", "upper left",1.75, golden) fig_S173I_85K.savefig("./output/kinetics_CPVT_mutation_S173I_85mM_K.pgf") fig_S173I_85K.savefig("./output/kinetics_CPVT_mutation_S173I_85mM_K.pdf") # K180R Turbidity After 1 mM Calcium (in 85 mM KCl) fig_K180R_85K = BioTek.plot_vs_WT(WT_Ca_85K, K180R_Ca_85K, "K180R", xLabel, yLabel, 40, 0.13, "CASQ2 K180R Turbidity", "", "upper left",1.75, golden) fig_K180R_85K.savefig("./output/kinetics_CPVT_mutation_K180R_85mM_K.pgf")
matplotlib.rcParams.update({'font.size': 8}) matplotlib.rcParams.update({"legend.handlelength": 0.5}) matplotlib.rcParams.update({"legend.frameon": False}) golden = 1.61803398875 less_golden = 1.4 ##################### This was done in a batch with some of Jason's mutants. Ignore those. # A7-9 NP, A10-12 D325E # B7-9 WT, B10-12 R251H # C7-9 Y55C, C10-12 S173I # D7-9 F189L, D10-12 K180R # E7-9 P308L, E10-12 R33Q WT_EDTA_clean = BioTek.clean_data_WT_EDTA(["Kinetic read"], ["B1", "B2", "B3"], "WT") WT_EDTA = BioTek.normalize_for_plot(WT_EDTA_clean) fig_WT_EDTA = BioTek.plot_WT_EDTA(WT_EDTA, "WT", xLabel, yLabel, 750, 0.025, "WT Turbidity After 1 mM Calcium,\n then 1 mM EDTA (in 0 mM KCl)", "0 mM KCl", "upper left",1.75, golden) fig_WT_EDTA.savefig("./output/kinetics_WT_EDTA.pgf") fig_WT_EDTA.savefig("./output/kinetics_WT_EDTA.pdf") ########### Source data for journal. writer = pd.ExcelWriter("./output/source_data_Ext_Data_Fig_1a.xlsx",engine='xlsxwriter') sheet_name_ext_1a = "Ext_Data_Fig_1a" WT_EDTA_clean.to_excel(writer, sheet_name=sheet_name_ext_1a, columns = ["time_seconds","replicate_1","replicate_2","replicate_3"], index = False, startrow = 1)
def plot_mixtures_after_K300(df_WT, df_WT_hemi, df_Mut, df_Mut_Mix, mut_label, title): fig = BioTek.plot_mixtures(df_WT, df_WT_hemi, df_Mut, df_Mut_Mix, mut_label, xLabel, yLabel, 40, 0.2, title, "", "lower right", 1.75, golden) file_stem = title.replace(" ", "_") fig.savefig("./output/kinetics_" + file_stem + ".pgf") fig.savefig("./output/kinetics_" + file_stem + ".pdf")
def plot_vs_WT_TCEP(df_WT_TCEP, df_Mut_TCEP, df_Mut, WT_label, mut1_label, mut2_label, title, legend_position="lower right"): # fig = BioTek.plot_two_vs_WT(df_WT_TCEP, df_Mut_TCEP, df_Mut, mut1_label, mut2_label, xLabel, yLabel, 40, 0.22, title, "", "lower right", 1.75, golden) fig = BioTek.plot_two(df_WT_TCEP, df_Mut_TCEP, WT_label, mut1_label, xLabel, yLabel, 40, 0.22, title, "", legend_position, 1.75, golden) file_stem = title.replace(" ", "_") fig.savefig("./output/kinetics_" + file_stem + ".pgf") fig.savefig("./output/kinetics_" + file_stem + ".pdf")
def plot_vs_WT_MES(df_WT, df_Mut, mut_label, title, legend_position="lower right"): fig = BioTek.plot_vs_WT(df_WT, df_Mut, mut_label, xLabel, yLabel, 40, 0.1, title, "", legend_position, 1.75, golden) file_stem = title.replace(" ", "_") fig.savefig("./output/kinetics_" + file_stem + ".pgf") fig.savefig("./output/kinetics_" + file_stem + ".pdf")
##################### CPVT mutants w/ and w/o Mg, no mixing. # 1-3: no Mg, 4-6 2 mM Mg # A WT WT WT WT WT WT # B R33Q R33Q R33Q R33Q R33Q R33Q # C K180R K180R K180R K180R K180R K180R # D S173I S173I S173I S173I S173I S173I # E D325E D325E D325E D325E D325E D325E # # 7-9 no Mg, 10-12 2 mM Mg # A P308L P308L P308L P308L P308L P308L # B Y55C Y55C Y55C Y55C Y55C Y55C # C R251H R251H R251H R251H R251H R251H # D NP NP NP NP NP NP # E E39K E39K E39K E39K E39K E39K WT_Mg_Ca = BioTek.clean_data_CPVT_Mg_vs_No_Mg(["Kinetic read"], ["A4", "A5", "A6"], "WT") R33Q_Mg_Ca = BioTek.clean_data_CPVT_Mg_vs_No_Mg(["Kinetic read"], ["B4", "B5", "B6"], "R33Q") K180R_Mg_Ca = BioTek.clean_data_CPVT_Mg_vs_No_Mg(["Kinetic read"], ["C4", "C5", "C6"], "K180R") S173I_Mg_Ca = BioTek.clean_data_CPVT_Mg_vs_No_Mg(["Kinetic read"], ["D4", "D5", "D6"], "S173I") D325E_Mg_Ca = BioTek.clean_data_CPVT_Mg_vs_No_Mg(["Kinetic read"], ["E4", "E5", "E6"], "D325E") P308L_Mg_Ca = BioTek.clean_data_CPVT_Mg_vs_No_Mg(["Kinetic read"], ["A10", "A11", "A12"], "P308L") Y55C_Mg_Ca = BioTek.clean_data_CPVT_Mg_vs_No_Mg(["Kinetic read"], ["B10", "B11", "B12"], "Y55C") R251H_Mg_Ca = BioTek.clean_data_CPVT_Mg_vs_No_Mg(["Kinetic read"], ["C10", "C11", "C12"], "R251H") plot_vs_WT_initial_conditions(WT_Mg_Ca, R33Q_Mg_Ca, "R33Q", "CASQ2 R33Q Turbidity", "center") plot_vs_WT_initial_conditions(WT_Mg_Ca, K180R_Mg_Ca, "K180R", "CASQ2 K180R Turbidity", "lower right") plot_vs_WT_initial_conditions(WT_Mg_Ca, S173I_Mg_Ca, "S173I", "CASQ2 S173I Turbidity", "center") plot_vs_WT_initial_conditions(WT_Mg_Ca, D325E_Mg_Ca, "D325E", "CASQ2 D325E Turbidity", "lower right") plot_vs_WT_initial_conditions(WT_Mg_Ca, P308L_Mg_Ca, "P308L", "CASQ2 P308L Turbidity", "center") plot_vs_WT_initial_conditions(WT_Mg_Ca, Y55C_Mg_Ca, "Y55C", "CASQ2 Y55C Turbidity", "center") plot_vs_WT_initial_conditions(WT_Mg_Ca, R251H_Mg_Ca, "R251H", "CASQ2 R251H Turbidity", "center")