diff --git a/notebooks/220606_trial_averaged_stimulus_response_dfs.html b/notebooks/220606_trial_averaged_stimulus_response_dfs.html new file mode 100644 index 000000000..8a6a49d24 --- /dev/null +++ b/notebooks/220606_trial_averaged_stimulus_response_dfs.html @@ -0,0 +1,17721 @@ + + +
+ +Using learning_mFISH
branch of visual_behavior_analysis
import os
+import numpy as np
+import pandas as pd
+import matplotlib.pyplot as plt
+
+import seaborn as sns
+sns.set_context('notebook', font_scale=1.5, rc={'lines.markeredgewidth': 2})
+
%load_ext autoreload
+%autoreload 2
+
+%matplotlib inline
+
import visual_behavior.data_access.loading as loading
+
from allensdk.brain_observatory.behavior.behavior_project_cache import VisualBehaviorOphysProjectCache
+
+cache = VisualBehaviorOphysProjectCache.from_lims()
+
experiments_table = cache.get_ophys_experiment_table(passed_only=False)
+experiments_table = experiments_table[experiments_table.project_code=='LearningmFISHTask1A']
+
# what mice do we have?
+print(experiments_table.mouse_id.unique())
+
behavior_sessions = cache.get_behavior_session_table()
+
mouse_id = '603892' # bestest GAD2 mouse
+
+# look at training history for this mouse
+mouse_beh_data = behavior_sessions[behavior_sessions.mouse_id==mouse_id].sort_values(by='date_of_acquisition')
+mouse_beh_data[['mouse_id', 'session_type', 'ophys_experiment_id', 'prior_exposures_to_image_set']]
+
experiment_ids = experiments_table[experiments_table.behavior_session_id==1156064616].index.values
+print(experiment_ids)
+
experiment_id = experiment_ids[0]
+
dataset = cache.get_behavior_ophys_experiment(experiment_id)
+
plt.imshow(dataset.max_projection, cmap='gray')
+
plt.imshow(dataset.segmentation_mask_image, cmap='gray')
+
dataset.dff_traces
+
This VBA helper function calls core functions in mindscope_utilities
, including mindscope_utilities.visual_behavior_ophys.data_formatting.get_stimulus_response_df
and mindscope_utilities
, including mindscope_utilities.visual_behavior_ophys.data_formatting.get_annotated_stimulus_presentations
stimulus_response_df = loading.get_stimulus_response_df(dataset, time_window=[-3, 3.1],
+ interpolate=True, output_sampling_rate=30,
+ data_type='dff', event_type='all')
+
stimulus_response_df
contains the stimulus aligned trace for every cell, for every stimulus presentation in the session, in a defined time window around stimulus onset
stimulus_response_df.head()
+
You can easily plot the population average response for all rows of the table (all stimulus conditions, all cells), or separating out just omissions or just changes
+ +plt.plot(stimulus_response_df.trace_timestamps.mean(), stimulus_response_df.trace.mean())
+plt.xlabel('time relative to stimulus onset (s)')
+plt.ylabel('population response')
+
# changes
+traces = stimulus_response_df[stimulus_response_df.is_change==True].trace.values
+timestamps = stimulus_response_df.trace_timestamps.values[0] # timestamps are shared across all rows
+plt.plot(timestamps, traces.mean())
+plt.xlabel('time after change (s)')
+plt.ylabel('population response')
+
# for each image
+for image_name in stimulus_response_df.image_name.unique():
+ traces = stimulus_response_df[stimulus_response_df.image_name==image_name].trace.values
+ timestamps = stimulus_response_df.trace_timestamps.values[0] # timestamps are shared across all rows
+ plt.plot(timestamps, traces.mean(), label=image_name)
+plt.xlabel('time (s)')
+plt.ylabel('population response')
+plt.legend(bbox_to_anchor=(1,1))
+
There is a lot of metadata for each stimulus presentation
+ +stimulus_response_df.keys()
+
import visual_behavior.visualization.utils as utils
+
# hits vs. misses
+hit_traces = stimulus_response_df[(stimulus_response_df.is_change==True)&
+ (stimulus_response_df.licked==True)].trace.values
+miss_traces = stimulus_response_df[(stimulus_response_df.is_change==True)&
+ (stimulus_response_df.licked==False)].trace.values
+timestamps = stimulus_response_df.trace_timestamps.values[0] # timestamps are shared across all rows
+
+fig, ax = plt.subplots()
+ax = utils.plot_mean_trace(hit_traces, timestamps, legend_label='hit', color='g', xlim_seconds=[-2, 2], ax=ax)
+ax = utils.plot_mean_trace(miss_traces, timestamps, legend_label='miss', color='r', xlim_seconds=[-2, 2], ax=ax)
+ax = utils.plot_flashes_on_trace(ax, timestamps, change=True)
+ax.set_xlabel('time after change (s)')
+ax.set_ylabel('population response')
+
check the documentation for what data_type
values are accepted
help(loading.get_stimulus_response_df)
+
# use a different data_type, and set event_type to just get changes
+running_traces = loading.get_stimulus_response_df(dataset, time_window=[-2, 2.1],
+ interpolate=True, output_sampling_rate=30,
+ data_type='running_speed', event_type='changes')
+
fig, ax = plt.subplots()
+timestamps = running_traces.trace_timestamps.values[0]
+traces = running_traces.trace.values
+ax = utils.plot_mean_trace(traces, timestamps, xlim_seconds=[-2, 2.1], ax=ax)
+ax = utils.plot_flashes_on_trace(ax, timestamps, change=True)
+
# lets look at the first day of novel images
+expts = experiments_table[(experiments_table.mouse_id==mouse_id)&
+ (experiments_table.prior_exposures_to_image_set==0)&
+ (experiments_table.session_type=='OPHYS_4_images_B')]
+
+expts
+
experiment_id = expts.index.values[0]
+
+expts.loc[experiment_id][['targeted_structure', 'imaging_depth', 'cre_line']]
+
# include invalid ROIs so it actually loads something
+dataset = loading.get_ophys_dataset(experiment_id)
+
dataset.dff_traces
+
# set all params here so they can be used later
+time_window = [-3, 3.1]
+interpolate = True
+output_sampling_rate = 30
+data_type = 'dff'
+event_type = 'changes'
+# get stimulus_response_df for changes, with annotated stimulus presentations columns
+stimulus_response_df = loading.get_stimulus_response_df(dataset, time_window=time_window,
+ interpolate=interpolate, output_sampling_rate=output_sampling_rate,
+ data_type=data_type, event_type=event_type)
+
df = stimulus_response_df.copy()
+
# check that 'epoch' column is in the dataframe so it can be used as a condition to group by
+df.keys()
+
import visual_behavior.ophys.response_analysis.utilities as ut
+
# get params for mean df creation from stimulus_response_df
+if 'response_window_duration' in df.keys():
+ response_window_duration = df.response_window_duration.values[0]
+output_sampling_rate = df.frame_rate.unique()[0]
+timestamps = df.trace_timestamps.values[0]
+window_around_timepoint_seconds = [timestamps[0], timestamps[-1]]
+
+# set conditions to average over
+conditions = ['cell_specimen_id', 'epoch']
+# use VBA get_mean_df function to average over trials defined by `conditions`
+# must use same time_window and frame rate as was used to create the stim_response_df
+mdf = ut.get_mean_df(df, conditions=conditions, frame_rate=output_sampling_rate,
+ time_window=time_window, response_window_duration=response_window_duration)
+# get rid of last epoch which doesnt have 10 full minutes in it
+epochs = np.sort(mdf.epoch.unique())
+mdf = mdf[mdf.epoch<epochs[-1]]
+
mdf.head(3)
+
import visual_behavior.visualization.utils as utils
+
cell_specimen_id = mdf.cell_specimen_id.unique()[0]
+epochs = mdf.epoch.unique()
+colors = sns.color_palette('magma', len(epochs))
+fig, ax = plt.subplots()
+for i,epoch in enumerate(epochs):
+ cell_data = mdf[(mdf.cell_specimen_id==cell_specimen_id)&(mdf.epoch==epoch)]
+ ax = utils.plot_mean_trace_from_mean_df(cell_data, frame_rate=output_sampling_rate, color=colors[i],
+ legend_label=epoch, xlims=time_window, ax=ax)
+ ax = utils.plot_flashes_on_trace(ax, timestamps=cell_data.trace_timestamps.values[0], change=True)
+ax.legend(fontsize='x-small', title='epoch', title_fontsize='x-small', loc='upper left')
+ax.set_title('cell_specimen_id: '+str(cell_specimen_id))
+
+
# get some container for special mouse
+mouse_data = experiments_table[experiments_table.mouse_id==mouse_id]
+container_id = mouse_data.ophys_container_id.unique()[0]
+experiment_ids = mouse_data[mouse_data.ophys_container_id==container_id].index.values
+print(len(experiment_ids))
+
Note: this takes a while
+ +# params for stim_response_df
+data_type = 'dff'
+event_type = 'changes'
+time_window = [-2, 2.1]
+interpolate = True
+output_sampling_rate = 30
+
+# conditions to average trials over
+conditions = ['cell_specimen_id', 'image_name']
+
+# loop through experients and aggregated trial averaged dfs
+big_mdf = pd.DataFrame()
+for experiment_id in experiment_ids:
+ try: # not all experiments load so need to to try except
+ print('expt_id:', experiment_id, ',', np.where(experiment_ids==experiment_id)[0][0], 'out of', len(experiment_ids))
+ # get dataset
+ dataset = loading.get_ophys_dataset(experiment_id)
+ # get stimulus_response_df
+ df = loading.get_stimulus_response_df(dataset, data_type=data_type, event_type=event_type, time_window=time_window,
+ interpolate=interpolate, output_sampling_rate=output_sampling_rate)
+ # get params for mean df creation from stimulus_response_df
+ if 'response_window_duration' in df.keys():
+ response_window_duration = df.response_window_duration.values[0]
+ output_sampling_rate = df.frame_rate.unique()[0]
+ timestamps = df.trace_timestamps.values[0]
+ window_around_timepoint_seconds = [timestamps[0], timestamps[-1]]
+ # get trial averaged response for conditions
+ mdf = ut.get_mean_df(df, conditions=conditions, frame_rate=output_sampling_rate,
+ time_window=time_window,
+ response_window_duration=response_window_duration)
+ # add experiment ID to be able to distinguish different sessions
+ mdf['ophys_experiment_id'] = experiment_id
+ # aggregate
+ big_mdf = pd.concat([big_mdf, mdf])
+ except Exception as e:
+ print(e)
+ print('problem for', experiment_id)
+
big_mdf.keys()
+
len(big_mdf)
+
big_mdf = big_mdf.merge(experiments_table, on='ophys_experiment_id')
+len(big_mdf)
+
def condense_session_types(df):
+ df = df.copy()
+ df = df.reset_index()
+ for row in range(len(df)):
+ session_type = df.iloc[row].session_type
+ # all of Training 4 and 5 are basically the same
+ if session_type in ['TRAINING_4_images_A_training', 'TRAINING_5_images_A_epilogue', 'TRAINING_5_images_A_handoff_ready']:
+ df.at[row, 'session_type'] = 'TRAINING_4_images_A'
+ # for the first training session with images, remove the '10uL_reward bit'
+ elif session_type == 'TRAINING_3_images_A_10uL_reward':
+ df.at[row, 'session_type'] = 'TRAINING_3_images_A'
+ # otherwise, keep the same name
+ else:
+ pass
+ return df
+
big_mdf = condense_session_types(big_mdf)
+
import visual_behavior.visualization.ophys.platform_paper_figures as ppf
+
axes_column = 'session_type'
+hue_column = 'image_name'
+palette = sns.color_palette()
+
+ppf.plot_population_averages_for_conditions(big_mdf, data_type, event_type, axes_column, hue_column, palette=palette,
+ suptitle=None, horizontal=True, save_dir=None, folder=None)
+
+
+
from visual_behavior.ophys.io.create_multi_session_df import get_multi_session_df
+
This function will run the steps above iteratively for all sessions for the provided mouse_id and project code:
+ +* load dataset for each experiment
+* generate stimulus_response_df to get stimulus aligned traces
+* compute mean response dataframe averaged over the provided set of conditions
+* concatenate with all other sessions
+
+NOTE: this takes tens of minutes
+ +There is code to do this on the cluster in visual_behavior_analysis.scripts.run_create_multi_session_df.py
project_code = 'LearningmFISHTask1A'
+conditions = ['cell_specimen_id', 'image_name']
+data_type = 'dff'
+event_type = 'changes'
+
+multi_session_df = get_multi_session_df(project_code, mouse_id, conditions, data_type, event_type,
+ time_window=[-3, 3.1], interpolate=True, output_sampling_rate=30, response_window_duration=0.5)
+
+
+
+
+
+
\n", + " | mouse_id | \n", + "session_type | \n", + "ophys_experiment_id | \n", + "prior_exposures_to_image_set | \n", + "
---|---|---|---|---|
behavior_session_id | \n", + "\n", + " | \n", + " | \n", + " | \n", + " |
1153004187 | \n", + "603892 | \n", + "TRAINING_0_gratings_autorewards_15min | \n", + "[1153099555, 1153099558, 1153099559, 115309956... | \n", + "NaN | \n", + "
1153543065 | \n", + "603892 | \n", + "TRAINING_1_gratings | \n", + "[1153662768, 1153662770, 1153662771, 115366277... | \n", + "NaN | \n", + "
1153793704 | \n", + "603892 | \n", + "TRAINING_1_gratings | \n", + "[1153920566, 1153920568, 1153920569, 115392057... | \n", + "NaN | \n", + "
1154034257 | \n", + "603892 | \n", + "TRAINING_2_gratings_flashed | \n", + "[1154288458, 1154288461, 1154288463, 115428846... | \n", + "NaN | \n", + "
1154262140 | \n", + "603892 | \n", + "TRAINING_2_gratings_flashed | \n", + "[1154369474, 1154369476, 1154369477, 115436947... | \n", + "0.0 | \n", + "
1154472358 | \n", + "603892 | \n", + "TRAINING_3_images_A_10uL_reward | \n", + "[1154572286, 1154572288, 1154572289, 115457229... | \n", + "1.0 | \n", + "
1155069835 | \n", + "603892 | \n", + "TRAINING_3_images_A_10uL_reward | \n", + "[1155282289, 1155282293, 1155282294, 115528229... | \n", + "2.0 | \n", + "
1155426295 | \n", + "603892 | \n", + "TRAINING_4_images_A_training | \n", + "[1155524637, 1155524639, 1155524640, 115552464... | \n", + "3.0 | \n", + "
1155634565 | \n", + "603892 | \n", + "TRAINING_5_images_A_epilogue | \n", + "[1155760201, 1155760204, 1155760205, 115576020... | \n", + "4.0 | \n", + "
1155862755 | \n", + "603892 | \n", + "TRAINING_5_images_A_handoff_ready | \n", + "[1155949165, 1155949168, 1155949169, 115594917... | \n", + "5.0 | \n", + "
1156064616 | \n", + "603892 | \n", + "OPHYS_1_images_A | \n", + "[1156751800, 1156751803, 1156751804, 115675180... | \n", + "6.0 | \n", + "
1156620226 | \n", + "603892 | \n", + "OPHYS_1_images_A | \n", + "[1156776068, 1156776070, 1156776071, 115677607... | \n", + "7.0 | \n", + "
1156884393 | \n", + "603892 | \n", + "OPHYS_4_images_B | \n", + "[1156990779, 1156990784, 1156990789, 115699079... | \n", + "0.0 | \n", + "
1157136612 | \n", + "603892 | \n", + "OPHYS_4_images_B | \n", + "[1157244780, 1157244782, 1157244783, 115724478... | \n", + "1.0 | \n", + "
1157372172 | \n", + "603892 | \n", + "OPHYS_6_images_B | \n", + "[1157477414, 1157477416, 1157477417, 115747741... | \n", + "2.0 | \n", + "
1157575929 | \n", + "603892 | \n", + "OPHYS_6_images_B | \n", + "[1157708779, 1157708781, 1157708782, 115770878... | \n", + "3.0 | \n", + "
\n", + " | cell_roi_id | \n", + "dff | \n", + "
---|---|---|
cell_specimen_id | \n", + "\n", + " | \n", + " |
1157152946 | \n", + "1158443134 | \n", + "[1.7956229820633356, 1.7855465485410342, 1.387... | \n", + "
1167392300 | \n", + "1158443136 | \n", + "[4.6408898183455385, 5.3055226028490585, 3.562... | \n", + "
1157153040 | \n", + "1158443137 | \n", + "[1.86498742629028, 1.3428503785057742, 1.00591... | \n", + "
1157152999 | \n", + "1158443143 | \n", + "[1.9320210116782677, 1.6513325990239662, 0.982... | \n", + "
1167392307 | \n", + "1158443149 | \n", + "[3.7695539807775593, 2.99196758556438, 2.92723... | \n", + "
1157152989 | \n", + "1158443156 | \n", + "[2.3044750898421107, 2.213317466747521, 1.5230... | \n", + "
1157152952 | \n", + "1158443157 | \n", + "[3.151107572899905, 2.0914650518660785, 2.2618... | \n", + "
1157152967 | \n", + "1158443160 | \n", + "[1.0118235004632778, 1.2237537530888847, 0.671... | \n", + "
1157152838 | \n", + "1158443162 | \n", + "[2.7104277552009055, 2.3025511271370673, 2.030... | \n", + "
1157153085 | \n", + "1158443165 | \n", + "[2.7264602911565303, 2.7098134227023056, 2.713... | \n", + "
1157152854 | \n", + "1158443167 | \n", + "[5.106896608499884, 4.086827308728901, 3.41907... | \n", + "
1157152993 | \n", + "1158443174 | \n", + "[1.4537320506408704, 1.6752925209526544, 1.326... | \n", + "
1157152934 | \n", + "1158443178 | \n", + "[0.7327016564004085, 0.9744498065718734, 0.735... | \n", + "
1157152848 | \n", + "1158443182 | \n", + "[2.552677441679444, 2.208307959680402, 1.72310... | \n", + "
1157153002 | \n", + "1158443183 | \n", + "[2.634607265350429, 2.030799524784848, 1.96075... | \n", + "
1157152863 | \n", + "1158443188 | \n", + "[2.5561709926073126, 2.20100917839999, 1.87895... | \n", + "
1157152940 | \n", + "1158443190 | \n", + "[0.5955948321878124, 0.6319295811135481, 0.362... | \n", + "
1157152884 | \n", + "1158443194 | \n", + "[1.7294731637146477, 1.1192965884821509, 1.230... | \n", + "
1157152922 | \n", + "1158443195 | \n", + "[1.5357136367662858, 1.1643502403866912, 0.908... | \n", + "
1157153071 | \n", + "1158443197 | \n", + "[1.6317978858771232, 1.4646353737712814, 0.990... | \n", + "
1167392324 | \n", + "1158443199 | \n", + "[2.0329831800484763, 1.6030086329648214, 1.548... | \n", + "
1157152834 | \n", + "1158443205 | \n", + "[2.3152891053205438, 1.65738012759169, 1.63434... | \n", + "
1157152872 | \n", + "1158443208 | \n", + "[2.2877347439296525, 2.7624630263400753, 2.398... | \n", + "
1157152907 | \n", + "1158443223 | \n", + "[2.227587737370925, 1.6921453294390625, 1.7207... | \n", + "
1157152910 | \n", + "1158443226 | \n", + "[0.8240220897816866, 1.0151355421925268, 1.034... | \n", + "
\n", + " | stimulus_presentations_id | \n", + "cell_specimen_id | \n", + "trace | \n", + "trace_timestamps | \n", + "mean_response | \n", + "baseline_response | \n", + "p_value_gray_screen | \n", + "ophys_frame_rate | \n", + "data_type | \n", + "event_type | \n", + "... | \n", + "engaged | \n", + "engagement_state | \n", + "time_from_last_change | \n", + "pre_change | \n", + "pre_omitted | \n", + "post_omitted | \n", + "licked | \n", + "lick_on_next_flash | \n", + "frame_rate | \n", + "exclude_invalid_rois | \n", + "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", + "0 | \n", + "1157152834 | \n", + "[-0.07069653720906108, -0.07207795680055795, -... | \n", + "[-3.0, -2.966666666666667, -2.933333333333333,... | \n", + "0.052041 | \n", + "-0.044729 | \n", + "0.2705 | \n", + "30 | \n", + "dff | \n", + "all | \n", + "... | \n", + "False | \n", + "disengaged | \n", + "NaN | \n", + "False | \n", + "False | \n", + "NaN | \n", + "True | \n", + "True | \n", + "30 | \n", + "True | \n", + "
1 | \n", + "0 | \n", + "1157152838 | \n", + "[-0.05911301125485008, -0.02572556703543228, 0... | \n", + "[-3.0, -2.966666666666667, -2.933333333333333,... | \n", + "0.093860 | \n", + "-0.064363 | \n", + "0.0000 | \n", + "30 | \n", + "dff | \n", + "all | \n", + "... | \n", + "False | \n", + "disengaged | \n", + "NaN | \n", + "False | \n", + "False | \n", + "NaN | \n", + "True | \n", + "True | \n", + "30 | \n", + "True | \n", + "
2 | \n", + "0 | \n", + "1157152848 | \n", + "[-0.04550768470120481, -0.04748771288143631, -... | \n", + "[-3.0, -2.966666666666667, -2.933333333333333,... | \n", + "0.005496 | \n", + "-0.036429 | \n", + "0.5260 | \n", + "30 | \n", + "dff | \n", + "all | \n", + "... | \n", + "False | \n", + "disengaged | \n", + "NaN | \n", + "False | \n", + "False | \n", + "NaN | \n", + "True | \n", + "True | \n", + "30 | \n", + "True | \n", + "
3 | \n", + "0 | \n", + "1157152854 | \n", + "[0.0023735727893200442, -0.030777591201634084,... | \n", + "[-3.0, -2.966666666666667, -2.933333333333333,... | \n", + "0.017920 | \n", + "-0.145822 | \n", + "0.0449 | \n", + "30 | \n", + "dff | \n", + "all | \n", + "... | \n", + "False | \n", + "disengaged | \n", + "NaN | \n", + "False | \n", + "False | \n", + "NaN | \n", + "True | \n", + "True | \n", + "30 | \n", + "True | \n", + "
4 | \n", + "0 | \n", + "1157152863 | \n", + "[-0.052457907697404965, -0.05176138603558173, ... | \n", + "[-3.0, -2.966666666666667, -2.933333333333333,... | \n", + "0.049606 | \n", + "-0.117652 | \n", + "0.2214 | \n", + "30 | \n", + "dff | \n", + "all | \n", + "... | \n", + "False | \n", + "disengaged | \n", + "NaN | \n", + "False | \n", + "False | \n", + "NaN | \n", + "True | \n", + "True | \n", + "30 | \n", + "True | \n", + "
5 rows × 54 columns
\n", + "\n", + " | equipment_name | \n", + "donor_id | \n", + "full_genotype | \n", + "mouse_id | \n", + "reporter_line | \n", + "driver_line | \n", + "sex | \n", + "age_in_days | \n", + "foraging_id | \n", + "cre_line | \n", + "... | \n", + "session_name | \n", + "isi_experiment_id | \n", + "imaging_depth | \n", + "targeted_structure | \n", + "published_at | \n", + "date_of_acquisition | \n", + "session_type | \n", + "experience_level | \n", + "passive | \n", + "image_set | \n", + "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ophys_experiment_id | \n", + "\n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " |
1156990779 | \n", + "MESO.2 | \n", + "1142290477 | \n", + "Gad2-IRES-Cre/wt;Slc32a1-T2A-FlpO/wt;Ai195(TIT... | \n", + "603892 | \n", + "Ai195(TIT2L-GC7s-ICF-IRES-tTA2)-hyg | \n", + "[Slc32a1-T2A-FlpO, Gad2-IRES-Cre] | \n", + "M | \n", + "129.0 | \n", + "4ff292b1-07ad-4b42-9769-d154736e1398 | \n", + "Gad2-IRES-Cre | \n", + "... | \n", + "20220208_603892_ophys4 | \n", + "1145918593 | \n", + "165 | \n", + "VISp | \n", + "NaT | \n", + "2022-02-08 10:36:49 | \n", + "OPHYS_4_images_B | \n", + "Novel 1 | \n", + "False | \n", + "B | \n", + "
1156990784 | \n", + "MESO.2 | \n", + "1142290477 | \n", + "Gad2-IRES-Cre/wt;Slc32a1-T2A-FlpO/wt;Ai195(TIT... | \n", + "603892 | \n", + "Ai195(TIT2L-GC7s-ICF-IRES-tTA2)-hyg | \n", + "[Slc32a1-T2A-FlpO, Gad2-IRES-Cre] | \n", + "M | \n", + "129.0 | \n", + "4ff292b1-07ad-4b42-9769-d154736e1398 | \n", + "Gad2-IRES-Cre | \n", + "... | \n", + "20220208_603892_ophys4 | \n", + "1145918593 | \n", + "265 | \n", + "VISp | \n", + "NaT | \n", + "2022-02-08 10:36:49 | \n", + "OPHYS_4_images_B | \n", + "Novel 1 | \n", + "False | \n", + "B | \n", + "
1156990789 | \n", + "MESO.2 | \n", + "1142290477 | \n", + "Gad2-IRES-Cre/wt;Slc32a1-T2A-FlpO/wt;Ai195(TIT... | \n", + "603892 | \n", + "Ai195(TIT2L-GC7s-ICF-IRES-tTA2)-hyg | \n", + "[Slc32a1-T2A-FlpO, Gad2-IRES-Cre] | \n", + "M | \n", + "129.0 | \n", + "4ff292b1-07ad-4b42-9769-d154736e1398 | \n", + "Gad2-IRES-Cre | \n", + "... | \n", + "20220208_603892_ophys4 | \n", + "1145918593 | \n", + "165 | \n", + "VISl | \n", + "NaT | \n", + "2022-02-08 10:36:49 | \n", + "OPHYS_4_images_B | \n", + "Novel 1 | \n", + "False | \n", + "B | \n", + "
1156990795 | \n", + "MESO.2 | \n", + "1142290477 | \n", + "Gad2-IRES-Cre/wt;Slc32a1-T2A-FlpO/wt;Ai195(TIT... | \n", + "603892 | \n", + "Ai195(TIT2L-GC7s-ICF-IRES-tTA2)-hyg | \n", + "[Slc32a1-T2A-FlpO, Gad2-IRES-Cre] | \n", + "M | \n", + "129.0 | \n", + "4ff292b1-07ad-4b42-9769-d154736e1398 | \n", + "Gad2-IRES-Cre | \n", + "... | \n", + "20220208_603892_ophys4 | \n", + "1145918593 | \n", + "265 | \n", + "VISl | \n", + "NaT | \n", + "2022-02-08 10:36:49 | \n", + "OPHYS_4_images_B | \n", + "Novel 1 | \n", + "False | \n", + "B | \n", + "
1156990801 | \n", + "MESO.2 | \n", + "1142290477 | \n", + "Gad2-IRES-Cre/wt;Slc32a1-T2A-FlpO/wt;Ai195(TIT... | \n", + "603892 | \n", + "Ai195(TIT2L-GC7s-ICF-IRES-tTA2)-hyg | \n", + "[Slc32a1-T2A-FlpO, Gad2-IRES-Cre] | \n", + "M | \n", + "129.0 | \n", + "4ff292b1-07ad-4b42-9769-d154736e1398 | \n", + "Gad2-IRES-Cre | \n", + "... | \n", + "20220208_603892_ophys4 | \n", + "1145918593 | \n", + "165 | \n", + "VISal | \n", + "NaT | \n", + "2022-02-08 10:36:49 | \n", + "OPHYS_4_images_B | \n", + "Novel 1 | \n", + "False | \n", + "B | \n", + "
1156990807 | \n", + "MESO.2 | \n", + "1142290477 | \n", + "Gad2-IRES-Cre/wt;Slc32a1-T2A-FlpO/wt;Ai195(TIT... | \n", + "603892 | \n", + "Ai195(TIT2L-GC7s-ICF-IRES-tTA2)-hyg | \n", + "[Slc32a1-T2A-FlpO, Gad2-IRES-Cre] | \n", + "M | \n", + "129.0 | \n", + "4ff292b1-07ad-4b42-9769-d154736e1398 | \n", + "Gad2-IRES-Cre | \n", + "... | \n", + "20220208_603892_ophys4 | \n", + "1145918593 | \n", + "265 | \n", + "VISal | \n", + "NaT | \n", + "2022-02-08 10:36:49 | \n", + "OPHYS_4_images_B | \n", + "Novel 1 | \n", + "False | \n", + "B | \n", + "
1156990811 | \n", + "MESO.2 | \n", + "1142290477 | \n", + "Gad2-IRES-Cre/wt;Slc32a1-T2A-FlpO/wt;Ai195(TIT... | \n", + "603892 | \n", + "Ai195(TIT2L-GC7s-ICF-IRES-tTA2)-hyg | \n", + "[Slc32a1-T2A-FlpO, Gad2-IRES-Cre] | \n", + "M | \n", + "129.0 | \n", + "4ff292b1-07ad-4b42-9769-d154736e1398 | \n", + "Gad2-IRES-Cre | \n", + "... | \n", + "20220208_603892_ophys4 | \n", + "1145918593 | \n", + "160 | \n", + "VISam | \n", + "NaT | \n", + "2022-02-08 10:36:49 | \n", + "OPHYS_4_images_B | \n", + "Novel 1 | \n", + "False | \n", + "B | \n", + "
1156990817 | \n", + "MESO.2 | \n", + "1142290477 | \n", + "Gad2-IRES-Cre/wt;Slc32a1-T2A-FlpO/wt;Ai195(TIT... | \n", + "603892 | \n", + "Ai195(TIT2L-GC7s-ICF-IRES-tTA2)-hyg | \n", + "[Slc32a1-T2A-FlpO, Gad2-IRES-Cre] | \n", + "M | \n", + "129.0 | \n", + "4ff292b1-07ad-4b42-9769-d154736e1398 | \n", + "Gad2-IRES-Cre | \n", + "... | \n", + "20220208_603892_ophys4 | \n", + "1145918593 | \n", + "265 | \n", + "VISam | \n", + "NaT | \n", + "2022-02-08 10:36:49 | \n", + "OPHYS_4_images_B | \n", + "Novel 1 | \n", + "False | \n", + "B | \n", + "
8 rows × 31 columns
\n", + "\n", + " | cell_roi_id | \n", + "dff | \n", + "
---|---|---|
cell_specimen_id | \n", + "\n", + " | \n", + " |
1157152993 | \n", + "1158441063 | \n", + "[1.7447209311456708, 1.5865674673630625, 1.189... | \n", + "
1157152952 | \n", + "1158441079 | \n", + "[0.9821773875653413, 0.6815864160489754, 0.875... | \n", + "
1157152838 | \n", + "1158441086 | \n", + "[0.9440638128741594, 0.6928306142067617, 0.923... | \n", + "
1157153061 | \n", + "1158441126 | \n", + "[0.4295891950014597, 0.12311089148520898, 0.17... | \n", + "
1157152917 | \n", + "1158441136 | \n", + "[0.5040607683989946, 0.1996595831637253, 0.217... | \n", + "
1157152910 | \n", + "1158441151 | \n", + "[0.34777108353096425, 0.22056436698997897, 0.1... | \n", + "
1167392461 | \n", + "1158441182 | \n", + "[1.700689762686462, 1.5516912827058043, 1.1277... | \n", + "
1157153043 | \n", + "1158441211 | \n", + "[0.6829429581189924, 0.5359614482912533, 0.860... | \n", + "
1157152934 | \n", + "1158441276 | \n", + "[0.34941670363725896, 0.5404771402225802, 0.33... | \n", + "
1157152872 | \n", + "1158441280 | \n", + "[1.5672415079239674, 1.2482531712780118, 1.081... | \n", + "
\n", + " | cell_specimen_id | \n", + "epoch | \n", + "mean_response | \n", + "sem_response | \n", + "mean_trace | \n", + "sem_trace | \n", + "trace_timestamps | \n", + "mean_responses | \n", + "mean_baseline | \n", + "sem_baseline | \n", + "response_window_duration | \n", + "fano_factor | \n", + "peak_response | \n", + "time_to_peak | \n", + "p_value | \n", + "sd_over_baseline | \n", + "fraction_significant_p_value_gray_screen | \n", + "reliability | \n", + "correlation_values | \n", + "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", + "1157152838 | \n", + "0 | \n", + "0.046280 | \n", + "0.008041 | \n", + "[-0.012199797613191779, -0.012247351090620482,... | \n", + "[0.015650344384645958, 0.014990897708778022, 0... | \n", + "[-3.0, -2.966666666666668, -2.9333333333333327... | \n", + "[0.060822094999087514, 0.0717100039089949, 0.1... | \n", + "-0.009901 | \n", + "0.010590 | \n", + "0.5 | \n", + "1.737402 | \n", + "0.076979 | \n", + "0.266667 | \n", + "6.191129e-09 | \n", + "3.883407 | \n", + "0.440000 | \n", + "0.030802 | \n", + "[0.18707681181671063, 0.7166727421288949, 0.28... | \n", + "
1 | \n", + "1157152838 | \n", + "1 | \n", + "0.050308 | \n", + "0.006432 | \n", + "[0.011839090833916007, 0.012669363836058095, 0... | \n", + "[0.012479521220842157, 0.01250013591873294, 0.... | \n", + "[-3.0, -2.966666666666668, -2.9333333333333336... | \n", + "[0.1159659258776442, -0.01590334638979228, 0.0... | \n", + "0.016427 | \n", + "0.007654 | \n", + "0.5 | \n", + "1.468822 | \n", + "0.089437 | \n", + "0.233333 | \n", + "1.551863e-06 | \n", + "9.941990 | \n", + "0.424242 | \n", + "0.098395 | \n", + "[-0.5203967795194145, 0.8731867866305196, -0.5... | \n", + "
2 | \n", + "1157152838 | \n", + "2 | \n", + "0.063059 | \n", + "0.006859 | \n", + "[0.01616523979730032, 0.015763250202315136, 0.... | \n", + "[0.013673149659509562, 0.013116437982355919, 0... | \n", + "[-3.0, -2.966666666666668, -2.933333333333334,... | \n", + "[0.04478745017078148, 0.02911787742961676, 0.0... | \n", + "0.005728 | \n", + "0.006828 | \n", + "0.5 | \n", + "1.287000 | \n", + "0.102716 | \n", + "0.233333 | \n", + "7.256622e-08 | \n", + "8.613148 | \n", + "0.514286 | \n", + "0.131187 | \n", + "[-0.8626962860970627, -0.6452970913391443, 0.5... | \n", + "