Extracting calcium traces
Workflow to extract calcium responses from the aligned data
Last updated
Workflow to extract calcium responses from the aligned data
Last updated
The analysis workflow will extract the "Mean Intensity" of each cell or object you define within the image. The script exports the normalized data by default. If you want the raw data, make sure to untick "Use F_F0".
Go to GAT -> Calcium imaging -> Calcium imaging analysis
Click on "Browse".
Navigate to the folder containing the file and select the image.
You have the option of saving the data as normalized to baseline. If you leave F_F0 ticked, it will extract the normalized traces. If you want the raw data, untick the box. Once you're done, click Ok.
The image will open and you will be presented with a prompt. You can use this opportunity to check your image for blank frames. "max_stack" here means the frames which you can use as a reference for manually defining cells/ROIs.
Scroll through the image by dragging the slider. In this example, the enteric glial cells show a calcium response at frame 40. As we can see the cells clearly, we'll use a range of frames that capture this response as the "max_stack" or reference frame for ROIs.
Click "OK "
8* In this example, we define the reference frame window from 20 to 76 frames.
Once we click Ok, we get a 2D maximum intensity projection of the range we specified.
As we selected F_F0, we need to define the frames that are the baseline. Usually, we use the frames before the stimuli (ex: adding a drug). In this case, the drug was added around frame 37. Click Ok.
We enter a range of 1 to 25 as baseline. There was some artefact before drug addition, so we avoid that by choosing a lower end frame.
Once you click Ok, you will be presented with an image that looks very different than you're original dataset. This is the image normalized to baseline. Essentially, only cells that respond above baseline will show as bright regions.
If we scroll through the dataset, the first few frames have nothing and responding cells show up as bright objects from frame 40 onwards.
The F/F0 image stack is quite good at delineating responding cells and also seeing finer details such as calcium response travelling through the processes and soma.
At this stage, you will be presented with a prompt. If you have multiple celltypes such as neuron and glia, you can enter 2. As we are only analyzing glia, we enter 1.
Click "OK "
If you already have your cells segmented by other software, you can import them as ImageJ ROIs. If not, click "No, I'll draw manually".
Enter name of the celltype.
The macro is paused so you can draw ROIs. Use the reference image, i.e., image with "MAX" at the start of the name to draw cells. You can use any image you'd like. Sometimes the F_F0 image works well.
The oval tool is selected by default. If you want the freehand tool, you can select that as well.
We use the freehand tool to draw around the cell by holding left click, dragging the cursor around the cell and releasing the left click once you're done. Press "T"
on your keyboard to add the ROI to the ROI Manager
We can also use the Oval tool by selecting it within the drawing tools on the Fiji toolbar.
Left click on the outside of the cell and drag the cursor to the other end so as to define the outline.
We can also use the Oval tool by changing to that.
Left click on the outside of the cell and drag the cursor to the other end so as to define the outline.
Repeat this for all the glial cells of interest.
Click "Show All" on the ROI Manager to show your progress while you're drawing ROIs.
Once you are done, click Ok on the prompt. This will extract the values and save the Results. You've finished your data extraction!
If you go to the folder where you're data is stored, you will see a "Results folder.
Within the Results folder is another folder with same name as the image we analyzed.
All the analyzed data is stored within this folder, which includes the F_F0 image, Max intensity projection, extracted data as csv and ROI Manager file.
You can open the F_F0 stack in Fiji if you'd like to use it for displaying calcium responses in figures or presentations.
The traces are saved in a 'csv' file which can be opened in Microsoft Excel or similar software.
Below is an example of the traces plotted in Excel. Note that the "Normalized Mean Intensity"
Values are being extracted. The column names are the ROI names we defined earlier with a number next to it.