Figure 1—figure supplement 1. Validation of motion analysis based on image artifacts during 2-photon imaging

Volumetric 2-photon Ca2+ imaging of dark flash habituation.

A) In response to a dark flash (DF), larval zebrafish execute a high-amplitude turn called an O-bend response.

B) Habituation results in a progressive decrease in response probability to dark flashes repeated at 1-minute intervals, delivered in 4 blocks of 60 stimuli, separated by 1hr of rest (from 0:00-7:00), and after a 5hr retention period (12:00-). Inset i) shows and expanded view of the first training block.

C) Tg(elavl3:H2B-GCaMP7f) larvae were imaged across 12 z-planes at 10μm steps. ROIs are overlaid in random colors.

D) Density of detected ROIs registered and plotted in the Z-Brain coordinate space. n=1,050,273 ROIs across 34 larvae.

E) Cropped field of view used for plotting and analyzing Ca2+ imaging data and approximate anatomical localizations of major brain areas: dien=diencephalon, mid-b = midbrain, cb = cerebellum, hind-b = hindbrain, io = inferior olive, ret = retina, tec = tectum

F) Functional responses of neurons to 60 dark flashes at 1-minute intervals, plotted as a clustered heatmap (“rastermap” (Pachitariu et al., 2017), github.com/MouseLand/rastermap), where rows represent individual neurons ordered by the similarities in their activity. Darker shades reflect increased activity. This clustering reveals neurons that are tuned to the DF stimuli (pink box) or motor events (green box). Dashed trace above the heatmap depicts the DF stimulus convolved with a kernel approximating H2B-GCaMP7f kinetics.

G) ROIs in an individual fish plotted based on their correlation and tuning to regressors defining either Motor or DF stimulus events, highlighting the spatial distributions of these tunings across the imaged population. Plotted as a maximum intensity projection.

H) Same analysis as G, but across the entire population of 34 larvae.

I) ROIs in an individual fish plotted based on their correlation and tuning to regressors defining either the first or last three DF stimuli.

J) Same analysis as I, but across the entire population of 34 larvae. tl = torus longitudinalis

Characterization of functional response types during habituation learning.

A) Heatmap of the response profiles of ROIs categorized into 12 functional clusters. n=16,607 ROIs from 34 larvae.

B)Average z-scored fluorescence of each functional cluster plotted for the whole experiment (left column), and centered on each DF stimulus (right column), demonstrating the differences in both Adaptation Profiles and Response Shape for each cluster. Clusters were identified using Affinity Propagation clustering (affinity = Pearson correlation, damping = 0.9, preference =-9), and organized using Hierarchical clustering, distance = complete, correlation. Dashed lines in top panels are the DF stimulus convolved with a kernel approximating H2B-GCaMP7f kinetics, used as the regressor in the analysis.

C)Summed intensity projection of the ROIs belonging to each functional cluster in Z-Brain coordinate space depicting their physical locations in the brain. Projection images are normalized to the maximum value.

D)Heatmap depicting the density of each cluster that is found within different Z-Brain regions.

E)Correlogram calculated from the Pearson correlation in downsampled volumes for the ROI centroid positions for each cluster (see Methods). Hierarchical clustering, distance = complete, correlation.

F)Correlation between motor events and the Ca2+ traces for each ROI assigned to the functional clusters. dots = individual ROIs, bar height = 99.99999% confidence interval around the median value.

Pharmacological screening for dark flash habituation modulators.

A) Screening setup to record larval zebrafish behaviour in 300-well plates, which are placed below a 31°C water bath that acts as a heated lid for the behaviour plates. Two 300-well plates are imaged in alternation using mirrors mounted on stepper motors. Fish are illuminated with infra-red LEDs and imaged with a high-speed camera recording at 560 frames per second (fps). Visual stimuli are delivered by a rectangular ring of RGB LEDs, and acoustic stimuli are delivered via a solenoid mounted on the back of the water tank. Colors overlaid on the 300-well plate indicate the arrangement of small molecule treatments and controls (yellow).

B)Habituation results in a progressive decrease in responsiveness to dark flashes repeated at 1-minute intervals, delivered in 4 training blocks of 60 stimuli, separated by 1hr of rest (from 0:00-7:00). This epoch is separated into periods reflective of the Naive response (first 5 stimuli, blue), and the remaining 235 stimuli during Training (green). From 8:00-8:30, no stimuli are delivered and fish are monitored for spontaneous behaviour (yellow). From 8:30-9:00 fish are given acoustic stimuli via the solenoid tapping on the water bath (pink). From 10:00 - 11:00 fish are stimulated with alternating leftward and rightward motion using the RGB LEDs to induce the optomotor response and turning towards the direction of motion (light blue). Finally, at 12:00-13:00, larvae are given 60 additional dark flashes during the test period (red). Same data as Figure 1B.

C) The strictly standardized mean difference (SSMD) is calculated across these different time periods, behaviours and the different components of O-Bend behavioural habituation (Randlett et al., 2019). All compounds were dosed at 10 μM in 0.1% DMSO (n = 6 larvae), relative to 0.1% DMSO vehicle controls (n = 60 larvae).

D)These vectors are assembled across all screened compounds that were viable and did not cause death or paralysis of the larvae. Displayed as a hierarchically clustered heatmap of behavioural Fingerprints (vectors of SSMD values). Clustering distance = ward, standardized euclidean.

Figure 3—source data 1. Small molecule library, Selleckchem Bioactive: FDA-approved/FDA-like small molecules

Figure 3—source data 2. Behavioural fingerprint parameter descriptions

Figure 3—source data 3. Behavioural fingerprints for viable compounds

Pharmaco-behavioural analyses of behaviour-modifying compounds.

