Skip to content

Deconvolve Traces

Compute Credits

This tool uses 0.5 compute credits per hour.

Overview

This tool estimates the underlying neural spikes and biosensor kinetics (e.g. GCaMP activity) from noisy calcium imaging fluorescent time-series data. It takes cellset traces derived from CNMFe, PCA-ICA, or Manual ROIs and fits an autoregressive model to infer the spike pattern that best explains the noisy time-series data. The outputs of this tool are an event set of spikes and a new cell set with denoised traces (and the same spatial footprints as the input cell set).

Input Data

Input Data Description Required
Input Cell Sets Cell sets to perform deconvolution on. Yes

Parameters

Parameters Units Default Value Description
Cell Statuses Accepted and Undecided The statuses of cells to perform deconvolution on. Possible choices are Accepted Only and Accepted and Undecided.
Spike SNR Threshold dimensionless 3.00 The threshold in amplitude that the spike has to cross to be included in the event set. This must be a float greater than or equal to 0.
Minimum Noise Frequency dimensionless 0.25 The minimum in the range of frequencies to average for estimating pixel noise. This must be a float greater than or equal to 0 and less than or equal to 0.5.
Maximum Noise Frequency dimensionless 0.5 The maximum in the range of frequencies to average for estimating pixel noise. This must be a float greater than or equal to 0 and less than or equal to 0.5.
Noise Method Mean The averaging method for estimating pixel noise. Possible choices are Mean, Median, and Logmexp.
Order of Autoregressive Model 1 The order of the autoregressive model used for deconvolution. Possible choices are 1 and 2.
Number of Lags dimensionless 5 The number of lags for estimating time constants of the AR model. This must be an integer greater than 0.
Fudge Factor dimensionless 0.96 The fudge factor for reducing time constant bias. This must be a float greater than or equal to 0.
Deconvolution Method OASIS The algorithm used to perform deconvolution.

Algorithm Description

Noisy fluorescent calcium signals can be approximated using a stable autoregressive process, where the calcium concentration c at time t is computed as:

\[\mathbf{c}_t = \sum_{i=1}^{p} \gamma_{i} \mathbf{c}_{\text{t-i}} + \mathbf{s}_t\]

Where \(\gamma\) is the rate of decay (i.e. offeset kinetics of calcium buffer), and p is the number of previous time points considered (a small positive scalar).

The noisy optical signal \(y\) at time \(t\) is related to the calcium concentration \(c\) at time \(t\):

\[\mathbf{y}_t = \mathbf{c}_t + b + \epsilon_{t}, \epsilon_{t} \sim \mathcal{N}(0,\sigma^{2})\]

Where \(b\) is a scalar offset and \(\epsilon\) is the noise which is assumed to be a Gaussian distribution with a mean of 0.

The goal of calcium deconvolution is to recover the spikes \(s\) and calcium dynamics \(c\) that best explain the noisy fluorescent signal \(y\).

Implementations

There are different mathematical approaches to solving for the spikes and calcium dynamics that best explain the fluorescent signal. Currently, there are two implementations offered:

  • SCS: SCS stands for Splitting Conic Solver. SCS is a numerical optimization procedure for solving convex optimization problems. Learn more about SCS here.
  • OASIS: OASIS stands for Online Active Set method to Infer Spikes. OASIS is a generalization of the pool adjacent violators algorithm (PAVA) for isotonic regression. Isotonic regression is a method for fitting an equation to a non-decreasing curve. This fits with the model of calcium concentration dynamics as characterized by a rise in amplitude followed by a slow decay to baseline levels. The main idea of OASIS is to sequentially read a time-series and group sequences of points into ‘pools’. The start of each pool represents the spike time - remaining values follow the decay of calcium transients. Learn more about OASIS here.

Output Data

Denoised Traces

The denoised traces (i.e. the modeled calcium concentration) from deconvolution in a new cell set.

Spike Events

The inferred spikes from deconvolution in a new event set.