Skip to content

Advanced: Analysis Parameters

Robert F Cooper edited this page Aug 5, 2025 · 20 revisions

There are numerous analysis parameters for 𝑓(Cell); broken into sections (JSON objects) based on their function. The list of keys for this section are as follows:

Key Parent Key Type Values Description
"modalities" "analysis_params" ["string list"] **null** A list of modalities that will be analyzed. These are parsed from the filename or metadata. If null, all detected modalities will be analyzed.
"gaus_blur" "analysis_params" float **0.0** The amount of Gaussian blur to apply to each frame of a video before analysis. Adding blur can help with signal robustness in datasets that consist of multi-modal photoreceptors or other complex structures.
"mask_roi" "analysis_params" JSON Object **null** A JSON object holding the row, column, width, and height of the ROI used for analysis.
"r" "mask_roi" integer **0** The starting row of the ROI crop.
"c" "mask_roi" integer **0** The starting column of the ROI crop.
"width" "mask_roi" integer **-1** The width of the ROI crop. -1 specifies the remaining width of the image.
"height" "mask_roi" integer **-1** The height of the ROI crop. -1 specifies the remaining height of the image.
"output_folder" "analysis_params" "string" (**Results**, any) The folder that all results of the pipeline are placed in.
"normalization" "analysis_params" JSON Object **null** A JSON object that describes the ORG normalization rules for analysis. See the data normalization section below for detailed descriptions of accepted keys and values.
"segmentation" "analysis_params" JSON Object **null** A JSON object the defines how query points are segmented for analysis. See the query point segmentation section below for detailed descriptions of accepted keys and values.
"standardization" "analysis_params" JSON Object **null** A JSON object covering how ORG signals are standardized before analysis. See the signal standardization section below for detailed descriptions of accepted keys and values.
"exclusion_criteria" "analysis_params" JSON Object **null** A JSON object that defines the inclusion/exclusion rules for ORG signals. See the signal exclusion section below for detailed descriptions of accepted keys and values.
"summary" "analysis_params" JSON Object **null** A JSON object that defines how the ORG signals are summarized. See the ORG summary section below for detailed descriptions of accepted keys and values.

Data Normalization

Before any analysis is performed, the dataset can be normalized to mitigate frame-to-frame variability in datasets' statistics. We allow numerous approaches for normalizing the frames of the dataset, including normalizing based on each frame's mean, median, or score. This normalization takes the dataset out of standard image units (A.U.). However, users may also choose to rescale all normalized frames to an specific mean, median, or score. We find that this facilitates inter-dataset comparison, while also keeping the data in terms of image units (usually A.U.).

Key Parent Key Type Options Description
"method" "normalization" "string" (**score**, mean, median, none) The method used for normalization. Each frame in a dataset will be divided (or, for score, standardized) by this value.
"rescaled" "normalization" boolean (**true**, false) After normalization, 𝑓(Cell) can rescale each frame to the dataset-wide method, or to specified values.
"rescale_mean" "normalization" integer **70** The mean that each frame will be rescaled to after normalization.
"rescale_std" "normalization" integer **35** The standard deviation that each frame will be rescaled to after normalization. Only used with score.

Query Point Segmentation

Following normalization, an ORG signal is extracted from the dataset at each query point over time. How these signals are extracted is governed by this section.

Key Parent Key Type Options Description
"shape" "segmentation" string (**disk**, box) The shape of the segmentation region around a query point. Defaults to disk
"radius" "segmentation" integer or string **"auto"** The radius of the segmentation, in pixels. If set to auto, then 𝑓(Cell) automatically detects the radius size based on the nearest neighbor distance of each set of query points.
"summary" "segmentation" string (**mean**, median) How to combine the pixels for each frame from a query point segmentation. Defaults to mean.
"pixelwise" "segmentation" boolean (true, **false**) Whether or not to determine the pixelwise iORG. Note: This approach is memory and CPU intensive. More than 16GB of memory is recommended.
"refine_to_ref" "segmentation" boolean (true, **false**) If true, 𝑓(Cell) refines each query point based on the reference (super average) image using a hill-climbing algorithm.
"refine_to_vid" "segmentation" boolean (true, **false**) If true, 𝑓(Cell) refines each query point to each dataset's average by cross correlating a 5x5 ROI around each query point to the corresponding location in the reference (super average) image.

Signal Standardization

