CaFFEE: A Program for Evaluating Time Courses of Ca2+ Dependent Signal Changes of Complex Cells Loaded with Fluorescent Indicator Dyes

Quantification of changes in intracellular free Ca2+ concentrations [Ca2+]i is fundamental to the understanding of the physiology of single cells in response to both environmental and endogenous stimuli. Here we present easy to use freeware that allows especially the evaluation of [Ca2+]i signals in complex and mixed cultures. The program CaFFEE (Calcium Fluorescent Flash Evaluating Engine) enables the user to evaluate the response of hundreds of cells to treatments that influence [Ca2+]i. CaFFEE processes large quantities of image data, automatically identifies individual cells in mixed, heterogeneous populations, and evaluates their fluorescence signal. All data are exported in spreadsheet format, and data on thousands of cells can be batch-processed. Moreover, the program optimizes the visual representation of time-lapse image data for user-guided data exploration (setting of parameters for semi-automated data processing). The freeware allows the standardized and transparent processing of imaging data independent of the platform used to gen-

ther by changes in fluorescence intensity or a shift of emission/ excitation wavelengths. There are different ways to monitor these changes, like the use of fluorimeters (for suspended cells), FACS analysis (for individual cells), whole well fluorescence detection (e.g., using FLIPR instruments) or imaging by fluorescence microscopy. In the latter case, signals may be captured on a standard microscope (upright or inverted), by confocal microscopy or by high content imaging. In all these cases, 2D images (sometimes as stacks into the third dimension) are obtained before and after a stimulus or as a continuous sequence of frames in a time series (time-lapse imaging).
To gain quantitative information from these images one can compare the changes in overall brightness or the changes in brightness of the single pixels that make up an individual cell. For this purpose, the regions of interest (ROI), i.e., the pixel areas to be quantified, need to be defined either manually or by automat-
There are different ways to measure [Ca 2+ ] i (Brini et al., 1999;Bassett and Monteith, 2017;Ma et al., 2017;Ronzhina et al., 2013;June and Moore, 2004;Simpson, 2006;Hirst et al., 1999;Hayashi and Miyata, 1994;Tsien, 1992). One of them is imaging of cells loaded with calcium indicators. For this purpose, fluorescent dyes (e.g., Fura-2, Indo-1 or Fluo-4) that change their fluorescence properties in response to Ca 2+ binding are commonly used. Depending on the indicator, Ca 2+ concentrations are assessed ei-ic definition. Automatic definition means that cells are identified automatically based on additional staining or structural features. CaFFEE uses a nuclear stain to identify the cells, and it then uses this information to define each cell as an ROI. Subsequently, the average fluorescent intensity of these pixels is measured over a series of pictures. Thus, time-dependent fluorescent values are obtained for every single cell. This information is converted to curves from which different parameters can be derived (Fig. 1). Furthermore, it is also possible to define subcellular structures (e.g., nuclei) that can be evaluated for [Ca 2+ ] i -responses.

Special requirements for stem cell-derived neuronal cultures
In neuronal cultures, the identification of different cell structures allows differentiation between the cell body (soma) and the neurites. The changes in [Ca 2+ ] i might differ between these two parts of the neuron. Challenges in stem cell-derived neuronal cultures are: (i) dead cells and (ii) the heterogeneity of the cell population. The cultures may include, for example, partially differentiated neurons or glial cells. Moreover, the neurons differ in their receptor number, size, thickness and shape. Once every single cell is identified, the program allows exclusion of specific cells from the analysis, depending on their size or response characteristics.

Challenges and problems
Many programs are available to analyze [Ca 2+ ] i imaging experiments. Some have a much higher level of sophistication and a broader panel of available tools than CaFFEE. However, indepen-dent of the software used, background correction and adaptation of image dynamics are problems that cannot be solved perfectly in a fully automated way. CaFFEE offers the user visual tools to manually optimize images. The optimized settings are then used on the entire time series batch. When the cell population is heterogeneous, it is also challenging to identify the active cells and analyze only their response characteristics. This becomes particularly challenging if large numbers of cells are to be analyzed in parallel.

