Skip to content

Post-Processing

CaliAli incorporates a GUI to facilitate the identification of false-positive detections.

After loading the neuron object stored in the Checkpoint files, execute the following function to call this GUI:

ix=postprocessing_app(neuron);

Monitoring Extracted Components

The post-processing app will display the correlation image with overlaid contours of the detected neurons. Clicking on these contours will show the corresponding extracted calcium transients:

select_component_app

You can hold you mouse to zoom:

zoom_app

You can reset the zoom and clear the neuronal selection by pressing the buttons located above the correlation image:

reset_app

You can label false positives by right-clicking on the neuron contours:

label_fp_app

Sort Spatial Components

CaliAli can label false positives based on the shape of the extracted spatial components. To accomplish this, CaliAli incorporates a tool that sorts spatial components by their spatial congruence. To utilize this function, press the 'Separate Spatial' button.

This will open a panel displaying all the extracted spatial components. Components with congruent shapes are sorted at the beginning, while neurons with shapes different from the rest of the population are sorted last. Components labeled as false-positives will be listed on the right.

sort_component_app

Note that elongated components, which could correspond to neuropil signals rather than neuron somas, appear at the bottom of the list. You can select these components and move them to the false-positive panel.

sort_component_discard_app

Once satisfied with the selections press the Done! button.

This will label the component as false-positive in the correlation image.

Deleting and Merging Components

Once you finish labeling false-positive in the main App press the Done! button.

This will create a variable ix holding the indices of the labeled false-positives.

You can delete these components by running neuron.delete(ix);. Alternatively, you can monitor each of these components with neuron.viewNeurons(find(ix), neuron.C_raw);.

After deleting false positives, you can consider merging neurons by manually monitoring neurons that are close by. For this, runneuron.merge_high_corr(1, [0.1, 0.3, -inf]);

Tip

Note that you can save your results at any point running save_workspace(neuron);

Picking Neurons from Residual

Some neurons may remain unextracted after the initial processing. To extract potentially missed neurons run: neuron=manually_update_residuals(neuron,use_parallel);

This will open a GUI displaying the PNR, Corr., and PNR*Corr. images(1). These images will be shown in their original form (top panels) and also after subtracting the current neuron detections from the video (Residual video) (bottom panels).

  1. Refer to Select Extraction Parameters for a description of the PNR, Corr. and PNR*Corr images.

Here, you can manually add initialization seeds for undetected neurons. Clicking on any of these images will place a red dot that initializes these neurons:

pick_residuals

This will initialize these neurons and repeat the CNMF process required to extract the Calcium signals.

After extracting the residual data, you may want to consider redoing the post-processing step described earlier

Tip

In most cases picking neurons is not necessary.

Info

If you ever change the location of the videos and files generated during the analysis be sure to run this steps after


CONGRATULATIONS!: You have successfully extracted neuronal signals using CaliAli. Don't forget to save the results with save_workspace(neuron)

We recommend checking the Utilities included with CaliAli.