A) Clustered heatmap of the behavioural Fingerprints for the 176 hits of the screen, showing at least one behaviour measure with |SSMD| ≥ 2. Clustering distance = ward, standardized euclidean, colour/cluster threshold = 9.5. This led to the re-identification of Haloperidol and Clozapine as habituation modifiers (light blue arrows).

B) Clustered correlogram of the Pearson correlation coefficients for the different measured components of behaviour across hits (same data as (A)) revealing the independence or co-modulation of behaviours. Clustering distance = average, correlation, colour/cluster threshold = 1.5.

C) Subsets of clustered heatmap from (A), highlighting the similar phenotypes exhibited by i) GABA Receptor antagonists and ii), iii) Melatonin receptor agonists, Estrogen receptor agonists, Progesterone receptor agonists and peroxisome proliferator-activated receptor alpha (PPARα) agonists. Heatmap is cropped to the first three columns of (A), depicting the SSMD of response Probability relative to vehicle controls.

Confirmed pharmacological modulators of habituation.

Dose response studies for A) Picrotoxinin, B) Melatonin, C) Ethinyl Estradiol and D) Hexestrol.

Displayed for each treatment are: i) Behavioural fingerprint for the original screen data (10 uM), and the dose response data. ii) Original screen data for the probability of response to DF stimuli. Each dot is the probability of response to one flash. Lines are smoothed in time with a Savitzky-Golay filter (window = 15 stimuli, order=2). iii) Dose response data for the probability of response, plotted as in ii)

Figure 5—figure supplement 1. Pharmacological manipulation of control behaviours and response displacement during habituation

Picrotoxinin and Melatonin alter the proportions of functionally identified neurons

A) Percent habituation for larvae during Ca2+ imaging, calculated as:

B) Heatmap of response profiles of ROIs categorized into the 12 functional clusters from larvae treated with DMSO (vehicle control, n = 428,720 total ROIs in 14 larvae), Picrotoxinin (PTX, 10uM, n = 271,037 total ROIs in 9 larvae), or Melatonin (1uM, n = 350,516 total ROIs in 11 larvae).

C) Proportion of neurons belonging to each functional cluster across treatment groups. Distributions for violin plots are bootstrapped from 5000 replicates.

D) Same data as C, only showing the data for PTX vs DMSO vehicle control, re-ordered to reflect the cluster Adaptation Profiles grouped by cluster Response Shape.

Figure 6—figure supplement 1. Mean response of functionally identified clusters after different pharmacological treatments

Identification of GABAergic neuronal classes

A) Hierarchically clustered heatmap depicting the correlation of markers aligned to the Z-Brain atlas with the spatial arrangement of the 12 functional clusters (distance = complete, correlation). Correlation values are z-scored by rows to highlight the cluster(s) most strongly correlated or anti-correlated with a given marker. The subset of the hierarchy containing the gad1b-reporters is coloured in purple.

B-D) Normalized summed intensity projections of B) , and C),, D) TgBAC(gad1b:GFP) (Satou et al., 2013), Z-Brain Atlas, and E) nns26, aka TgBAC(gad1b:LOXP-RFP-LOXP-GFP) (Satou et al., 2013), mapZebrain Atlas

F) 2-photon imaging of Tg(Gad1b:DsRed);Tg(elavl3:H2B-GCaMP6s) larvae depicting the raw data for each channel (top), and the ratio of Gad1b/GCaMP6s fluorescence in each ROI functionally identified using suite2p.

G) ROIs imaged in double transgenic larvae are assigned a cluster identity based on their correlation to the cluster mean trace, and classified as Gad1b-positive based on a DsRed/GCaMP6s ratio of greater than 0.25. Dotted line = expected proportion based on total number of cells classified as Gad1b-positive. *=p<0.05, Chi Square test with Bonferroni correction. Distributions for violin plots calculated by bootstrapping 5000 replicates. n = 1835 ROIs in 6 larvae.

Validation of motion analysis based on image artifacts during 2-photon imaging.

A) Motion indexes as calculated based on tail tracking (blue) and based on decreases in the correlation between individual frames and the reference frame used for motion alignment (orange) across the entire imaging experiment (65 minutes).

B)Same analysis as (A), for a different larva.

C)Cross-correlation plot comparing the two motion index vectors. Mean across 6 larvae, and line thickness = standard error.

Pharmacological manipulation of control behaviours and response displacement during habituation.

Dose response studies for A) Picrotoxinin, B) Melatonin, C) Ethinyl Estradiol and D) Hexestrol. Displayed for each treatment are: i) Violin plots for the dose response data, showing the probability of response to 30 acoustic tap stimuli. Horizontal lines = individual fish. ii) Violin plots for the dose response data OMR performance. Horizontal lines = individual fish. Statistical tests: Mann Whitney with bonferroni correction, ns=not significant; p ≤****= 1𝒳10−4; ***= 1𝒳10−3; **= 1𝒳10−2; *= 0.05.

E)Treatment with Picrotoxinin inhibits the decreases in movement displacement during habituation training.

F)Treatment with Melatonin inhibits the decreases in movement displacement during habituation training. Each dot is the mean response of the population to one flash. Lines are smoothed in time with a Savitzky-Golay filter (window = 15 stimuli, order=2).

Mean response of functionally identified clusters after different pharmacological treatments. A-C) Average z-scored fluorescence each functional cluster plotted for the whole experiment (left column), and centered on each DF stimulus (right column), demonstrating the differences in both adaptation and Response Shape for each cluster after treatment with (A) 0.1% DMSO vehicle control, (B) Picrotoxinin (10uM), or (C) Melatonin (1uM). D) Same data as A-C, plotted together for each treatment group.