Main features of CaFFEE 1
Here, we describe the CaFFEE (Calcium Fluorescent Flash Evaluating Engine) program, which can solve several of these problems. It evaluates time series images (in an uncompressed file format .avi [audio video interleave]) that describe the [Ca 2+ ] i of neurons under various conditions. The program comprises the four distinct functions detailed below.
Function 1: Image processing By using the image processing module, the different channels (typically green for Ca 2+ fluorescence and blue for nuclei) can be optimized individually. The general background can be forced to zero and the highest brightness to full white, thereby giving the remaining levels of gray the full dynamic range (0-255 for normal monitors). The representation of the pictures does not have to be a linear transformation of the original pictures. Different non-linear monotonous transformations are offered in CaFFEE. Image optimization can be done separately for the two channels, and the information (image sequence) can be combined again later. This feature enables the user to generate a multi-color image sequence from optimized sequences of the individual channels. In short, image 1 http://invitrotox.uni-konstanz.de/CaFFEE/ specified timepoint, a stimulant is added and the response of the selected cells is recorded. In simple terms, there is a "before" and an "after" period in most experimental setups. CaFFEE averages the signals of "before" frames and compares these with the signals of the averaged "after" frames. The resulting differences are then depicted in one picture, showing the differences in fluorescence for each pixel in a false color representation or as a 3-dimensional picture.

Function 3: Evaluation of time series images
The central function of CaFFEE is the evaluation of the [Ca 2+ ] i fluorescence signal, or any other time-dependent fluorescence sequences processed by CaFFEE provide information with more contrast and a better signal-to-noise ratio. The enhanced quality of the resulting image sequence will not influence the later evaluation of the brightness / intensity response characteristics, as these calculations will always be performed on the original set of images.

Function 2: Visualization of averaged responses
Another feature of CaFFEE is a visual, spatially resolved depiction of differences in [Ca 2+ ] i in one picture. In short: an artificial picture is created that shows the differences in fluorescence before and after stimulation pixel by pixel. A typical experiment has a period during which baseline images are recorded. Then, at a  Table showing the calculated values of the single cells. Each bona fide cell is assigned a unique number ("#"). Data for four exemplary cells are shown. The value of fluorescence intensity is given for the baseline (F 0 ) "Base" and for the peak (F) "Top". From these values, the maximum difference "Delta" (F-F 0 ), the relative increase of signal "Delta/F0" (F-F 0 /F 0 ), and the fold increase of signal "F1/F0" (F/F 0 ) are calculated. CaFFEE automatically calculates the frame at which the curves deviate from the baseline. It interprets this as the timepoint when the addition of the stimulus occurred "EC50". (B) Graphical representation of the raw data showing the fluorescence intensity of hundreds of single cells. (C) Mathematical approximation of the corresponding raw data (baseline correction and curve fitting). (D) Graph of total fluorescence intensity of the whole frame sequence (black) compared to total fluorescence intensity of the identified cells (blue). The matching curves show that the behavior of the fluorescence of the images is completely explained by that of the identified cells, indicating that no major disturbances (pipetting artefacts, etc.) play a role in this experiment. entered. The program uses the part of the curve with the highest slope as indication that the stimulation has occurred and gives out the corresponding frame.
It is important to realize that CaFFEE uses frames as units on the x-axis instead of time. Thereby CaFFEE is independent of the original time frame of the image series. With knowledge of the experimental protocol, the x-axis can be converted later using the Excel data matrix. No fixed number of images is necessary for the analysis, but the precision of the analysis increases with the number of images available. These simplified features make it unnecessary to enter other experimental data in CaFFEE, which often is a source of errors.

