Extracting calcium traces from populations of neurons is a critical step in the study of the large-scale neural dynamics that govern behavior. Accurate activity extraction requires the correction of motion and movement-induced deformations as well as demixing of signals that may overlap spatially due to limitations in optical resolution. Traditionally, non-negative matrix factorization (NMF) methods have been successful in demixing and denoising cellular calcium activity in relatively motionless or pre-registered videos. However, standard NMF methods fail in animals undergoing significant non-rigid motion; similarly, standard image registration methods based on template matching can fail when large changes in activity lead to mismatches with the image template. To address these issues simultaneously, we introduce a deformable non-negative matrix factorization (dNMF) framework that jointly optimizes registration with signal demixing. On simulated data and real semi-immobilized C. elegans microscopy videos, dNMF outperforms traditional demixing methods that account for motion and demixing separately. Finally, following the extraction of neural traces from multiple imaging experiments, we develop a quantile regression time-series normalization technique to account for varying neural signal intensity baselines across different animals or different imaging setups. Open source code implementing this pipeline is available at https://github.com/amin-nejat/dNMF.
Comprehensively resolving single neurons and their cellular identities from whole-brain fluorescent images is a major challenge. We achieve this in C. elegans through the engineering and use of a multicolor transgene called NeuroPAL (a Neuronal Polychromatic Atlas of Landmarks). NeuroPAL worms share a stereotypical multicolor fluorescence map for the entire hermaphrodite nervous system that allows comprehensive determination of neuronal identities. Neurons labeled with NeuroPAL do not exhibit fluorescence in the green, cyan, or yellow emission channels, allowing the transgene to be used with numerous reporters of gene expression or neuronal dynamics. Here we showcase three studies that leverage NeuroPAL for nervous-system-wide neuronal identification. First, we determine the brainwide expression patterns of all metabotropic receptors for acetylcholine, GABA, and glutamate, completing a map of this communication network. Second, we uncover novel changes in cell fate caused by transcription factor mutations. Third, we record brainwide activity in response to attractive and repulsive chemosensory cues, characterizing multimodal coding and novel neuronal asymmetries for these stimuli. We present a software package that enables semi-automated determination of all neuronal identities based on color and positional information. The NeuroPAL framework and software provide a means to design landmark atlases for other tissues and organisms. In conclusion, we expect NeuroPAL to serve as an invaluable tool for gene expression analysis, neuronal fate studies, and for mapping whole-brain activity patterns.
Animals can respond differently to a sensory cue when in different states. Here, we show that certain odors repel well-fed Drosophila larvae but attract food-deprived larvae and how feeding state flexibly alters neural processing in an early olfactory circuit, the antennal lobe, to determine the behavioral valence of a sensory cue. Odor valence is assigned by a neuronal architecture that controls a switch between two separate projection neuron output pathways that mediate opposite behavioral responses. A uniglomerular projection neuron pathway mediates odor attraction whereas a multiglomerular projection neuron pathway mediates odor repulsion. The serotonergic CSD neuron in the antennal lobe is a critical regulator of this neuronal and behavioral switch. CSD selects an appropriate behavior by shifting patterns of serotonergic modulation and glutamatergic inhibition onto each output pathway. The antennal lobe is a decision-making circuit for innate behavioral responses that uses feeding state to determine an odor’s valence.