Computational processing of optical measurements of neuronal and synaptic activity in networks

Imaging of optical reporters of neural activity across large populations of neurones is a widely used approach for investigating the function of neural circuits in slices and in vivo. Major challenges in analysing such experiments include the automatic identification of neurones and synapses, extraction of dynamic signals, and assessing the temporal and spatial relationships between active units in relation to the gross structure of the circuit. We have developed an integrated set of software tools, named SARFIA, by which these aspects of dynamic imaging experiments can be analysed semi-automatically. Key features are image-based detection of structures of interest using the Laplace operator, determining the positions of units in a layered network, clustering algorithms to classify units with similar functional responses, and a database to store, exchange and analyse results across experiments. We demonstrate the use of these tools to analyse synaptic activity in the retina of live zebrafish by multi-photon imaging of SyGCaMP2, a genetically encoded synaptically localised calcium reporter. By simultaneously recording activity across tens of bipolar cell terminals distributed throughout the IPL we made a functional map of the ON and OFF signalling channels and found that these were only partially separated. The automated detection of signals across many neurones in the retina allowed the reliable detection of small populations of neurones generating “ectopic” signals in the “ON” and “OFF” sublaminae. This software should be generally applicable for the analysis of dynamic imaging experiments across hundreds of responding units.


Normalisation of fluorescence data
In order to compensate for different expression levels of the reporter protein or different loading of dyes, we attempted to normalise fluorescence data to a baseline (∆F/F ; Eqn. 1), where F (t) is the recorded fluorescence at time t, F 0 is the fluorescence at baseline and F BG (t) is the background fluorescence at time t.
However, this approach had two possible pitfalls -determining the baseline (F 0 ) and the background fluorescence (F BG (t)): Determining a baseline is often straightforward, usually the baseline is defined as the fluorescence before (or after) a stimulus. However, in in vivo recordings in retinal bipolar cells, we regularly encountered spontaneously active terminals (Fig. 6c in the main text) that did not respond to a stimulus. Yet, we wanted to use an automated approach that worked in all kinds of traces that we recorded.
Therefore, we defined the baseline as the bin centre of the highest peak of a histogram of all fluorescence values in a given trace. The number of bins was 1 + log 2 N , where N was the number of points in a given trace. This approach performed well for the levels of spontaneous activity that we encountered as well as for the stimuli that we used. However, this approach may falsely detect a baseline with long stimulus durations or high levels of spontaneous activity.
The fluorescence background is composed of shot noise from the photodetectors, the intrinsic noise of the recording equipment and photons reaching the photodetectors that are not emitted fluorescence. The latter was particularly pronounced when we gave light stimuli, even though the wavelengths used (455 and 590 nm) were supposed to be blocked by the emission filters (HQ535 ∆F 50, Chroma Technologies). We subtracted the background by manually specifying an area in the image that was devoid of the reporter.
In each frame, the average fluorescence from that area was calculated and subtracted from the whole frame. Alternatively, Igor Pro can calculate a polynomial fit of the background, which can be subtracted from frames instead of a scalar value, in order to compensate for non-uniform background values. Practically, we encountered weak fluorescence in the whole visual field (which can be visualised by adjusting the contrast settings of the displayed graph), which led us to slightly overestimate the background signal and thus also the ∆F/F 0 signals. Therefore, one has to exercise due care when comparing amplitudes of signals from different recordings (Yasuda et al., 2004).

Building the database
A single experiment was able to generate data from tens, even hundreds, of synaptic terminals. It was soon obvious that we wanted to perform metaanalyses of different experiments and even exchange data between experimenters as each experiment contained a wealth of data that could be analysed to answer different questions. Therefore, we constructed a special format to store fluorescence data as well as associated information of the trace, such as position and size of the terminal, age of the test subject, categories (e.g. ON/OFF, transient/sustained), the baseline and background fluorescence, or the parameters for the analysis.
The data was stored in a two-dimensional array, each column holding the information of a particular trace. Each column would first hold the raw,

StringtoN umber
As this method rapidly generates very large numbers (in the order of ∼ 10 15 for strings with 10 characters), it is suitable to store and recreate only strings of up to 10 characters, which was, however, sufficient for our use.
Storage and retrieval of data made use of Igor Pro's feature of "dimension labels", which allow to access a point in a wave (an array) by its label, regardless of the absolute position in the wave. Thereby, we were even able to add fluorescence traces with different numbers of points in the database.