Example
Practical examples often help to illustrate program features. Here, we present an experiment based on neurons derived from stem cells (Hoelting et al., 2016) where we assessed their response to 30 mM KCl. We used an automated microscope system (Cellomics, VTI ArrayScan, Thermo Fisher) with an incubation chamber set to maintain 5% CO 2 and 37°C. Images were taken for 45 s at maximum speed, which results in a rate of approx. one image per second. It is important to be aware of such recording characteristics and inter-image time intervals, as CaFFEE always labels the x-axis in units of frames instead of real time. In our experiment, 30 mM KCl was administered by an automated pipettor after 10 s (= 10 frames). Pictures were taken over the remaining time of 30 s. First, CaFFEE was used to optimize the contrast of the images in the image sequence (.avi file). Second, nuclear size and intensity were used to define bona fide nuclei. Size exclusion was used to exclude shrunken (dead) nuclei or fragments. The settings were translated by CaFFEE into a color-coded picture, where blue nuclei are bona fide nuclei, yellow ones are excluded on account of their size and red ones on account of their intensity. Sliders for the different parameters allow quick manual, visually controlled optimization of the settings.
Next, pressing the "Evaluation" button started the fully automated evaluation process by which CaFFEE identified all cells based on their nuclear position and provided fluorescence data (F 0 , F) for every single cell for every frame. Such data are presented as (A) a table in spread sheet format, (B) a graph for intensity of every identified cell without baseline correction of every frame, (C) a mathematical approximation for every identified cell of every frame, and (D) a graph of total fluorescence intensity of the whole picture compared to total fluorescence intensity of the cells (Fig. 2). The raw and the calculated data were exported to Excel for further quantitative analysis. For more detailed instructions on the various described steps, see the handbook and the program 1 , which are both freely available for download.

Outlook
The program is under dynamic development. New features are planned, e.g., defining neurites, or setting the stimulation trigger time. All new versions will be placed on the website 1 . signal for defined ROI, usually corresponding to cell bodies. Here, images are transformed to numbers and curves, which may be graphically displayed and exported. CaFFEE uses the fluorescence signal of the nuclei to determine their number and to calculate their position. With the resulting data, it then checks whether these areas are consecutively represented in every image in the series. For those nuclei that are present in every frame, the fluorescence of the same area in the Ca-specific channel is measured before (F 0 ) and after stimulation (F) as the average brightness/pixel. These data are used to determine parameters like maximum delta (the increase of fluorescence signal over baseline (F-F 0 ) "Delta" (Fig. 2A)), the relative increase of signal ((F-F 0 )/F 0 "Delta/F0" (Fig. 2A)) and the fold increase of signal ((F/F 0 ) "F1/F0" (Fig. 2A)). The measurements are typically fitted to sigmoid or double sigmoid curves. The user can look at every cell trace individually to observe its behavior or can sort by the various parameters and know which cell is responsible. All data shown on the screen are interactive and will show all data that belong together with just one click. The raw data and the calculated summary data are easily exported to an Excel file.
Function 4: Batch processing of data Often, a whole set of experiments (e.g., controls, different treatments and various concentrations of the stimulant) will be performed, each resulting in a separate .avi file. If these files are all placed in the same subdirectory (folder), CaFFEE can be used to evaluate all of these files in one single pass. The result will be an Excel workbook with one sheet for every .avi file containing all the data for that file and an extra "summary" sheet on which the relevant data of the different experiments are summarized in a single table. The batch feature makes the analysis of large experiments with high numbers of biological and technical replicates, as they are common in toxicological studies, very fast and efficient.

Experimental preconditions
To analyze the time lapse sequence, CaFFEE uses two fluorescence channels. The nuclei are visualized by staining with H-33342 (or DAPI), and the [Ca 2+ ] i is detected by staining with Fluo-4-AM (or any single wavelength indicator showing similar fluorescence properties). They are visualized in blue and green, respectively. The present version of CaFFEE expects these two channels to be used. It is not possible to swap channels in the program or to leave one out. Each time lapse sequence must be in an .avi file format with a frame size of 512 x 512 pixels or smaller. Larger frame sizes will not be shown in full size, and cannot be analyzed. The magnification (10 x or 20 x in our system) chosen for the microscope does not influence the analysis. If the output is to be subsequently exported directly to Microsoft Excel, this program must be installed on the same computer in order to use this feature.
For defining a baseline (F 0 ), it is necessary to record some images before addition of the stimulus. CaFFEE automatically calculates the baseline from all images that are recorded before the stimulus is added. Notably, CaFFEE does not automatically recognize the addition of a stimulus, nor can this information be