Data
-
C. elegans head neurons, GCaMP6s (nuclear-localised strain QW1217), about 120 neurons per animal, volumetric imaging at 2 Hz, about 22 min per recording, 9 animals.
-
Per-neuron raw fluorescence from tracked ROIs. A co-expressed RFP channel is available but is 3 to 4 times noisier frame to frame than GCaMP.
-
Four bright-light flashes per recording saturate the camera; about 7 s around each is masked. GCaMP (not RFP) rises about 16% after each flash and decays over about 40 s.
-
No neuron identities. Bleaching present; camera offset about 100 counts has to be subtracted.
Goal: A per-neuron “fingerprint” of activity (event rate, onset, duration, amplitude, area, shape). we need event boundaries that are accurate.
What the traces look like
-
Graded activity, not spikes.
-
Three kinds of activity, often in the same neuron:
-
fast-rising, slowly decaying transients (rise 1 to 3 s, decay 10 to 60 s);
-
plateaus lasting tens of seconds to minutes, with sharp fluctuations riding on top of them;
-
slow wander of the level over minutes, both above and below the apparent resting level.
-
-
Noise: white frame-to-frame noise plus a strongly correlated slow component (lag-1 autocorrelation about 0.5 to 0.7). We cannot tell how much of the slow component is biological.
-
About two thirds of neurons spend less than 15% of their time near their most common level, so there is no obvious “rest”.
Problems
-
Baseline / resting level. A drift-following baseline (running percentile) removes slow activity and plateaus. A stiff baseline (bleaching only) turns slow wander into “events”. Lowest-percentile baselines sit far below rest. Mode-based rest and a two-state Gaussian mixture were not reliable either.
-
Event boundaries.
-
Peak-prominence bases cut off the start of rises that begin below rest, or below where the trace settles afterwards.
-
Walking outward to the nearest trough recovers those onsets, but truncates slow decays that have small steps in them.
-
-
Fragmentation. A plateau with sharp fluctuations on top is split into many short events instead of being one long event (optionally with sub-peaks). What merging rule decides “one event with ripples” versus “several events”?
-
Overlapping and nested events. When a transient rides on a plateau, or a second transient starts before the first has decayed, the durations of both become unreliable. Joint fitting of several template shapes was non-unique.
-
Shape classification. Labelling events as pulse / sawtooth / square from rise, fall and plateau times does not match what we see by eye. Template fits (rise, hold, exponential decay) fit isolated events but not real overlapping ones.
-
Sensitivity versus false positives, with no ground truth.
-
Threshold detectors (k x noise SD) either miss slow events or produce many small ones.
-
Phase-randomised surrogates keep the slow spectrum, so small slow events cannot be told apart from surrogate fluctuations.
-
Our simulator’s event shapes are our own assumptions, so validating against it is partly circular.
-
-
Fast onsets versus slow events. Smoothing smears sharp onsets. Derivative or step detectors miss slow rises.
What we tried
-
Baselines: lowest 1%; running 10th percentile (150 s); asymmetric least squares (stiff); half-sample mode; two-component Gaussian mixture.
-
Detectors:
-
threshold with hysteresis (MAD noise);
-
step / derivative “upswing” detector, single- and multi-scale;
-
matched filter;
-
two-state HMM;
-
shift-invariant Haar wavelet denoising plus a peak-prominence event tree;
-
surrogate-based per-neuron confidence bars.
-
-
Shape fits: rise / hold / decay templates, fitted singly and jointly for overlapping events.
Questions:
-
Do people avoid discrete events altogether for fingerprints like this and use continuous features (fraction of time “high”, derivative statistics, spectra) instead?
-
How do you segment a plateau that has transients on top: hysteresis thresholds, a minimum dip depth between events, a minimum event duration, persistence or prominence rules? How do you choose those parameters?
-
Is state segmentation better suited to graded worm neurons than event detection? For example: rise / high / fall / low phases from a regularised derivative, HMMs, switching linear dynamical systems, or change-point detection. Can those give per-state durations?
-
Are there any signal “smoothing”/de-noising treatments that might work and what is your experience with them?
I’m at a loss for what to do next to get reliable event detection. Am i even thinking about this correctly? Please advise if you can!!
Thank you in advance!!