Single-photon calcium imaging in mice performing a nine-day behavioral sequence.

A, Example neuron regions-of-interest from three recordings days (separate colors) from one mouse, before (left) and after (right) alignment. B, The percentage of neurons that were successfully registered on the day indicated to any other recording day. C, Schedule of behavioral task and recordings: all mice performed a nine-day sequence alternating Turn Right and Go East tasks in three-day increments. Two-Maze mice performed Go East maze on a second maze, and One-Maze mice performed the whole sequence on a single maze. D, Performance of individual mice in a 10-trial sliding window separately for trials starting from North and South. Vertical dashed lines separate recording days, with the maximum number of trials from that day for one start arm indicated at the end of that segment.

More remapping from Turn Right 1 to Turn Right 1 in One-Maze Mice than in Two-Maze Mice

A, Spatial calcium event likelihood maps showing activity from a large number of cells, pooled across animals from each group, from example days 3 and day 8. Each row in a plot is the activity from a single cell, normalized to its own maximum. Rate maps were sorted by maze arm with maximum firing likelihood and center-of-mass of firing within each arm. Rates are normalized to activity on day 3; maps from day 8 are the same cells in the same sort order as on day 3. B, Left, histograms for rho values of correlations of single neuron calcium event likelihood maps across all days pairs from Turn Right 1 to Turn Right 2. Top, One-Maze, bottom, Two-Maze. Right, cumulative density plot of same rho values. C, Same as B, but for the absolute proportion change of the mean within-arm calcium event likelihood. D, Same as B, but for the absolute value of the within-arm shift of the calcium event center-of-mass. E, Same as B, but for the change in the modulation index score. F, Population vector correlations, averaged across all mice in One-Maze (left) and Two-Maze (right) groups. G, Average population vector correlation using activity from within a day, comparing each spatial bin to each other bin; same bin comparisons are set to zero to aid visualization. H, Absolute value of differences in within-day bin-to-bin population correlations from G. I, Cumulative proportion of correlation differences from H. J, Difference of correlation change in each bin pair between One-Maze and Two-Maze activity; blue indicates greater difference from Turn Right 1 to Turn Right 1 in the One-Maze group, red indicates greater difference in the Two-Maze group. Bin-pairs that have an individually significant (p<0.05) difference between groups of animals are indicated with green or purple * for greater difference respectively in One-Maze or Two-Maze groups. *p<0.05, ** p<0.01, *p<0.001

Greater preservation of frame-by-frame activity correlations across neurons in Two-Maze mice than in One-Maze mice

A, Raster plots for three example cells from the same recording session, and ROIs for all cells in the same session with the three example cells highlighted in red. In the raster plots, each row of ticks is a single trial, progression from the trial start on the north or south arm to the trial end on the west or east arm. Each tick is the animal’s linearized position on the indicated arm for each frame of imaging. Tick marks are colored pink when that neuron exhibited a calcium transient. B, Temporal correlation and spatial correlation of each pair of active neurons from each day of Turn Right 1 (left) and Turn Right 2 (right). Trend line shows mean+/-standard deviation of that decile. C, Change in temporal and spatial correlation for pairs of neurons that stay active from Turn Right 1 to Turn Right 2. Trend line shows mean+/-standard deviation of that decile. D, Percentage of neurons that stayed correlated over each day pair from Turn Right 1 to Turn Right 2. Correlation threshold indicated on x-axis. Statistic: Wilcoxon ranksum test. E, Mean correlation of within-neuron spatial activity maps over days for each neuron that was a member of a pair temporally correlated above the threshold indicated on the x-axis for both days tested. Line indicates mean, error bar standard error of the mean. F, A pair of neurons from Mouse 1 that remain temporally correlated and remap together, and a section of the ROI plots from the session days. *p<0.05, **p<0.01, ***<p<0.001

One-Maze neural activity changes slowly over time, Two-Maze neural activity changes sharply with rule and environment.

A, Population vector correlations for adjacent day pairs. B, Cumulative distribution of single neuron event likelihood correlations for day pairs across rules changes against day pairs within rule epochs. C, Population vector correlations between Turn Right 1 and Go East day pairs (left), Go East and Turn Right 2 day pairs (right), and D, Turn Right 1 and Turn Right 2 day pairs. C and D use the same color scale (right). E, Population vector correlations averaged across spatial bins and pairs of days that span the same temporal interval. Top, all spatial bins and temporal intervals grouped together. Bottom, same as top, but separated by whether the days in the pair are from the same or different task rules. F, Example firing rate map demonstrating reinstatement of Turn-Right associated pattern of activity during Turn Right 2. Black line is the animal’s trajectory, colored dots are locations where this cell was exhibiting a calcium transient, dots are colored according to the calcium event likelihood within a 5cm radius around each dot, and colors are normalized to the maximum for each session. G, Histogram of the differences of correlations for each group of mice. H, Cumulative proportion of differences in correlation values across day triplets from Turn Right 1 to Go East to Turn Right 2. One-Maze in green, Two-Maze in purple. I, Percentage of neurons with a positive correlation from Turn Right 1 to Turn Right 2 and a negative correlation from Turn Right 1 to Go East. J, Percentage of neurons that become active (top) or inactive (bottom) across a day pair for the comparison listed below. *p<0.05, **p<0.01, ***p<0.001

Diagram of steps for Voronoi-triangulation pre-alignment.

A, Voronoi diagram showing a cell of interest (red diamond), Tier 1 adjacent points (blue) and Tier 2 adjacent points (green). B, example of the same set of points rotated 90 degrees. In the angle distance matrix for all points to all other points, correct alignment here would be a cluster at 90 degrees. C, Example angle differences histogram for real data, showing a peak near 90 degrees, registered FOV was intentionally rotated this far. D, 2D histogram for angle and distance differences; not the bin with the highest density at the smallest distance difference and 90 degrees offset. E,F, Black dots are potential anchor cells, lines are connected edges in the Voronoi diagram for this subset, and green lines are edges kept for satisfying quality matching criteria. E is the “base,” reference session, F the session to be registered. G, Alignment of these subsets of ROIs. H, Alignment of the whole field of view for both sessions.

Single-Cell Event Map Correlations for Turn Right 1 – Turn Right 2 on Each Maze Arm

Same as in Figure 2, each plot shows the cumulative proportion of correlations of single cells from each pair of days in Turn Right 1 to Turn Right 2. Correlation calculated as Spearman’s Rho. Kolmogorov-Smirnov test results for each arm listed above each plot.