After an ORG signal has been extracted from each query point, the signal can be standardized based on a number of signal properties. The goal of this step is to relativize each ORG to some point in time, e.g. the beginning of the acquisition, or preceding stimulus delivery.

Key Parent Key Type Options Description
"method" "standardization" "string" (**mean_sub**, stddev, linear_stddev, linear_vast, relative_change, none) The method used to standardize each ORG signal. Early versions of our work used "std", which standardized the signal (subtracts the mean, divides by the standard deviation). Our current approach (mean_sub) merely subtracts the mean from each signal. The details of each are described below.
"type" "standardization" "string" (**stim-relative**, absolute) How the window of time used for standardization is determined. By default, we use stim-relative, which makes all values in the following sections calculated relative to when the stimulus is delivered. Otherwise, absolute determines the standardization range from the beginning of the dataset.
"start" "standardization" float **-1** The starting point of the standardization window.
"stop" "standardization" float **0** The stopping point of the standardization window. Must be greater than the starting point.
"units" "standardization" "string" (**time**, frames) What units the above start and stop values are in. Defaults to time in seconds.

Standardization Methods

Mean subtraction (mean_sub):

Simply subtracts a mean from the signal. The mean is determined from the window of time defined by the user.

Relative Change (relative_change):

Similar to mean subtraction, but the results are put in terms of percent change from baseline.

Standardization (stddev):

Our original work in iORGs (Cooper et. al 2017/2020) used this option. This was simply defined by the subtraction of the mean and standard deviation of each ORG to the window of time defined by user (see type above).

Standardization to a linear fit (linear_stddev):

In this standardization approach, low frequency change in the ORG signal is first removed using a linear fit before calculation of the mean and standard deviation. This is a more robust approach to standardization in the presence of a low frequency drift.

Standardization using variable stability (VAST; linear_vast):

Similar to the above, low frequency changes in ORGs are first removed using a linear fit, followed by autoscaling divided by the coefficient of variance instead of the standardization. VAST is described here.

Signal Exclusion

In some cases, it is appropriate to exclude an ORG signal from further analysis; in most cases, ORG exclusion is automatic, and is governed by the rules described in detail here. In addition to the built-in exclusion rules, 𝑓(Cell) also enables users to exclude ORGs that do not have some fraction of data within a "critical window", typically defined as the stimulus delivery frames. This is useful if you want to be sure that the ORG data was obtained from a properly stimulated portion of retina.

Key Parent Key Type Options Description
"type" "exclusion_criteria" "string" (**stim-relative**, absolute) How the critical window used for exclusion is determined. By default, we use stim-relative, which makes all values in the following sections calculated relative to when the stimulus is delivered. Otherwise, absolute determines the critical window range from the beginning of the dataset, in framestamps.
"start" "exclusion_criteria" float **-1** The starting point of the critical window.
"stop" "exclusion_criteria" float **0** The stopping point of the critical window. Must be greater than the starting point.
"units" "exclusion_criteria" "string" (**time**, frames) What units the above start and stop values are in. Defaults to time in seconds.
"fraction" "exclusion_criteria" float **0.3** The fraction of data that must be present in the critical window in order for the signal to be included in the analysis.

ORG Summary

After an ORG signal has been extracted from each query point, the signal can be standardized based on a number of signal properties. The goal of this step is to relativize each ORG to some point in time, e.g. the beginning of the acquisition, or preceding stimulus delivery.

Key Parent Key Type Options Description
"method" "summary" "string" (**rms**, stddev, variance, avg) The method used to summarize ORG signals. Early versions of our work used "std", which summarized multiple ORGs using standard deviation. Our current approach (rms) summarizes across ORG signals using RMS. This applies to summaries of all ORGs from a single dataset (e.g. the population of cells) or across all datasets for a single query location (e.g. from an individual cell).
"window_size" "summary" integer **1** The number of neighboring samples to include in the calculation of the method above. Can soften noise effects.
"control" "summary" "string" (**none**, subtraction, division) What to do with detected control (non-stimulus) data relative to the stimulus data. If subtraction, then the averaged summarized control ORGs are subtracted from the summarized stimulus ORG data. If division, then the summarized stimulus ORG data is divided by the averaged summarized control ORGs.
"metrics" "summary" JSON Object **null** A JSON Object that holds parameters governing how metrics are extracted from the summarized ORGs. The metrics currently integrated within 𝑓(Cell) are described here.