DOI: 10.6084/m9.figshare.29207546
title: Visual Behavior 2P - Average change and omission responses

description: OverviewThis dataset includes pre-processed data files containing the single-cell responses to image changes and image omissions for neurons recorded with 2-photon calcium imaging in mice performing a change detection task, as described in Garrett et al., 2023/2025:Version 1 (Garrett et al., 2023): biorxiv.org/content/10.1101/2023.02.14.528085v1Version 3 (Garrett et al., 2025): biorxiv.org/content/10.1101/2023.02.14.528085v3The set of imaging planes included in the processed data files are a subset of the full Visual Behavior 2P dataset (brain-map.org/circuits-behavior/visual-behavior-2p), and were selected to include neurons that were tracked across familiar and novel image sessions, or active and passive sessions, in transgenic mice expressing GCaMP6f in excitatory neurons, Sst inhibitory neurons, or Vip inhibitory neurons.Single cell responses to key task conditions (image changes and image omissions) were extracted from raw data and averaged across trials to produce the processed data files provided here and facilitate easier analysis of neural signals of interest (such as the analyses in Sharafeldin & Choi, 2025 or Aitken et al., 2024).The included trial types, session types, and experimental conditions are described in further detail below.Task conditions and session typesImage changes and image omissionsIn the change detection task, mice view a series of repeated stimuli (250ms per image) with an intervening gray screen (500ms) in between each image presentation, and mice must learn to lick when the identity of the stimulus changes. Thus the job of the mice is to ask "is the image i am seeing now the same or different as the one i saw 500 milliseconds ago". Analysis of image change responses can be used to study expectation, effects of adaptation with repeated stimulus presentation, behavioral choice (changes can be hits or misses) and other sensory and behavioral response properties.The stimulus presentation cadence is highly regular and is repeatedly experienced during behavioral training. Once mice are well trained, unexpected image omissions are included, whereby any repeated image has a 5% likelihood of being omitted (image changes and pre-change images are never omitted). Analysis of omission responses can be used to study the temporal dynamics of sensory responses and expectation violation.Familiar & novel, active & passive sessionsMice are trained on the change detection task with a set of 8 natural scene images that become highly familiar over training. Once well trained, mice perform the task under a 2-photon microscope over multiple sessions, first with the set of familiar images, then with a set of novel images the mice had not seen before. Passive viewing sessions are interleaved with active behavior sessions for both image sets. In passive sessions, mice are sated and view the stimulus in open loop mode in the absence of rewards.Note that for the subset of data included here, stimuli in a given session are either all familiar or all novel images (i.e. familiar and novel images are not interleaved within sessions in this subset of the data). Other session types that include interleaved familiar and novel images are available as part of the full dataset, as described here: allensdk.readthedocs.io/en/latest/visual_behavior_optical_physiology.htmlData filesA Jupyter notebook showing how to load the processed data files is included:<b>load_and_plot_cell_responses.ipynb</b>The processed data files containing average cell responses to image changes or image omissions are:<b>mean_response_df_events_all_is_change_platform_active_passive.pkl</b><b>mean_response_df_events_all_is_change_platform_experiment_table.pkl</b><b>mean_response_df_events_all_omitted_platform_active_passive.pkl</b><b>mean_response_df_events_all_omitted_platform_experiment_table.pkl</b><br>Each file contains one row for each neuron recorded in each session (i.e. there will be multiple rows per 'cell_specimen_id'Averaged response timeseries are provided in 'mean_trace' column in a +/- 2 second window around the onset of image changes or image omissions. Responses are averaged across all trials for each condition, without regard to the image identity before and after changes and omissions.The average response following image changes or image omissions, taken in a 500ms window after event onset, is provided in the 'mean_repsonse' columnMetadata on the location of each imaging plane (cortical depth & visual area) and the session type for each recorded neuron can be obtained by merging the mean response dataframes with the metadata tables described below using the 'ophys_experiment_id' column, which is the unique identifier for each imaging plane recorded in each session.Metadata for the selected set of imaging planes is included in the following files:<b>platform_paper_ophys_experiments_table.csv</b>Contains all imaging planes included in the Garrett et al., novelty study, contributing to the results in all main figuresSession types include Familiar image sessions, Novel image sessions, and Novel+ image sessions (after 1-3 days of exposure to novel images)This set of sessions was used in the main figures of Garrett et. al., 2023/2025<b>platform_active_passive_experiments_table.csv</b>Contains metadata for Familiar image sessions during active behavior as well as passive viewing sessions for the same imaging planes as in the platform_paper_ophys_experiments_table.csvPassive viewing sessions are sessions in which mice were given their daily water prior to the imaging session and the stimulus was played in open loop mode with the lick spout retracted. Thus, mice had no opportunity to respond to stimuli or obtain a reward. This can be used to study the impact of task engagement and behavioral context.This set of active and passive familiar sessions was used to produce Extended Data Figure 7a,b in Garrett et al., 2023, and Supplementary Figure 9c in Garrett et al., 2025Additional data availabilityNote that the full dataset available at brain-map.org (brain-map.org/circuits-behavior/visual-behavior-2p) consists of NWB files with cell traces (dF/F and detected events), behavior variables (running speed, pupil diameter, lick times, etc) and stimulus presentation times across entire imaging sessions, but cell activity traces and stimuli are not time aligned and require additional steps to obtain event aligned responses. The processed data files here contain cell responses after time alignment and trial averaging and are intended to facilitate easier analysis of neural signals of general interest.Code to perform time alignment and extract event aligned cell activity traces for trial types and conditions beyond those included here is available in the `brain_observatory_utilities` package on GitHub: github.com/AllenInstitute/brain_observatory_utilities.A tutorial notebook showing how to load data for individual sessions and obtain event aligned traces is provided: github.com/AllenInstitute/brain_observatory_utilities/blob/main/example_notebooks/using_event_triggered_response_with_visual_behavior_data.ipynbFor questions that cannot be resolved using this documentation, please contact marinag@alleninstitute.org