# ------------------------------- alpha_cell_size_curve = [] beta_cell_size_curve = [] volPM_typical = 2 * 30E-6**2 + 4 * 30E-6 * 8E-6 volCP_typical = 8E-6 * 30E-6**2 radii = list(np.logspace(np.log10(30E-7), np.log10(30E-5))) for radius in radii: volPM = 2 * radius**2 + 4 * radius * 8E-6 volCP = 8E-6 * radius**2 # Alpha response = Mixed_Model.timecourse( list(np.linspace(0, 60)), 'TotalpSTAT', parameters={ 'Ia': 10E-12 * 6.022E23 * 1E-5, 'Ib': 0, 'R1': (volPM / volPM_typical) * 1200, 'R2': (volPM / volPM_typical) * 4920, 'S': (volCP / volCP_typical) * 1E4 }, return_type='list', scale_factor=scale_factor)['TotalpSTAT'][-1] normalized_response = response / ((volCP / volCP_typical) * 1E4) alpha_cell_size_curve.append(normalized_response) # Beta response = Mixed_Model.timecourse( list(np.linspace(0, 60)), 'TotalpSTAT', parameters={ 'Ib': 10 * 1E-12 * 6.022E23 * 1E-5, 'Ia': 0, 'R1': (volPM / volPM_typical) * 1200,
dr_plot_mean_fit.show_figure(save_flag=False) # ------------------------------- # Plot time course paper figure # ------------------------------- alpha_palette = sns.color_palette("Reds", 8) beta_palette = sns.color_palette("Greens", 8) # Simulate time courses alpha_time_courses = [] for d in doses_alpha: alpha_time_courses.append( Mixed_Model.timecourse(list(np.linspace(0, 60, 30)), 'TotalpSTAT', { 'Ia': d * 6.022E23 * 1E-5 * 1E-12, 'Ib': 0 }, return_type='dataframe', dataframe_labels=['Alpha', d])) beta_time_courses = [] for d in doses_beta: beta_time_courses.append( Mixed_Model.timecourse(list(np.linspace(0, 60, 30)), 'TotalpSTAT', { 'Ib': d * 6.022E23 * 1E-5 * 1E-12, 'Ia': 0 }, return_type='dataframe', dataframe_labels=['Beta', d])) # Scale simulations for i in range(30):
if t not in beta_mask: new_fit.add_trajectory(Sagar_data, t, 'errorbar', beta_palette[idx], (0, 1), 'Beta', dn=1) new_fit.add_trajectory(Sagar_data, t, 'scatter', 'go', (0, 1), 'Beta', dn=1, color=beta_palette[idx], label='Beta ' + str(t)) new_fit.show_figure(save_flag=False) print(Mixed_Model.parameters) # ---------------------------------- # Time course plot # ---------------------------------- # Simulate time courses alpha_time_courses = [] for d in [10, 90, 600, 4000, 8000]: alpha_time_courses.append(Mixed_Model.timecourse(list(linspace(0, 60, 25)), 'TotalpSTAT', {'Ia': d * 6.022E23 * 1E-5 * 1E-12, 'Ib': 0}, return_type='dataframe', dataframe_labels=['Alpha', d])) beta_time_courses = [] for d in [10, 90, 600, 2000, 11000]: beta_time_courses.append(Mixed_Model.timecourse(list(linspace(0, 60, 25)), 'TotalpSTAT', {'Ib': d * 6.022E23 * 1E-5 * 1E-12, 'Ia': 0}, return_type='dataframe', dataframe_labels=['Beta', d])) # Scale simulations for i in range(25): for j in range(5): alpha_time_courses[j].loc['Alpha'].iloc[:, i] = alpha_time_courses[j].loc['Alpha'].iloc[:, i].apply(scale_data) beta_time_courses[j].loc['Beta'].iloc[:, i] = beta_time_courses[j].loc['Beta'].iloc[:, i].apply(scale_data) # Turn into IfnData objects alpha_IfnData_objects = [] beta_IfnData_objects = [] for j in range(5):