-
Notifications
You must be signed in to change notification settings - Fork 22
Manual cell sorting of cell extraction outputs
Biafra Ahanonu edited this page Feb 18, 2019
·
11 revisions
This page will go over best practices and common issues seen when sorting cells from PCA-ICA. Advice can also apply to other cell sorting algorithms (CNMF, etc.).
Usage instructions below for signalSorter.m
:
Main inputs
-
inputImages
- [x y N] matrix where N = number of images, x/y are dimensions. -
inputSignals
- [N frames] double matrix where N = number of signals (traces). -
inputMovie
- [x y frames] matrix
Main outputs
-
choices
- [N 1] vector of 1 = cell, 0 = not a cell -
inputImagesSorted
- [x y N] filtered by `choices' -
inputSignalsSorted
- [N frames] filtered bychoice
iopts.inputMovie = inputMovie; % movie associated with traces
iopts.valid = 'neutralStart'; % all choices start out gray or neutral to not bias user
iopts.cropSizeLength = 20; % region, in px, around a signal source for transient cut movies (subplot 2)
iopts.cropSize = 20; % see above
iopts.medianFilterTrace = 0; % whether to subtract a rolling median from trace
iopts.subtractMean = 0; % whether to subtract the trace mean
iopts.movieMin = -0.01; % helps set contrast for subplot 2, preset movie min here or it is calculated
iopts.movieMax = 0.05; % helps set contrast for subplot 2, preset movie max here or it is calculated
iopts.backgroundGood = [208,229,180]/255;
iopts.backgroundBad = [244,166,166]/255;
iopts.backgroundNeutral = repmat(230,[1 3])/255;
[inputImagesSorted, inputSignalsSorted, choices] = signalSorter(inputImages, inputSignals, 'options',iopts);
- Always sort the cells with the trace, filter, and either images or video cut to transients in the movie.
- This gets around two types of cells: those with irregular firing patterns that might be thrown out (see below) or those whose filter and traces look good, but are either fragments of a high SNR cell (see Common issues) or not actually a cell (e.g. a particulate in the field of view that has transient-like movement).
- Sometimes two or more cell extraction outputs are for the same cell. In these suspected cases, press
t
in thesignalSorter
interface to pull up images and activity traces of nearby cells to see which have a higher SNR or better cell shape and should be kept.
- Example of a good cell with GCaMP like rise/decay and for one-photon miniature microscope movies, has nice 2D Gaussian-like shape during transients in the movie.
- Example of good cells on left and bad on right. Subplots: CELLMax output, mean movie frame centered on the cell and aligned to cell transients, and example CELLMax traces.
- Example of not-cells or borderline not-cells.
- Good cells with their matched movies aligned to algorithm (PCA-ICA in this case) detected transients.
- Additional examples of good cells.
- As noted, without the transient aligned movie (see above), cells with unusual traces might be discarded, e.g. all three below are actual cells when the movie is visualized.
- Sometimes two or more cell extraction outputs are for the same cell. In these suspected cases, press
t
in thesignalSorter
interface to pull up images and activity traces of nearby cells to see which have a higher SNR or better cell shape and should be kept. - See below for an example, in which cell #3 (yellow) is a duplicate of cell #1 (blue).
- Cells with high SNR will sometimes have their cells split. Refer to algorithm specific to note how to get around this problem.