[supplementary] brain-wide neural dynamics at single-cell resolution during rapid motor adaptation...

Upload: david-dalrymple

Post on 05-Apr-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    1/31

    Brain-wide neural dynamics at single-cell resolution

    during rapid motor adaptation in larval zebrafish

    Supplementary Information

    Misha B Ahrens, Jennifer M Li, Michael B Orger, Drew N Robson,

    Alexander F Schier, Florian Engert, and Ruben Portugues

    February 7, 2012

    1. The fictive swim simulator

    1.1. Mechanics. A zebrafish larva was paralyzed by injection of 1mg/ml bungarotoxinsolution (Sigma-Aldrich) and placed in a drop of water in a fish-shaped cavity carved into asylgard (Dow-Corning) filled petri dish. The dish was placed onto an acrylic screen mountedon a vertical translation stage (Newport Corporation), which in turn was mounted on amobile aluminum platform. Three manipulators holding the structural pipettes and twomanipulators holding the suction electrodes were also mounted on the platform. Usinga moveable dissection microscope, two structural pipettes, filled with a lidocaine solution(43M), were placed onto the ears of the fish, and one on the end of the tail. Because theotic vesicle separated the pipettes from the brain, and the pipettes had a small (10m)

    opening, it could be assumed that the lidocaine concentration at the brain dropped muchbelow levels that would affect brain activity [1]; indeed we saw no difference in behavior withand without lidocaine. Gentle suction was applied, then water was added to the petri dish.The vertical translation stage was then lowered, so that the fish was effectively lifted out ofthe cavity and suspended in mid-water from the three structural pipettes, as illustrated infigure S3.

    The suction electrodes were positioned near to the medial or caudal part of the tail.The mobile aluminum platform was moved to bring the fish underneath the microscopeobjective. The electrodes were placed on intersegmental boundaries under guidance of thecamera (integrated into the two-photon microscope and using near-infrared illumination),and gentle suction was applied. Typically, electrical signals became apparent ten minutes

    after the placement of the electrodes.

    1.2. Fictive swim analysis. The swim simulation software was written in C# (Mi-crosoft) and formed part of the custom written interface that controlled the two-photonmicroscope, the visual display and the electrophysiology acquisition. The electrical signalsrepresenting fictive swims resembled large amplitude noise bursts (Fig. 1c in the main text).The main characteristic setting apart these signals from the recording noise was the increase

    1

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    2/31

    in local variance, or power, of the signal. We took advantage of this and processed the signalin real time by taking a windowed standard deviation, so that ifs(t) is the electrical signaland s(t) the processed signal, then s(t) = SD(s(t /2) . . . s(t + /2)), with = 10ms.In this way, the signal was transformed into a much cleaner signal, of high signal-to-noiseeven when the original signal appeared to have a low signal-to-noise ratio (e.g. black traces

    in Fig. 1c in the main text). For offline analysis, as in Fig. 1c, a Gaussian-weighted standarddeviation was used instead of a square window, but the effect was similar.

    1.3. Automatic thresholding. To detect fictive swims in the processed signal, a thresh-old was automatically set (horizontal lines in Fig. 1c) via the following procedure. Theprocessed signals s, being a windowed standard deviation, were always positive. Two his-tograms of processed signal values, one for the left and one for the right channel, werecontinuously updated. These histograms resembled bell-shaped curves with a fat tail onthe positive side. The bell-shaped curves represented the values of the processed signal inthe absence of fictive swimming; the tail represented the peaks that were present duringswimming. A small threshold was set to detect the minimum value of s at which the his-togram became non-zero, called mins; the value of s at the peak of the histogram was calledpeaks. The threshold was then set at peaks + (peaks mins), with = 1.8 in most cases,but adjusted between 1.6 and 2 depending on recording quality, as illustrated in figure S2.This method of thresholding proved to be very robust, as it detected fictive swims reliablyand led to very few false positives (as assessed by eye).

    1.4. Visual stimulation and the closed-loop controller. Graphics were written inDirectX. A mini projector (3M) projected the video onto a diffusive screen underneaththe fish. The projector was powered by a red LED (Luxeon Rebel) that was pulsed insynchrony with the reversal of the X scan mirror, so that stimulus photons leaking throughthe green bandpass filter in front of the PMT did not affect the images. In closed-loop, agrating translated at a speed of 1cm/s from tail to head (negative velocity in Fig. 2a in the

    main text), to be accelerated in the opposite direction during fictive locomotion (towardspositive velocity, e.g. Fig. 2a). During each video frame (running at 60 Hz), the fictiveswim signal was acquired and processed (see above). Where the processed signal crossedthe automatic threshold (see above), the signal changed the velocity of the whole-fieldgrating projected underneath the fish, proportional to s where this was above threshold.The constant relating s and the velocity was the gain, which was approximately matchedto the gain of freely swimming fish, but adjusted to higher and lower values (typically afactor of four apart) during the behavioral assay. That is, velocity = 1+gain t I(s(t) >threshold) s(t) cm/s, for time t within the sampling range of the current video frame, andI(s(t) > threshold) equal to 1 when s(t) > threshold and zero otherwise. Upon terminationof the fictive swim, the velocity decayed linearly back to the baseline of -1 cm/s, with a rate

    of -15cm/s2

    matched to freely swimming fish (figure S1, courtesy of Timothy Dunn). Bothleft and right channels contributed to driving the visual stimulus. The velocity was slightlysmoothed across video frames, so that (effective stimulus velocity) = (velocity) + (1 ) (velocity at previous video frame), with = 0.3.

    2

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    3/31

    2. Calcium imaging data analysis

    We developed a novel method for detecting signals in calcium imaging data. A square ROIof size 3x3 microns was swept across the spatial extents of an imaging movie. The timeseries of fluorescence, averaged over this spatial window, is called cx,y(t). A measure, akinto Fx,y(t)/

    Fx,y

    but less noisy in regions of low fluorescence, was defined as mx,y(t) =

    (cx,y(t) cx,y)/(cx,y + c). Here cx,y is the time-average fluorescence at point (x, y)in the movie, and c is the average of all pixels across all space and time. The latter isintroduced to the denominator to reduce noise in mx,y(t) in regions of low fluorescence,which gets amplified in the usual Fx,y(t)/Fx,y measure when the value ofFx,y is small.

    From mx,y(t), a signal map was constructed, Mx,y = mx,y(t)mx,y3t , i.e., the averageof the third power of the deviation from the mean of the fluorescence measure is used tofind hotspots of calcium imaging activity. Figure 3g in the main text displays such anactivity map Mx,y . This algorithm generated activity regions with much higher sensitivitythan methods based on principal components analysis, which usually detected only largecalcium transients or activity in which many neurons simultaneously participated.

    To automatically generate regions of interest, the activity map Mx,y was smoothed by

    Gaussian convolution, and local maxima were detected and designated as center points forsmall regions of interest. In a subset of cases, especially in the case of activation of a largearea of neuropil, these centers were numerous and close together. A pruning algorithm wasapplied that fused points, including chains of points, closer than 4 microns, into one pointat the center. Once the center points were established, the fluorescence time-series of smallROIs centered at those points was extracted.

    To finally obtain the shapes of single neurons (or regions of neuropil activation), thesefluorescence time-series were correlated with every pixel in a square region of 40x40 micronsaround the center point, and a map of the correlation coefficients r2x,y was obtained, asdisplayed in Fig. 3h. The reason for using r2 for obtaining shapes of neurons is that pixelsof the same (active) neuron are, of course, strongly correlated to one another, so that

    correlating all pixels to a few pixels of one neuron should retrieve the shape of that neuron.Indeed, in these map, single neurons became visible. Typically, a single neuron at the centerwas highlighted, due to the similarity between its fluorescence time-series and the time-seriesderived from the small ROI. In many cases (see Fig. S7), multiple neurons became visibledue to strong correlations between nearby neurons. The maps of r2x,y served as the basisfor manual segmentation.

    Sampling of the brain

    Imaging planes were manually localized in a standard reference brain. Despite small differ-ences in brain anatomy between fish, points could be reliably located with a fidelity of well

    within 25 microns (see methods 3). Points of interest obtained with the algorithm describedabove could thus be mapped to the standard brain. These points, categorized according tofunction, formed the basis of the density maps of Fig. 6 in the main text. It was not possibleto sample the entire brain of a single fish, and sampling was non-homogeneous. To correctfor inhomogeneous sampling, a 3D density map was derived from the manually localizedimaging planes (see Fig. S9. The density maps of Fig. 5 are obtained by convolving thepoints of interest with a 3D Gaussian of 25x25x25 microns, then dividing by the density

    3

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    4/31

    map to obtain a sample-density corrected measure of neuron density.

    Fish

    We use 6 to 7 day old wildtype WIK fish and Tg(elavl3:GCaMP2) nacre fish on a WIK

    background. Fish were raised at 28 degrees Celcius.

    1 Supplementary Videos

    1. Motor adaptation (mov1 motorAdaptation.wmv; in this case, the fish ceases mostlocomotion during stimulus replay)

    2. Example of calcium imaging during behavior (mov2 imagingDuringBehavior.wmv;hindbrain including some cerebellum)

    3. Example of registration of two-photon imaged plane to reference brain(mov3 anatomyRegistration.wmv)

    4. Anatomy stacks with functional data superimposed as in Fig. 6(mov4 anatomyMovies.wmv)

    0 200 400 600 800 1000 1200 14002

    0

    2

    4

    6

    8

    time (ms)

    velocity (cm/s)

    angle of point on tail

    displacement (cm)

    Figure S 1: Example of swim dynamics of a freely swimming fish (courtesy Timothy Dunn).The center between the eyes of fish swimming freely in a petri dish was tracked by a high-speed camera. The velocity profiles reveal steep rises in velocity and approximately linearvelocity decays on the order of 15-30 cm/s2. These type of swim dynamics were mimickedin the fictive swim simulator.

    4

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    5/31

    Figure S 2: Fictive optomotor-response, and analysis of fictive swim bouts. a. Exampleof a two-channel fictive swim recording (top) and the corresponding processed trace (bot-

    tom) Left and right channels depicted in red and blue. Red and blue circles represent peaklocations, green and gray circles represent start and end of swim bouts. b. The fictivelybehaving fish exhibits the optomotor response (OMR). Top: schematic of the visual stim-ulus. Bottom: fictive signal. In accordance with the freely swimming OMR, the fish swimsfictively during tail-to-head motion, and much less during head-to-tail motion. c,d. Au-tomatic threshold generation for processed fictive swim signals. c. Histogram of processedfictive signals, labeled with min, peak, and threshold, defined in the text. d. Close-upof the same histogram showing the positive tail. e. Segment of the processed signal withmin, peak and threshold superposed. In the fictive swim simulator, the histograms aredynamically updated, exponentially forgetting old samples so that, effectively, about threeminutes of data contribute to the threshold.

    5

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    6/31

    Z translation stage

    suction pipettemanipulator

    mobile platform

    sh in petri dish

    Figure S 3: Schematic of setup for fictive recordings in suspended zebrafish. The verticaltranslation stage lowers the tank after three suction pipettes have been attached to the fish,so that the fish is suspended from the suction pipettes in mid water. Afterwards, the twoelectrodes are connected to the tail of the fish.

    6

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    7/31

    0 0.5 1 1.5 2 2.5 3 3.50

    50

    100

    p = 0.534

    swim 1

    high gain

    low gain

    0 0.5 1 1.5 2 2.5 3 3.50

    50

    100

    p < 104

    swim 2

    0 0.5 1 1.5 2 2.5 3 3.50

    50

    100

    p < 104

    swim 3

    count

    0 0.5 1 1.5 2 2.5 3 3.50

    50

    100

    p < 104

    swim 6

    0 0.5 1 1.5 2 2.5 3 3.50

    50

    100

    p < 104

    swim 12

    number of bursts (relative to mean)

    0 0.5 1 1.5 2 2.5 3 3.50

    50

    100after 10s open loop

    number of bursts (relative to mean)

    count

    p < 104

    0 0.5 1 1.5 2 2.5 3 3.50

    100p = 0.875

    swim 1

    high gain

    low gain

    0 0.5 1 1.5 2 2.5 3 3.50

    100p = 0.024

    swim 2

    0 0.5 1 1.5 2 2.5 3 3.50

    100p < 10

    4

    swim 3

    count

    0 0.5 1 1.5 2 2.5 3 3.50

    100p < 10

    4

    swim 6

    0 0.5 1 1.5 2 2.5 3 3.50

    100p < 10

    4

    swim 12

    power per burst (relative to mean)

    0 0.5 1 1.5 2 2.5 3 3.50

    50

    100 after 10s open loop

    power per burst (relative to mean)

    count

    p = 0.035

    a b

    c

    0 10 20 30 40 500

    0.5

    1

    time (s)

    N bursts (/10)

    swim freqpower

    amplitude

    Figure S 4: Histograms, as in figure 2 of the main text, for the number of bursts perswim bout (left) and the average power per burst (right, approximately proportional toburst amplitude) during motor adaptation and during the memory test. Both variablesare modulated in the same direction as total power (figure 2, main text), although averagepower is modulated less than the number of bursts per swim bout. c. Other attributes of

    fictive swims also change over the course of motor adaptation. Shown in the time course ofchange in swim parameters for an example fish. Changes occur during the first 10 secondsof a trial after which the parameters stabilize (fall within the noise level of the values in thenext 20 seconds).

    7

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    8/31

    Figure S 5: a. Locomotor memory experiment from Fig. 2, with only data from the threefish which swam the least during the open-loop period (i.e. they hardly swam at all duringthis period). A few trials on which they did swim were removed. b. Locomotor drivememory experiment with 10s white period instead of backward gratings (N=1 fish). Figureconventions as in Fig. 2 in the manuscript. The motor memory persists also when thebackwards gratings are replaced by a featureless white display.

    8

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    9/31

    Figure S 6: a-f. Activity in reticulospinal neurons is correlated with swim vigor (N=2fish). a. A plane of the reticulospinal neurons in ventromedial rhombomeres 3-5 labeledwith Calcium Green Dextran. Neurons with raised activity encircled in green; thick greenline denotes MiV2. b. Activity pattern of MiV2 during gain adaptation. During vigorousswimming, the fluorescence signal of the neuron is raised as compared to gentle swimming.c. Average fictive behavior (blue) and fluorescence (green) during ten gain alternationsaveraged over all responsive neurons (green in a). Shaded areas indicate standard error.d. Neurons of the nucleus of the medial longitudinal fasciculus (nucMLF) labeled with

    Calcium Green dextran. e. Fictive behavior and fluorescence, and f. average behavior andfluorescence over ten gain alternations of all nucMLF neurons. g. Simulation of GCaMP2responses to a change in spike rate. Inset: The single-spike GCaMP2 response was modeledafter Tian et al., Nature Methods, 2009. Top: If the simulated neurons spike rate increasesfrom 10Hz to 50Hz over a period of one second, the simulated GCaMP2 fluorescence responseappears to lag behind the change in firing rate. Spike trains modeled as Poisson processesat the indicated rates. Average of 20 repetitions. Bottom: Zoom-in of b.

    9

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    10/31

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    11/31

    a b c d e f

    Figure S 8: Additional examples of alignment of imaging planes with reference brain. An

    example of an imaged plane is shown in a; this plane is subjected to the image registrationalgorithm (methods 3) and mapped to the reference brain. The matching z-plane of thereference plane, with best-matched area is shown in the b, and the overlay in c, showingthat features such as shape, location of neuropil versus cell bodies, etc, are reasonably wellmatched. Panels d-f show additional examples of overlays.

    11

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    12/31

    200

    100

    0

    300

    Figure S 9: Sampling density across the brain. The panels show how many times a givenarea of the brain was imaged, for all fish combined, after mapping the imaged planes to thestandard brain. The top view represents the total number of times a plane was imaged,e.g. in the cerebellum and the hindbrain underneath he cerebellum, we imaged more than300 times across all fish (see color bar). The color scale of the side-view depends on howdensity is defined (e.g. number of planes sampled in a certain volume, or number of timessampled per neuron; defining it as in figure S10, below, would generate a color bar with amaximum of about 120 in the dorsal cerebellum).

    12

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    13/31

    Figure S 10 (following page): Quantification of uncertainty in functional unit detectionacross the brain. Imaging an area only a few times, and detecting no functional units,induces larger uncertainty about whether or not there are functional neurons present thanwhen imaging an area many times. This is quantified here in two cases: a region with adense presence of functional units (dorsal cerebellum) and an area with sparse presence offunctional units (anterior dorsal hindbrain). We analyzed a circle of diameter 25m in eachof these two areas. In total, these regions contained 118 and 63 imaged planes, respectively.

    We then sought an answer to the question, how many functional units would have beendetected if we had sampled these areas more thinly. To simulate this, we randomly picked nplanes from the total number of planes, and noted how many functional units were detected.Repeating this 1000 times generated a histogram over number of units detected, which isrepresented in the panels as number of units detected per sample plane, i.e. normalizedby sampling density, and occupies one column for each n. As expected, the variance ofthe number of detected units per plane decreases as n increases. Panel a shows thesedistributions for a region in the dorsal cerebellum (expect about 1 unit per imaged plane),and b for a region in the dorsal anterior hindbrain (expect about 1 unit every 10 imagedplanes). Next, these data can be used to estimate the chance that functional units weremissed in the experiments. For a given n, the top entry of the corresponding column, dividedby the sum of all entries of the column, is the probability that zero units were detected,

    given that units were present i.e. that functional units were missed. This quantity isshown, as a function ofn, in panel c for the dense and the sparse case. Using the numberof sampled planes n within 12.5m at every point in the side-projected brain, we therebyestimated a corresponding probability of having missed units at points where we measuredzero or only a few units. The histogram b was used for this purpose (blue line in c), becauseit can be assumed that in areas where not many units were detected, the density is morelikely to be sparse (as in b) than dense (as in a). The resulting uncertainty map is shown ind and represents the probability that there are functional units present where we detectednone or only a few.

    13

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    14/31

    dorsal cerebellum (dense)

    20 40 60 80 100

    0

    0.5

    1

    1.5

    2

    2.5

    0

    0.2

    0.4

    0.6

    0.8

    1

    anterior hinbrain (sparse)

    10 20 30 40 50 60

    0

    0.2

    0.4

    0.6

    0.8

    1

    1.20

    0.2

    0.4

    0.6

    0.8

    1

    probability of having missed functional units in regions

    where few were detected (per area covered by 25m circle)

    number of randomly picked planes (1000 times)

    numberofunitsp

    erplane

    (colorscalenormalizedtomaximumo

    feachcolumn)

    0

    0.5

    1

    a

    b

    dlo

    cals

    ampling

    de

    nsity

    0 10 20 300

    0.2

    0.4

    0.6

    0.8

    number of times sampled

    probabilityofmissing

    dense

    sparse} c

    14

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    15/31

    ccFM > 0.4 ccFM < -0.3a b

    Figure S11: Correlation-based maps derived from stimulus replay period. a. Density mapsof sites with correlation coefficient between fluorescence and motor signal greater than 0.3.b. Density of sites with correlation coefficient between fluorescence and motor signal lessthan -0.3. Maps are in approximate agreement with the assay-based maps (Fig. 6 in maintext), with a approximately corresponding to the motor map and b approximately withthe motor-off map.

    15

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    16/31

    motor

    gain decrease

    gain increase

    motor o

    Figure S 12: Anatomy maps (normalized by sampling density), with any regions occurringon one side of the map but not the other discarded. Symmetrization achieved by newdensity =

    density left-right flipped density. This map is more conservative than the full

    maps, since it intersects the left and right hemispheres. Justification for this representationis derived from the approximate left-right symmetry of the un-symmetrized maps (figure6).

    Figure S 13 (following page): Density maps as in Fig. 6, but with heat map signifying theexpected number of detected units within a column, perpendicular to the paper (that thefigure might be printed on), of an equivalent area of 5 cell bodies (100 m2) parallel tothe paper. Of course, this density depends heavily on the calcium indicator used (here,GCaMP2). Below: separate maps of detected units (left) and density (right) for the datafrom figure 3m.

    16

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    17/31

    2

    4

    6

    0

    0.2

    0.4

    0.6

    0

    0.1

    0.2

    0

    0.5

    1

    0

    0.5

    1

    0.05

    0.1

    0.15

    0.2

    0

    0.05

    0.1

    0.15

    0.2

    0.4

    0.6

    0.8

    0

    1

    2

    3

    0.05

    0.1

    0.15

    0.2

    0.25

    0

    0.1

    0.2

    0

    0.2

    0.4

    motor

    gain decrease

    gain increase

    motor o

    motor corr. sensory corr.

    17

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    18/31

    low gain high gain

    scalebars:10%

    F/F

    F

    /Fuorescence

    30s

    Figure S 14: Randomly selected traces from units in the motor class. Traces representfluorescence values averaged over the six low-high gain repetitions.

    18

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    19/31

    low gain high gain

    scalebars:10%

    F/F

    F/Fuorescence

    30s

    Figure S 15: Randomly selected traces from the gain-down class (includes most of thedata).

    19

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    20/31

    low gain high gain

    scalebars:10%

    F/F

    F/F

    uorescence

    30s

    Figure S 16: All traces from the gain-up class.

    20

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    21/31

    low gain high gain

    scalebars:10%

    F/F

    F/Fuorescence

    30s

    Figure S 17: Randomly selected traces from the motor-off class.

    21

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    22/31

    control

    0

    20

    40

    60

    ccFM

    ccFF

    0 1-1-1

    0

    1

    Figure S 18: Control measurements for the correlation-based measures ccFM and ccFF.The hindbrain of a fish was imaged using the standard paradigm, but the projector wasturned off. Thus the fish received no visual input. It swam only rarely. Applying the

    standard analysis, values of ccFM and ccFF were collected as depicted in the histogram.These histogram entries serve as a measurement of noise in ccFM and ccFF, because anyneural activity measured cannot be correlated to visual input, and cannot be correlated tothe fictive signal, except in the unusual occurrences of swimming. We thus drew a noisebox around the histogram entries, which should be discarded from analyses of the fish thattook part in the paradigm. Some histogram entries are visible for positive values ofccFM.

    22

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    23/31

    1 2 3 41 2 3 4

    1. motor correlated

    2. motor correlated - shued

    3. sensory correlated

    4. sensory correlated - shued

    anatomy signal map

    control 2

    0

    0.5

    1

    12

    3

    4

    locomotivelocomotive

    visual

    excluded noise

    ccFM

    ccFF

    0 1-1-1

    0

    1

    Figure S 19: Control simulation for the measures ccFM and ccFF for visually versusmotor correlated neural activity. a. Four squares in the simulated movie were artificiallymodulated to follow motor output of a recorded fish (1), visual input to that fish (3), or tobe random (2 and 4). A small amount of noise was added. All other pixels in the moviewere held constant (so the anatomy image is only pro forma). b. The activity-detectionprocedure detects the signals in the four squares. c. Correlation-based representation ofvisual versus behavioral properties of the squares. As expected, (1) and (3) achieve highvalues ofccFMand ccFF, respectively, and (2) and (4) fall inside the noise box (Fig. S18)and would thereby be excluded from further analysis, as is appropriate because these squareswere random and not correlated to either visual input or motor output. These correspondto the trials during which the fish did swim a little. The term locomotive is used for neuralactivity that correlates highly with motor output, and visual for activity that is highly

    visually-driven.

    23

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    24/31

    midbrain

    0

    5

    10

    15

    hindbrain

    0

    20

    40

    60

    80

    forebrain

    0

    5

    10

    15

    cerebellum

    0

    10

    20

    behavioral

    visual

    excluded noise

    |ccFM|

    ccFF

    0 1-1-1

    0

    1

    Figure S 20: Correlational measures of visually-driven versus locomotor-related activity indifferent brain areas.

    24

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    25/31

    0.1 0.2 0.3 0.4 0.5 0.60

    0.05

    0.1

    0.15

    0.2

    0.25

    0.3

    0.35

    0.4

    0.45

    0.5

    5

    5

    0. 4 0. 5 0 .6 0. 7 0 .8 0. 9 1 1. 10.1

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    0.8

    17

    17

    0.1 0 0.1 0.2 0.3 0.4 0.5 0.6

    0.2

    0.25

    0.3

    0.35

    0.4

    0.45

    0.5

    11

    11

    0.1 0.2 0.3 0.4 0.5 0.60.05

    0

    0.05

    0.1

    0.15

    0.2

    0.25

    0.3

    24

    24

    0. 5 0. 6 0 .7 0.8 0. 9 1 1. 1 1 .2 1. 30.2

    0.1

    0

    0.1

    0.2

    0.3

    0.4

    0.5

    20

    20

    0. 7 0. 6 0. 5 0. 4 0. 3 0. 2 0. 1 00.2

    0.1

    0

    0.1

    0.2

    0.3

    0.4

    0.5

    0.6

    6

    6

    0.2 0 0.2 0.4 0.6 0.8 1 1.20.2

    0.1

    0

    0.1

    0.2

    0.3

    0.4

    0.5

    0.6

    28

    28

    0.4 0.6 0.8 1 1.2 1.4 1.6 1.80.1

    0.05

    0

    0.05

    0.1

    0.15

    0.2

    0.25

    0.3

    0.35

    26

    26

    0. 2 0 .3 0.4 0. 5 0 .6 0. 7 0 .8 0. 9 10.1

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    0.8

    7

    7

    0. 1 0 0. 1 0. 2 0. 3 0.4 0. 5 0.6 0. 70.2

    0.1

    0

    0.1

    0.2

    0.3

    0.4

    0.5

    14

    14

    0. 8 0. 6 0. 4 0. 2 0 0 .2 0 .4 0 .61

    0.8

    0.6

    0.4

    0.2

    0

    0.2

    0.4

    19

    19

    0. 2 0. 1 0 0. 1 0.2 0. 3 0. 4 0.50.7

    0.6

    0.5

    0.4

    0.3

    0.2

    0.1

    0

    25

    25

    0 0.5 1 1.5 20.8

    0.7

    0.6

    0.5

    0.4

    0.3

    0.2

    0.1

    0

    0.1

    9

    9

    0.2 0.4 0.6 0.8 1 1.2 1.4 1.60.5

    0.4

    0.3

    0.2

    0.1

    0

    0.1

    0.2

    0.3

    0.4

    1

    1

    0.5 1 1.5 2 2.50.2

    0.1

    0

    0.1

    0.2

    0.3

    0.4

    0.5

    0.6

    27

    27

    0.5 1 1.5 2 2.5 3 3.50.8

    0.6

    0.4

    0.2

    0

    0.2

    0.4

    0.6

    0.8

    1

    21

    21

    0. 4 0 .6 0. 8 1 1. 2 1 .4 1. 6 1 .8 20.7

    0.6

    0.5

    0.4

    0.3

    0.2

    0.1

    0

    0.1

    0.2

    0.3

    23

    23

    0 0.5 1 1.5 2 2.50.2

    0

    0.2

    0.4

    0.6

    0.8

    1

    1.2

    18

    18

    0.5 0 0.5 1 1.50.3

    0.2

    0.1

    0

    0.1

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    12

    12

    0.5 1 1.5 2 2.5 30.1

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    0.8

    22

    22

    2.5 3 3.5 4 4.5 5 5.51.5

    1

    0.5

    0

    0.5

    1

    29

    29

    1 1.5 2 2.5 3 3.5 4 4.50.5

    0

    0.5

    1

    1.5

    2

    31

    31

    1 1.5 2 2.5 3 3.5 40.6

    0.4

    0.2

    0

    0.2

    0.4

    0.6

    0.8

    1

    1.2

    8

    8

    0.5 1 1.5 2 2.50.8

    0.6

    0.4

    0.2

    0

    0.2

    0.4

    0.6

    10

    10

    0 0.5 1 1.5 20.2

    0.4

    0.6

    0.8

    1

    1.2

    1.4

    1.6

    1.8

    16

    16

    2 1.5 1 0.5 0 0.50.5

    0

    0.5

    1

    1.5

    2

    4

    4

    0.5 1 1.5 2 2.5 30.4

    0.6

    0.8

    1

    1.2

    1.4

    1.6

    1.8

    2

    2.2

    2.4

    2

    2

    0 0.5 1 1.5 2 2.5

    0.8

    1

    1.2

    1.4

    1.6

    1.8

    2

    2.2

    2.4

    2.6

    3

    3

    2 3 4 5 6 7 80.5

    0

    0.5

    1

    1.5

    2

    2.5

    3

    30

    30

    PC1

    PC2

    Figure S 21: Dimensionality reduction of many-unit activity in single fish. Although noisyin some cases (in particular when only few units were detected), the dynamics in single fishlook similar to those of the entire dataset that was constructed from many fish.

    Figure S22 (following page): a. Temporal principal components (PCs) of the entire dataset.Left: Eigenvalue spectrum for the PCs. The first two PCs are most important for capturingthe data. Right: The first three PCs. PC1 looks like activity patterns of the motor class

    and the motor-off class (by multiplying by -1). PC2 looks like activity patterns of thegain-down class, although it is mixed with a dip around the low-to-high gain transition.b. Dimensionality reduction restricted to four ma jor brain areas. The dynamics lookssimilar in each case, although differences exist. c. Trajectory speed (represented as changein angle around the midpoint) within the four brain regions. Speed in the forebrain is moreconstant than in other brain areas.

    25

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    26/31

    1 2 3 100

    0.1

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    0

    0.02

    0.04

    0.06

    hindbr

    cereb

    midbr

    forebr

    4 6 8 10

    1

    0

    1

    2

    1

    1

    0 0.5 1 1.5

    0

    0.5

    1

    1.5

    4

    4

    1 1.5 2

    0

    0.2

    0.4

    0.6

    0.83

    3high

    1 2 30.5

    0

    0.5

    1

    2

    2

    hindbrain cerebellum

    ventral midbrain forebrain

    PC1

    PC2

    PC3eigenvalues

    highg

    ainlow

    gain

    principalcomponent

    s

    a

    b

    low low

    low low

    high high

    high

    c

    PC1

    PC2

    low high

    30s

    trajectoryvelocity

    26

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    27/31

    IO

    CB

    100m

    Figure S 23: Identification of the inferior olive via electric stimulation of the dorsal cere-bellum. The dorsal cerebellum was stimulated with about 10A, and the entire hindbrainimaged, one plane at a time. The contralateral cerebellum showed activity as well as thedeep cerebellum. In the rest of the hindbrain there was very little evoked activity, except inthe inferior olive, which showed very strong activation. We assume this is due to antidromicactivation of climbing fibers.

    27

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    28/31

    2 0 2 4

    time (s)

    motoroutput

    post inferior olive lesion OMR

    Figure S 24: The optomotor response is intact after lesioning the inferior olive in all 6 fishtested. The visual stimulus consisted of stationary gratings which started moving from tailto head at time 0, in open loop. OMR responses were reliable. Each trace represents the

    average over two fictive OMR responses of a fish. The latency to OMR onset is in thenormal range (see e.g. fig. 1).

    2 5 6 7

    100 m

    Figure S25: Calcium imaging during electric stimulation of the inferior olive. We performedconcurrent imaging in 4 out of 7 fish; the numbers correspond to the numbers of figure 7d.Green overlay shows areas that are activated by the stimulation. The pipette is visible inthe images and indicated by the arrows. The region activated by the electric pulse variesper experiment, as did the effect on behavior.

    28

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    29/31

    100 m

    Figure S 26: Electric stimulation in the deep cerebellum. Overlay of anatomy image withstimulation-triggered response (green). The pipette is visible and indicated by the whitearrow.

    29

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    30/31

    0 5 10

    0

    0.2

    0.4

    0.6

    time (s)

    f

    /

    f

    0 50 100 150

    0

    0.5

    1

    time (s)

    f/fctive

    100 m

    IO

    IO

    0 5 10 15

    0

    0.2

    0.4

    0.6

    time (s)

    f

    /

    fa

    b

    Figure S 27: Sensory and motor responses in the inferior olive are consistent with a hy-pothesis under which visual feedback resulting from a forward swim is integrated with anefference copy of motor output. a. There are neurons in the inferior olive that are responsiveto the visual correlate of a forward swim: brief head-to-tail whole-field motion. Gratingswere moved from head to tail at 1cm/s for 400ms to simulate visual input during a forwardswim (30 repetitions, every 20s). A subset of neurons in the IO reliably responded to thisstimulus (23 neurons detected in 3 fish), one of which is depicted. Inset: The response

    of these neurons to continuous backward gratings are transient, showing that the neuronsare indeed tuned to acceleration accompanying a forward swim, rather than to motion atconstant velocity (same neuron). b. The I.O. also contains neurons that are responsive tomotor output, such as the one shown here. (29 neurons detected in 3 fish.) We hypoth-esize that the neuronal responses to the visual correlate of a forward swim may interactsubtractively with the motor copy to provide an error signal.

    100m

    Figure S 28: Example of a lesion of the dorsal anterior hindbrain to control for nonspecificeffects of lesions in the I.O. lesion experiments.

    30

  • 8/2/2019 [Supplementary] Brain-wide neural dynamics at single-cell resolution during rapid motor adaptation in larval zebrafish

    31/31

    References

    [1] M R Mitchell and S Plant. Effect of lidocaine on action potentials, currents and contrac-tions in the absence and presence of ouabain in guinea-pig ventricular cells. Quarterlyjournal of experimental physiology (Cambridge, England), 73(3):379390, May 1988.