Summary
Functional imaging using genetically encoded indicators (GEIs) allows researchers to understand neuronal-, circuit-, and organism-level mechanisms that govern sensory processing and brain function. Here, we present a protocol to extract calcium signals and significant changes in neuronal activity from zebrafish calcium imaging data using the multi-cellular analysis (MCA) toolbox in ImageJ. We describe steps for installing MCA, using all functions within MCA, and plotting MCA outputs. This pipeline can be adapted for use in diverse model systems.
For complete details on the use and execution of this protocol for multiple model systems, please refer to Hageter et al.1
Subject areas: Cell Biology, Single Cell, Developmental biology, Microscopy, Model Organisms, Neuroscience, Computer sciences
Graphical abstract

Highlights
-
•
Instructions for preparing an example dataset for analysis with MCA
-
•
Steps for automatic detection of single cells from imaging data with Cellpose
-
•
Plotting data generated from an example dataset in MCA
-
•
Guidance on annotating neurons and brain regions in MCA
Publisher’s note: Undertaking any experimental protocol requires adherence to local institutional guidelines for laboratory safety and ethics.
Functional imaging using genetically encoded indicators (GEIs) allows researchers to understand neuronal-, circuit-, and organism-level mechanisms that govern sensory processing and brain function. Here, we present a protocol to extract calcium signals and significant changes in neuronal activity from zebrafish calcium imaging data using the multi-cellular analysis (MCA) toolbox in ImageJ. We describe steps for installing MCA, using all functions within MCA, and plotting MCA outputs. This pipeline can be adapted for use in diverse model systems.
Before you begin
Here, we provide a description of the behavioral response and dataset used for this protocol pipeline. Following the loss of environmental illumination, zebrafish will engage in a circling behavior in an attempt to locate a source of light.2,3,4,5 On repeated observations of this behavior, zebrafish and other fish species will preferentially circle in a consistent direction, exhibiting a persistent motor bias for either leftward or rightward circling.2,6 This behavior is controlled by a subset of approximately 60 neurons in the lateral thalamus referred to as asymmetry maintaining neurons (AMNs). The AMNs are made up of two bilateral clusters that maintain an individual’s motor bias direction. Following the loss of illumination, AMNs will exhibit larger calcium flux in the AMN cluster from the hemisphere contralateral to the individual’s bias.7 For example, a rightward circling zebrafish will exhibit stronger responses to the loss of illumination from the AMN cluster in the left hemisphere of the brain. This correlation between behavior, neurophysiology, and neuron type provides a powerful system to resolve and evaluate functional imaging data. Moreover, this dataset allows for the application of motion correction, cell segmentation using nuclear localized GCaMP, and ROI segmentation. For the purpose of this protocol, the calcium imaging dataset used to determine this functional thalamic asymmetry will be used as a sample dataset.1 However, MCA is compatible with a variety of functional imaging techniques and is viable across multiple GEIs, model organisms, and imaging methods such as confocal and multiphoton based functional imaging. This protocol is targeted towards computers and laptops running the Microsoft Windows 11 operating system; however, it is also applicable to Linux and Mac operating systems.
Download Fiji
Timing: <10 min
-
1.
Navigate to https://imagej.net/software/fiji/downloads and download the Fiji distribution for your computer’s operating system.
Note: Multiple copies of Fiji can be installed on the same computer. Just ensure that the “Fiji.app” folder is renamed to something unique so that multiple copies are not merged together.
-
2.
Extract the downloaded zip file to a convenient location such as the desktop.
-
3.
Navigate to the extracted “Fiji” folder to find the “fiji-windows-x64.exe” file.
-
4.
Double click the “fiji-windows-x64.exe” file to open Fiji.
Optional: A Fiji distribution which has all software properly installed is included in the supplemental data.
Optional: A prior installation of Fiji on your system can be used rather than downloading a new Fiji. However, some Fiji update sites are known to cause issues with some MCA functionality.
Download the example dataset
Timing: <2 min
-
5.
Navigate to the supplemental data repository found at https://doi.org/10.17632/9jv3dfdzbb.1
-
6.
Download and extract the “ExampleData” folder to your desktop.
-
7.
Open the “README.MD” file in the “ExampleData” folder to read an overview of the example dataset.
Note: The readme file is written in the markdown language. For proper formatting, it is best opened in a code editor such as VS Code, however, can still be read using a text editor like notepad.
Innovation
Functional imaging has become a foundational technique used for discovering how the brain and other tissue types behave and communicate.8,9,10,11,12,13,14 While there are a variety of software targeted at extracting information from functional imaging datasets, many have a steep learning curve, are based on proprietary software, or require the user to code their own analyses to extract anything meaningful from their data. MCA aims to alleviate this as we designed this software to work with Fiji, which has been an industry standard for scientific image analysis for decades. In addition, MCA provides transparency in analysis, giving the user stepwise visualization of their data. Finally, data generated by MCA is organized in a simple csv-based format allowing for simplified downstream analyses in many programs such as Microsoft Office, python, R, or MATLAB.
Institutional permissions
All experiments with the use of vertebrates or higher-level invertebrates must be performed in accordance with permission from the institutional animal care and use committee (IACUC). For the collection of functional imaging data, readers who follow this protocol must acquire permissions that align with their experimental needs from their relevant institution.
Key resources table
| REAGENT or RESOURCE | SOURCE | IDENTIFIER |
|---|---|---|
| Deposited data | ||
| Sample data | Mendeley | https://doi.org/10.17632/9jv3dfdzbb.1 |
| Software and algorithms | ||
| Multi-Cell-Analysis toolkit (MCA) | GitHub | https://www.github.com/JohnHageter/Multi-Cell-Analysis |
| Fiji/ImageJ | Schneider et al., 201215 | https://imagej.net/software/fiji/ |
| Excel | Microsoft Office | https://www.microsoft.com/en-us/microsoft-365/excel |
Step-by-step method details
Install the MCA toolkit
Timing: <5 min
This section describes how to install the MCA toolkit in Fiji and confirm that it is working.
-
1.
Open Fiji.
-
2.
Run the updater by clicking on “Help >> Update.”
-
3.
Click “Manage Update Sites”.
-
4.Add the MCA update site.
-
a.Click “Add Unlisted Site”
-
b.Paste the MCA update site into the URL block (https://sites.imagej.net/MultiCellPlugins)
-
c.Rename the site to “MCA”
-
d.Click on the checkbox to enable the site
-
e.Click on “Apply and Close”
-
a.
-
5.
Confirm that the MCA plugin and dependencies are added to the ImageJ Updater. A fresh installation will have 11 items (Table 1).
Note: If you are using a Mac or Linux based computer, platform dependent libraries will differ from how they appear in Table 1. They will be appended with “macos-x86_64.jar” or “linux-x86_64.jar”.
Note: If you are using a prior installation of Fiji, you may be missing some dependencies as other update sites may have already installed them. Navigate to the jars folder within the Fiji directory to confirm all necessary dependencies are available. Alternatively, an additional copy of Fiji can be downloaded and specifically used for MCA.
CRITICAL: Ensure all dependencies are installed with the activation of the MCA update site as they appear in Table 1.
-
6.
Click “Apply Changes”.
-
7.
Restart Fiji.
- 8.
Table 1.
Dependencies installed with MCA
| Dependency | Install path |
|---|---|
| MCA | Plugins/MCA.jar |
| JavaCPP (platform) | Jars/javacpp-platform.jar |
| OpenBLAS (platform) | Jars/openblas-platform.jar |
| OpenCV (platform) | Jars/opencv-platform.jar |
| JavaCPP | Jars/javacpp.jara |
| OpenBlas | Jars/openblas.jar |
| OpenCV | Jars/opencv.jar |
| JavaCPP library | Jars/win64/javacpp-windows-x86_64.jar |
| OpenBLAS library | Jars/win64/openblas-windows-x86_64.jar |
| OpenCV library | Jars/win64/opencv-windows-x86_64.jar |
| H2BGCaMP Cellpose model | Models/CellManager-CellposeModels/H2BGCaMP |
| Cyto3 cellpose model | Models/CellManager-CellposeModels/cyto3 |
Table identifying the dependency jars and install paths for files included with enabling the MCA update site.
Indicates a javacpp.jar is a required dependency of MCA, but is included with a new Fiji installation and may not need to be downloaded.
Figure 1.
Opening the Cell Manager
(A) Screenshot of the main ImageJ window indicating where the item is to open the Cell Manager.
(B) Screenshot of the main Cell Manager user interface.
Prepare the example dataset for analysis with MCA
Timing: 10 min
This section prepares the example dataset for subsequent steps by adjusting the images so that they can be properly annotated and used with all MCA functionalities.
-
9.
Navigate to the “Fish1_Right_Videos” folder within the “ExampleData” folder and make a copy of the folder as insurance if you accidentally save over data files.
-
10.Open the 3 files (Map.tif, Run1.tif, and Run2.tif) by clicking and drag & dropping them onto the Fiji window.
-
a.A “Bio-Formats Import Options” window will appear. Ensure the “View stack with:” setting is set to “Hyperstack” and click OK.
-
a.
-
11.Deinterleave the two “Run” image stacks.
-
a.Click on Run1.tif.
-
b.Click on Image >> Stacks >> Tools >> Deinterleave
-
c.Set the “How many channels?” setting to 2.
-
d.Click OK.
-
e.Repeat step 11a-d for “Run2.tif”.
-
a.
Note: Deinterleaving separates the red and green channels. The red channel (appended with #2) indicates when a stimulus light is turning off in the image stack.
Tip: Use your scroll wheel to navigate through slices of the stack. You will see the image turn from a dark gray to black color indicating which slice the light turns off at.
-
12.
Close images “Run1.tif #2” and “Run2.tif #2”.
-
13.Convert the two run stacks to 8-bit.
-
a.Click on “Run1.tif #1”.
-
b.In the Cell Manager, click on “More. > convert stack (8-bit)”.
-
a.
Note: The “convert stack (8-bit)” differs from the ImageJ “Image > Type > 8-bit” which will convert the stack from 16-bit to 8-bit based on how the image is currently displayed. The convert stack (8-bit) function will convert from 16-bit to 8-bit using the original pixel values in the image.
-
14.
Repeat step 15 for “Run2.tif #1”.
-
15.
If completed properly, you will have 3 images open: Run1.tif #1, Run2.tif #1, Map.tif along with the Cell Manager.
Note: The brightness and contrast of any open image can be adjusted beyond this point without altering the pixel data.
Correct the recordings for motion artifacts
Timing: <5 min
This section runs the Motion Correction function in MCA to translate each slice of the image stack to correct for any movement that the fish did during the recording.
-
16.Concatenate the two “Run” images so that “Run2” is added to the end of “Run1”. (Figure 2A).
-
a.Click on Image >> Stacks >> Tools >> Concatenate.
-
b.Set “Image1” to “Run1.tif #1”.
-
c.Set “Image2” to “Run2.tif #1”.
-
d.Set “Title” to “Runs”.
-
e.Ensure all checkboxes are disabled.
-
f.Click OK.
-
a.
-
17.Run the Motion correction function in the Cell Manager.
-
a.Select the “Runs” image by clicking on it.
-
b.Click “Motion Correction” in the cell manager.
-
c.Click and drag on the “Runs” image to draw a box encompassing ∼75% of the image area (Figure 2B)
-
d.Click OK on the “Motion Correction” popup window.
-
a.
-
18.Ensure the motion correction was applied properly.
-
a.Use the scroll wheel to pan through the “Runs_REGISTERED” image stack to ensure minimal movement.
-
b.By running Image >> Stacks >> Z project. and setting the projection type to sum slices you can quickly determine how well the motion correction was applied. If the output image is clear, the motion correction worked well (Figures 2C and 2D).
-
c.Close the “Runs” image.
-
a.
Note: The individual used in this example didn’t have many motion artifacts to correct for. For a better visualization of how well the motion correction step corrects artifacts, repeat step 17 using the “MotionArtifact.tif” file found in the ExampleData/Supplemental folder.
-
19.Separate the motion corrected stack back into the Run1 and Run2 stacks.
-
a.Select the “Runs_REGISTERED” image.
-
b.Run Image >> Stacks >> Tools >> Stack Splitter.
-
c.Set the “Number of substacks” setting to 2.
-
d.Click OK.
-
e.Close the “Runs_REGISTERED” image.
-
a.
-
20.
If completed properly, you will have 3 images open: stk_0001_Runs_REGISTERED, stk_0002_Runs_REGISTERED, and Map.tif.
Figure 2.
Correcting motion artifacts in MCA
(A) Screenshot of the settings necessary to concatenate multiple stacks in ImageJ.
(B) Screenshot with a representative template ROI drawn that is used for the motion correction. (scale bar 20 μm) C. Representative sum projection of an image stack that was simulated to highlight motion occurring through a recording.
(D) Representative sum projection using the simulated motion correction stack from C. following the motion correction function. (scale bar 5 μm).
Run automated cell detection to identify single cells
Timing: 5–15 min
This section runs the Cellpose automated cell detection and imports the cell ROIs into the Cell Manager. In addition, this section automatically installs a functioning Cellpose environment and machine learning models which can identify cells in a single plane image.
Alternatives: This protocol specifically uses Cellpose for automated cell detection, however StarDist2D is an available function under “More. > StarDist2D.”. This can be used for the automated detection of cells which populate directly into the ImageJ ROI manager. More information about using this function can be found in the Github documentation at https://www.github.com/JohnHageter/multi-cell-analysis.
-
21.Create a sum projection of one of the run images.
-
a.Select one of the Runs_REGISTERED images. For this example “stk_0001_Runs_REGISTERED” is being used.
-
b.Run Images >> Stacks >> Z project.
-
c.Change the projection method to “sum slices”.
-
d.Click OK.
-
a.
-
22.Run the Cellpose automated cell detection algorithm.
-
a.Select the sum projection image denoted by the prefix “SUM_” in the title.
-
b.In the Cell Manager, select More >> Cellpose.Note: The Cellpose. function automatically detects if you have Cellpose installed on your system. This protocol assumes the reader does not have it installed. If you have a Cellpose environment installed continue to step 22e. If you do not have Cellpose installed, MCA will automatically download a micromamba distribution and create the Cellpose environment.
-
c.In the “Cellpose not found” popup window, select OK to install Cellpose.Alternatives: If you already have Anaconda or mamba installed on your system and wish to create the Cellpose environment through that rather than downloading and using the micromamba version you can by going to the Cellpose website (https://github.com/MouseLand/cellpose) and following their instructions for installation.
-
d.Upon successful completion ImageJ will log where Cellpose was installed to indicated by the “Cellpose environment installed at:” line followed by the location on your computer (Figure 3A). Save this file location by writing it in a notebook or saving in a text document.
-
e.Enter the Cellpose install location into the “Cellpose environment” setting.
CRITICAL: MCA will automatically fill in the “Cellpose environment” setting with the default install location. Ensure that the location in the field matches the Cellpose install location from step 22d. -
f.Change the “Model” setting to “H2BGCaMP”.
-
g.In the additional arguments type “--diameter 10” without the quotes.Tip: The diameter argument will differ for different datasets and zoom levels. The diameter argument for cellpose can be determined by using the “line” ROI tool found in the ImageJ toolbar. Select the line tool and click and drag the line across a few of the cells in the image while holding the left mouse button down. ImageJ will display the length of the line in the status bar. Use this method to measure a few cells and determine an average length to use for cellpose.
-
h.Click OK.
-
i.ImageJ will print information about the cell detection to the log.
-
a.
-
23.
Ensure the Cell Manager was populated with the identified cells. (Figure 3B)
Figure 3.
Activating and using Cellpose in MCA
(A) Screenshot of example logging that occurs when running Cellpose through MCA on a single plane image.
(B) Screenshot of the Cell Manager window following running Cellpose indicating that the window was correctly populated with identified cells.
Tip: The Cellpose naming ensures that all possible values are unique, however they can be hard to work with. You can automatically set a standard naming structure to the cells by selecting More. >> set standard name in the Cell Manager.
-
24.
Close the image with the “SUM_” prefix.
Annotate ROIs generated from Cellpose
Timing: 10 min
This section explains how to use the Point grouping and Polygon grouping functions in MCA to group cells together based on anatomical location or the expression of a visible transgene.
-
25.
Select the Map.tif image.
-
26.
Click the checkbox for “Show all” in the Cell Manager to display all ROIs.
-
27.
Set the slice to 1/2 by using the arrows located at the bottom of the image.
-
28.Run the Polygon grouping function to group the left and right hemisphere together. (Figure 4A)
-
a.Click the “Polygon grouping” function in the Cell Manager.
-
b.Type “Left” in the “Group name” box and click OK.
-
c.Click on the image to add polygon points to encompass the ROIs in the left hemisphere.Note: The example individual here is facing towards the left side of the image so the left hemisphere is towards the bottom of the image while the right hemisphere is towards the top.
-
d.Close the polygon by clicking on the first point you selected (yellow node) or by right clicking with your mouse.
-
e.Click OK in the “Apply group” window.
-
a.
-
29.
Repeat steps 29a-e for the right hemisphere.(Figure 4B)
-
30.
Ensure the groups were properly labeled by clicking on the “Groups” button in the Cell Manager. You should have two groups named “Left” and “Right”.
-
31.
Display all the cell ROIs by clicking on the “Cells” button in the Cell Manager.
-
32.Run the point grouping to select the AMNs. (Figure 4C)
-
a.Select the Map.tif image.
-
b.Click the “Point grouping” button in the Cell Manager.
-
c.Type “AMNs” in the group name setting and click OK.
-
d.Click within the bounds of a cell ROI (yellow outline) to add it to the group.Tip: If visualizing the yellow cell ROI outlines against the gray image is difficult, adjust the brightness using the brightness and contrast tool (Image >> Adjust >> Brightness/Contrast.) or by changing the lookup table (Image >> Lookup Tables).
-
e.Click OK in the “Apply group” popup window.
-
f.Click Delete in the “Delete points” popup window.
-
g.Ensure the AMNs group was properly added by selecting it in the “Groups” tab in the Cell Manager.Note: The final annotated images for steps 25-32 are available in the ExampleData/Supplemental folder denoted by the prefix “Annotated_”.
-
a.
-
33.
Close the Map.tif image.
Figure 4.
Annotating groups of cells in MCA
(A) Screenshot of the polygonal grouping of cells from the left hemisphere of the recording. (scale bar 20 μm).
(B) Screenshot of the polygonal grouping of cells from the right hemisphere of the recording. (scale bar 20 μm).
(C) Screenshot of the point grouping of cells from the AMNs in the recording. Red channel from A and B isolated and converted to a grayscale look up table for clarity. (scale bar 20 μm).
Generate the final data for export
Timing: <5 min
This section explains how to generate, export, and plot responses from single cells acquired from the MCA toolkit.
-
34.Convert stacks to the relative change in fluorescence equivalent.(Figure 5A)
-
a.Select one of the “Runs_REGISTERED” images.
-
b.Click on the “Convert stack to DF/F″ button in the Cell Manager.
-
c.Set the “Baseline:” setting to “1-60” without quotes.Tip: The “Baseline” duration should be a long period of low activity at least >10 slices. In this example we used half of the recording period prior to the onset of the stimulus which occurs at slice 120. Slower frame rates can use less slices, but faster or more noisy images should use more.
-
d.Ensure the checkbox next to “Subtract background” is selected.
-
e.Click OK.
-
f.Set the “Rolling ball radius” to 50.0 pixels in the Subtract background window.Tip: Information about the rolling ball background subtraction can be found at https://imagejdocu.list.lu/gui/process/subtract_background. Typically, a value that does not decimate the object being measured. In this case, 50 pixels removes the background without also removing any of the cells.
-
g.Ensure no checkboxes are enabled.
-
h.Click OK.
-
i.Click Yes in the “Process Stack” window.
-
j.Repeat steps 34a-i for the other “Runs_REGISTERED” image.
-
a.
-
35.Generate final data tables for the compiled videos.
-
a.Click the “generate data” button in the Cell Manager.
-
b.Set the Name to “Fish1_”.
-
c.Set Num videos to 2.
-
d.Set the Response call method to “Peak Detection”.
-
e.Set the Filtering Method to “Gaussian”
-
f.Click OK.
-
a.
-
36.Input the parameters for the peak detection method.
-
a.Set the Lag to 30.
-
b.Set the Threshold to 3.
-
c.Set the Influence to 0.250.
-
d.Click OK.
-
a.
Note: Lag, threshold, and influence arguments will vary depending on imaging frame rate, type of indicator, and significance choice. More information about these parameters can be found in the original publication1 or in the documentation found at https://www.github.com/JohnHageter/multi-cell-analysis.
-
37.Input the parameters for the gaussian filter.
-
a.Set the Sigma to 0.300.
-
b.Click OK.
-
a.
-
38.Select the images to be included in the analysis.
-
a.Set iteration 1 to “stk_0001_Runs_REGISTERED_DELTAF”.
-
b.Set iteration 2 to “stk_0002_Runs_REGISTERED_DELTAF”.
-
c.Click OK.
-
a.
-
39.
Scan through the slices in the image appended with “_PEAK” to visualize where significant changes in activity are occurring.(Figure 5B)
Note: All cells are labeled in the image with “_PEAK” appended to the title. A blue outline indicates there was no significant change in the signal for the current slice of the stack, a green outline indicates a significant increase to the signal, and a red outline indicates a significant decrease to the signal.
-
40.
Save the “Peak Detection Results” as a csv by clicking on File >> Save as.
-
41.
Repeat step 40 for the Signal Results.
CRITICAL: Do not use the “File >> Save as.” on the Fiji toolbar as this will not work for the output tables. Use the “File >> Save as.” on the windows titled “Peak Detection Results” and “Signal Results”.
-
42.
Close Fiji.
Figure 5.
Generating and reviewing data in MCA
(A) Representative screenshots indicating the process of converting an image stack to its delta f/f equivalent in MCA. The “subtract background.” window in the middle highlights the settings that should be used for the example recording. (scale bar 20 μm).
(B) Screenshot of a representative slice of the “_PEAK” appended image stack indicating cells that have no change in activity (blue), a significant increase in activity (green), and a significant decrease in activity (red). (scale bar 20 μm).
Visualize MCA data outputs
Timing: 10 min
-
43.
Open “Signal results.csv” and “Peak detection results.csv” in a spreadsheet editor such as Excel or Google Docs.
Note: This protocol will be using Microsoft Excel. If you chose to use a different spreadsheet editor, subsequent steps may vary.
-
44.Filter the Group column to only display groups “Left:AMNs” and “Right:AMNs”.
-
a.Click on column “C” to highlight the entire column.
-
b.In the home tab click on “Sort & Filter” and “Filter”.
-
c.Open the filter menu on the right side of cell C1 and deselect the “Left:” and “Right:” boxes.
-
a.
-
45.Filter out cells of interest (AMNs).
-
a.Repeat step 44 for both the Signal results and Peak detection results.
-
b.Open a new excel document by using File >> New >> Blank workbook.
-
c.Copy and paste the filtered rows from the Signal data csv into the new workbook.
-
d.Create a new sheet by clicking the “+” icon at the bottom of the new workbook.
-
e.Rename “Sheet1” to “Signal” and “Sheet2” to “Peaks”.
-
f.Navigate back to the Signal sheet.
-
g.Insert a new column by right clicking on column “H” and clicking insert.
-
h.At the top of the newly inserted column (cell H1) type “Response”.
-
a.
-
46.Identify cells that respond to the loss of light.
-
a.Click on cell H2 to start typing in it.
-
b.Copy and paste the following line, excluding the quotes, into cell H2: “=IF(SUM(Peaks!CI2:CN2)>3, “OFF”,“NONE”)”.
-
a.
-
47.Isolate OFF responsive AMNs.
-
a.Using the same method as in step 54, filter the “Response” column to only show “OFF” responses.
-
b.Copy and paste the filtered rows into a new sheet named “Analysis”
-
c.Insert a row between the “Left:AMNs” group and the “Right:AMNs” group for visibility.
-
d.Below all rows in column H, name a cell (H26) “Opposed” and right below (H27) “Matched”.
-
a.
-
48.Average signals from all cells in each group.
-
a.Click on the cell immediately to the right of the “Matched” cell (I27).
-
b.Click on the dropdown arrow next to “AutoSum” in the Home tab.
-
c.Select “Average”.
-
d.Click and drag to highlight all values in the “Slice_1” column of the “Left:AMNs” group.
-
e.Press Enter.
-
f.Repeat step 68 for the “Right:AMNs” group.
-
g.Highlight both cells just populated with the Slice_1 average for each group.
-
h.Click on the green square in the bottom right corner of the highlight outline and drag rightward to the final column with data in the spreadsheet.
-
a.
-
49.Plot the average signal from each group. (Figure 6).
-
a.Highlight all values from the “Matched” and “Opposed” averages.
-
b.in the “Insert” tab locate the line chart indicated by its icon and click it.
-
a.
Figure 6.
Plotting signal results from MCA in Excel
(A) Screenshot of the expected figure following completion of steps 44-49 where average cell responses are plotted on a single line chart.
Expected outcomes
Following completion of this protocol the user will gain familiarity with the various functions available in the MCA toolkit and be able to properly apply them to their own analyses. Data generated using MCA will enable users to determine spontaneous or stimulus evoked neural activity from fluorescent indicators. Outputs can be generated from a variety of ROI types in imaging such as single cell ROIs, or ROIs encompassing entire brain regions. Also, the user should understand how to confidently work with the data generated in MCA and be able to efficiently generate figures from standard outputs.
Limitations
MCA is designed to work with single plane single channel calcium imaging datasets and is not readily applicable to volumetric imaging data or ratiometric indicators without extensive alteration of this protocol. However, there may be workarounds possible with the available functions provided by MCA, yet we didn’t account for such usage since other programs specifically designed for volumetric imaging and ratiometric indicators are available. The MCA toolkit is heavily tested and designed for the Windows operating system, yet minimal testing has been done to ensure proper functionality with Linux and MacOS based machines. Therefore, bugs and graphical artifacts inevitably exist. Users are encouraged to report these to the technical lead either by email or by using the issues tab available on the GitHub page so they can be addressed and other users in the community can be aware of them. Lastly, Fiji is an open-source platform, and anyone can develop plugins for it which may or may not be compatible with MCA. All currently known incompatibilities are available on the GitHub page for MCA.
Troubleshooting
Problem 1
Entire rows of outputs in the Signal Results data table are “NaN” or “Inf” (related to step 35).
Potential solutions
NaN (not a number) or Inf (infinity) indicates that MCA attempted to divide by 0 or a number very close to 0 during the data generation step. Typically, this is due to cells that have a baseline value of 0 or if the cell is located near the outer edges of the stack. If the cell was along the outer edges of the stack, manually delete the cell from the Cell Manager and redraw a new cell using ImageJ’s built-in ROI tools located on the main ImageJ window. Pan through the stack and make sure the ROI is contained within the image throughout the stack. If the baseline is 0, it indicates that the brightness of the image is too low or that converting to 8-bit reduced small values to 0. In this case, apply a linear correction to make the image brighter (see step 13 and click “Apply”).
Problem 2
ImageJ logged a red error. (related to any step that uses a function in the Cell Manager).
Since ImageJ allows community works and many plugins use the same libraries, versions may differ, or incompatibilities may arise between MCA and another plugin. Ensuring the correct version of Fiji is installed and all the dependencies downloaded with MCA are correct can fix most of these issues.
Potential solutions
Closing out of ImageJ completely or simply restarting the Cell Manager may fix most error messages. In some instances, just rerunning the step can bypass the error. If error messages become too common, the recommended action is to install a new instance of ImageJ and have the MCA site as the only additional update site enabled aside from the enabled defaults that come packaged with ImageJ. Specific version information for a stand-alone ImageJ installation can be found at the GitHub repository (https://www.github.com/JohnHageter/Multi-Cell-Analysis).
Problem 3
My output doesn’t look the same as what’s published here. (related to steps 43-49).
There will be minor variations between different instances of using MCA on the same dataset. Particularly, the motion correction will vary based on the ROI drawn (step 17), which series is used to make a sum projection for input to Cellpose (steps 21-22), and potentially variation among different computer hardware.
Potential solutions
If you wish to replicate this protocol exactly to get an identical graph output or identical csv output, follow the same steps presented, but use the resulting images which are available with the supplemental data. For example, follow the steps to run the motion correction (steps 17-19), but subsequently use the “stk_0001_Runs_REGISTERED” and “stk_0002_Runs_REGISTERED” stacks included in the supplemental data. You may also use the “Left.png”, “Right.png”, and “AMNs.png” pictures included in the data to assure that you annotated the cells exactly how they are annotated for steps 25-32.
Problem 4
General information about using MCA, ImageJ, Cellpose, or StarDist2D.
Potential solutions
For more information about using MCA, please refer to the documentation available on Github. General information about using native ImageJ tools or plugins can be found at https://imagej.net/learn/. For more information about the usage of Cellpose or StarDist2D, please refer to the original publication.1
Resource availability
Lead contact
Further information and requests for materials used in this manuscript should be directed to and will be fulfilled by the lead contact, Eric Horstick (eric.horstick@mail.wvu.edu).
Technical contact
Technical information and requests for assistance with the software or further troubleshooting information should be directed to and will be fulfilled by the technical contact, John Hageter (john.hageter@mail.wvu.edu).
Materials availability
This study did not generate any unique materials or reagents
Data and code availability
Data reported in this study are available in the supplemental data repository at https://doi.org/10.17632/9jv3dfdzbb.1. Source code and documentation for the MCA toolkit can be found at the GitHub repository (https://www.github.com/JohnHageter/Multi-Cell-Analysis) or the Zenodo repository (https://doi.org/10.5281/zenodo.17610801).
Acknowledgments
This work was supported by the National Science Foundation cooperative agreement OIA2242771, National Eye Institute R15EY036226, and National Institute of General Medical Sciences P20GM144230 awarded to E.H. We would like to thank Oliver Cook for assisting in the preparation of this manuscript.
Author contributions
Conceptualization, methodology, validation, and writing – original draft, J.H.; reviewing and editing, J.H. and E.H.
Declaration of interests
The authors declare no competing interests.
Contributor Information
John Hageter, Email: john.hageter@mail.wvu.edu.
Eric Horstick, Email: eric.horstick@mail.wvu.edu.
References
- 1.Hageter J., DelGaudio A., Leathery M., Johnson B., Raupp T., Holcomb J., Treviño A.F., Jonaitis J., Bridi M.S., Dacks A., Horstick E.J. A multicellular analysis calcium imaging toolbox for ImageJ. Cell Rep. Methods. 2026;6 doi: 10.1016/j.crmeth.2025.101298. 0. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 2.Horstick E.J., Bayleyen Y., Burgess H.A. Molecular and cellular determinants of motor asymmetry in zebrafish. Nat. Commun. 2020;11:1170. doi: 10.1038/s41467-020-14965-y. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 3.Horstick E.J., Bayleyen Y., Sinclair J.L., Burgess H.A. Search strategy is regulated by somatostatin signaling and deep brain photoreceptors in zebrafish. BMC Biol. 2017;15:4. doi: 10.1186/s12915-016-0346-2. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4.Hageter J., Waalkes M., Starkey J., Copeland H., Price H., Bays L., Showman C., Laverty S., Bergeron S.A., Horstick E.J. Environmental and Molecular Modulation of Motor Individuality in Larval Zebrafish. Front. Behav. Neurosci. 2021;15 doi: 10.3389/fnbeh.2021.777778. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.Waalkes M.R., Leathery M., Peck M., Barr A., Cunill A., Hageter J., Horstick E.J. Light wavelength modulates search behavior performance in zebrafish. Sci. Rep. 2024;14 doi: 10.1038/s41598-024-67262-9. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 6.Starkey J., Hageter J., Kozol R., Duboué E.R., Horstick E.J. A conserved teleost motor asymmetry requires evolutionary retention of vision. iScience. 2025;28 doi: 10.1016/j.isci.2025.114035. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Hageter J., Starkey J., Horstick E.J. Thalamic regulation of a visual critical period and motor behavior. Cell Rep. 2023;42 doi: 10.1016/j.celrep.2023.112287. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 8.Jonaitis J., Mazri M.F.E.B., Hageter J.W., Cook O., Sizemore T.R., Bennett M.M., Ralston J.D., Salman F., Fletcher E.J., Matheny D.E., et al. Differential modulation of feedforward inhibition reflects topographic organization in the olfactory system. Nat. Commun. 2025;16:11165. doi: 10.1038/s41467-025-66107-x. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Chen W., Natan R.G., Yang Y., Chou S.-W., Zhang Q., Isacoff E.Y., Ji N. In vivo volumetric imaging of calcium and glutamate activity at synapses with high spatiotemporal resolution. Nat. Commun. 2021;12:6630. doi: 10.1038/s41467-021-26965-7. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.Mu Y., Bennett D.V., Rubinov M., Narayan S., Yang C.-T., Tanimoto M., Mensh B.D., Looger L.L., Ahrens M.B. Glia Accumulate Evidence that Actions Are Futile and Suppress Unsuccessful Behavior. Cell. 2019;178:27–43.e19. doi: 10.1016/j.cell.2019.05.050. [DOI] [PubMed] [Google Scholar]
- 11.Tu M.K., Levin J.B., Hamilton A.M., Borodinsky L.N. Calcium signaling in skeletal muscle development, maintenance and regeneration. Cell Calcium. 2016;59:91–97. doi: 10.1016/j.ceca.2016.02.005. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 12.Zong W., Obenhaus H.A., Skytøen E.R., Eneqvist H., de Jong N.L., Vale R., Jorge M.R., Moser M.-B., Moser E.I. Large-scale two-photon calcium imaging in freely moving mice. Cell. 2022;185:1240–1256.e30. doi: 10.1016/j.cell.2022.02.017. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 13.Bando Y., Grimm C., Cornejo V.H., Yuste R. Genetic voltage indicators. BMC Biol. 2019;17:71. doi: 10.1186/s12915-019-0682-0. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 14.Zhang Y., Rózsa M., Liang Y., Bushey D., Wei Z., Zheng J., Reep D., Broussard G.J., Tsang A., Tsegaye G., et al. Fast and sensitive GCaMP calcium indicators for imaging neural populations. Nature. 2023;615:884–891. doi: 10.1038/s41586-023-05828-9. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 15.Schneider C.A., Rasband W.S., Eliceiri K.W. NIH Image to ImageJ: 25 years of Image Analysis. Nat. Methods. 2012;9:671–675. doi: 10.1038/nmeth.2089. [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
Data reported in this study are available in the supplemental data repository at https://doi.org/10.17632/9jv3dfdzbb.1. Source code and documentation for the MCA toolkit can be found at the GitHub repository (https://www.github.com/JohnHageter/Multi-Cell-Analysis) or the Zenodo repository (https://doi.org/10.5281/zenodo.17610801).

Timing: <10 min




