Abstract
Understanding brain function requires monitoring and interpreting the activity of large networks of neurons during behavior. Advances in recording technology are greatly increasing the size and complexity of neural data. Analyzing such data will pose a fundamental bottleneck for neuroscience. We present a library of analytical tools called Thunder built on the open-source Apache Spark platform for large-scale distributed computing. The library implements a variety of univariate and multivariate analyses with a modular, extendable structure well-suited to interactive exploration and analysis development. We demonstrate how these analyses find structure in large-scale neural data, including whole-brain light-sheet imaging data from fictively behaving larval zebrafish, and two-photon imaging data from behaving mouse. The analyses relate neuronal responses to sensory input and behavior, run in minutes or less and can be used on a private cluster or in the cloud. Our open-source framework thus holds promise for turning brain activity mapping efforts into biological insights.
This is a preview of subscription content, access via your institution
Access options
Subscribe to this journal
Receive 12 print issues and online access
$259.00 per year
only $21.58 per issue
Buy this article
- Purchase on SpringerLink
- Instant access to full article PDF
Prices may be subject to local taxes which are calculated during checkout
Similar content being viewed by others
References
Grewe, B.F., Langer, D., Kasper, H., Kampa, B.M. & Helmchen, F. High-speed in vivo calcium imaging reveals neuronal network activity with near-millisecond precision. Nat. Methods 7, 399–405 (2010).
Broxton, M. et al. Wave optics theory and 3-D deconvolution for the light field microscope. Opt. Express 21, 25418–25439 (2013).
Quirin, S., Peterka, D.S. & Yuste, R. Instantaneous three-dimensional sensing using spatial light modulator illumination with extended depth of field imaging. Opt. Express 21, 16007–16021 (2013).
Prevedel, R. et al. Simultaneous whole-animal 3D imaging of neuronal activity using light-field microscopy. Nat. Methods 11, 727–730 (2014).
Churchland, M.M. et al. Neural population dynamics during reaching. Nature 487, 51–56 (2012).
Holekamp, T.F., Turaga, D. & Holy, T.E. Fast three-dimensional fluorescence imaging of activity in neural populations by objective-coupled planar illumination microscopy. Neuron 57, 661–672 (2008).
Ahrens, M.B., Orger, M.B., Robson, D.N., Li, J.M. & Keller, P.J. Whole-brain functional imaging at cellular resolution using light-sheet microscopy. Nat. Methods 10, 413–420 (2013).
Panier, T. et al. Fast functional imaging of multiple brain regions in intact zebrafish larvae using Selective Plane Illumination Microscopy. Front. Neural Circuits 7, 65 (2013).
Portugues, R., Feierstein, C.E., Engert, F. & Orger, M.B. Whole-brain activity maps reveal stereotyped, distributed networks for visuomotor behavior. Neuron 81, 1328–1343 (2014).
Alivisatos, A.P. et al. Neuroscience. The brain activity map. Science 339, 1284–1285 (2013).
Briggman, K.L., Abarbanel, H. & Kristan, W.B. Optical imaging of neuronal populations during decision-making. Science 307, 896–901 (2005).
Ahrens, M.B. et al. Brain-wide neuronal dynamics during motor adaptation in zebrafish. Nature 485, 471–477 (2012).
Churchland, M.M., Yu, B.M., Sahani, M. & Shenoy, K.V. Techniques for extracting single-trial activity patterns from large-scale neural recordings. Curr. Opin. Neurobiol. 17, 609–618 (2007).
Huber, D. et al. Multiple dynamic representations in the motor cortex during sensorimotor learning. Nature 484, 473–478 (2012).
Dean, J. & Ghemawat, S. MapReduce: simplified data processing on large clusters. Commun. ACM 51.1, 107–113 (2008).
Isard, M. et al. Dryad: distributed data-parallel programs from sequential building blocks. ACM SIGOPS Operating Systems Review 41, 59–72 (2007).
Shvachko, K., Kuang, H., Radia, S. & Chansler, R. The Hadoop Distributed File System. in IEEE 26th Symposium on Mass Storage Systems and Technologies 1–10 (2010).
Chu, C.-T. et al. Map-reduce for machine learning on multicore. Adv. Neural Inf. Process. Syst. 19, 281 (2007).
Zaharia, M., Chowdhury, M., Das, T., Dave, A. & Ma, J. Resilient distributed datasets: A fault-tolerant abstraction for in-memory cluster computing. in Proceedings of the 9th USENIX conference on Networked Systems Design and Implementation 2–15 (2012).
Vladimirov, N. et al. Light-sheet functional imaging in behaving zebrafish. Nat. Methods http://www.nature.com/doifinder/10.1038/nmeth.3040 (27 July 2014).
Naumann, E.A., Kampff, A.R., Prober, D.A., Schier, A.F. & Engert, F. Monitoring neural activity with bioluminescence during natural behavior. Nat. Neurosci. 13, 513–520 (2010).
Roweis, S. EM algorithms for PCA and SPCA. Adv. Neural Inf. Process. Syst. 626–632 (1998).
Sofroniew, N.J., Cohen, J.D., Lee, A.K. & Svoboda, K. Natural whisker-guided behavior by head-fixed mice in tactile virtual reality. J. Neurosci. 34, 9537–9550 (2014).
Chen, T.-W. et al. Ultrasensitive fluorescent proteins for imaging neuronal activity. Nature 499, 295–300 (2013).
Keller, G.B., Bonhoeffer, T. & Hübener, M. Sensorimotor mismatch signals in primary visual cortex of the behaving mouse. Neuron 74, 809–815 (2012).
Niell, C.M. & Stryker, M.P. Modulation of visual responses by behavioral state in mouse visual cortex. Neuron 65, 472–479 (2010).
Valmianski, I. et al. Automatic identification of fluorescently labeled brain cells for rapid functional imaging. J. Neurophysiol. 104, 1803–1811 (2010).
Borst, A., Haag, J. & Reiff, D.F. Fly motion vision. Annu. Rev. Neurosci. 33, 49–70 (2010).
Niell, C.M. & Stryker, M.P. Highly selective receptive fields in mouse visual cortex. J. Neurosci. 28, 7520–7536 (2008).
Grama, A. & Engert, F. Direction selectivity in the larval zebrafish tectum is mediated by asymmetric inhibition. Front. Neural Circuits 6, 59 (2012).
Nikolaou, N. et al. Parametric functional maps of visual inputs to the tectum. Neuron 76, 317–324 (2012).
Gabriel, J.P., Trivedi, C.A., Maurer, C.M., Ryu, S. & Bollmann, J.H. Layer-specific targeting of direction-selective neurons in the zebrafish optic tectum. Neuron 76, 1147–1160 (2012).
Del Bene, F. et al. Filtering of visual information in the tectum by an identified neural circuit. Science 330, 669–673 (2010).
Kubo, F. et al. Functional architecture of an optic flow-responsive area that drives horizontal eye movements in zebrafish. Neuron 81, 1344–1359 (2014).
Niell, C.M. & Smith, S.J. Functional imaging reveals rapid development of visual response properties in the zebrafish tectum. Neuron 45, 941–951 (2005).
Dreosti, E., Vendrell Llopis, N., Carl, M., Yaksi, E. & Wilson, S.W. Left-right asymmetry is required for the habenulae to respond to both visual and olfactory stimuli. Curr. Biol. 24, 440–445 (2014).
Akerboom, J. et al. Optimization of a GCaMP calcium indicator for neural activity imaging. J. Neurosci. 32, 13819–13840 (2012).
Park, H.C. et al. Structural comparison of zebrafish Elav/Hu and their differential expressions during neurogenesis. Neurosci. Lett. 279, 81–84 (2000).
Kimura, Y. et al. Hindbrain V2a neurons in the excitation of spinal locomotor circuits during zebrafish swimming. Curr. Biol. 23, 843–849 (2013).
Kinkhabwala, A. et al. A structural and functional ground plan for neurons in the hindbrain of zebrafish. Proc. Natl. Acad. Sci. USA 108, 1164–1169 (2011).
Fox, M.D. & Raichle, M.E. Spontaneous fluctuations in brain activity observed with functional magnetic resonance imaging. Nat. Rev. Neurosci. 8, 700–711 (2007).
Hyvärinen, A. Fast and robust fixed-point algorithms for independent component analysis. IEEE Trans. Neural Netw. 10, 626–634 (1999).
Satou, C. et al. Transgenic tools to characterize neuronal properties of discrete populations of zebrafish neurons. Development 140, 3927–3931 (2013).
Bock, D.D. et al. Network anatomy and in vivo physiology of visual cortical neurons. Nature 471, 177–182 (2011).
Briggman, K.L., Helmstaedter, M. & Denk, W. Wiring specificity in the direction-selectivity circuit of the retina. Nature 471, 183–188 (2011).
Oberlaender, M. et al. Automated three-dimensional detection and counting of neuron somata. J. Neurosci. Methods 180, 147–160 (2009).
Mukamel, E.A., Nimmerjahn, A. & Schnitzer, M.J. Automated analysis of cellular signals from large-scale calcium imaging data. Neuron 63, 747–760 (2009).
Pillow, J.W. et al. Spatio-temporal correlations and visual signalling in a complete neuronal population. Nature 454, 995–999 (2008).
Paninski, L. et al. A new look at state-space models for neural data. J. Comput. Neurosci. 29, 107–126 (2010).
Dale, A.M. Optimal experimental design for event-related fMRI. Hum. Brain Mapp. 8, 109–114 (1999).
Pologruto, T.A., Sabatini, B.L. & Svoboda, K. ScanImage: flexible software for operating laser scanning microscopes. Biomed. Eng. Online 2, 13 (2003).
Lister, J.A., Robertson, C.P., Lepage, T., Johnson, S.L. & Raible, D.W. nacre encodes a zebrafish microphthalmia-related protein that regulates neural-crest-derived pigment cell fate. Development 126, 3757–3767 (1999).
White, R.M. et al. Transparent adult zebrafish as a tool for in vivo transplantation analysis. Cell Stem Cell 2, 183–189 (2008).
Urasaki, A., Morvan, G. & Kawakami, K. Functional dissection of the Tol2 transposable element identified the minimal cis-sequence and a highly repetitive sequence in the subterminal region essential for transposition. Genetics 174, 639–649 (2006).
Kanda, T., Sullivan, K.F. & Wahl, G.M. Histone-GFP fusion protein enables sensitive analysis of chromosome dynamics in living mammalian cells. Curr. Biol. 8, 377–385 (1998).
Sato, T., Takahoko, M. & Okamoto, H. HuC:Kaede, a useful tool to label neural morphologies in networks in vivo. Genesis 44, 136–142 (2006).
Fisher, S., Grice, E.A., Vinton, R.M. & Bessling, S.L. Evaluating the biological relevance of putative enhancers using Tol2 transposon-mediated transgenesis in zebrafish. Nat. Protoc. 1, 1297–1305 (2006).
Westerfield, M. The Zebrafish (University of Oregon Press, 1993).
Ahrens, M.B., Huang, K.H., Narayan, S., Mensh, B.D. & Engert, F. Two-photon calcium imaging during fictive navigation in virtual environments. Front. Neural Circuits 7, 104 (2013).
Cheng, A., Gonçalves, J.T., Golshani, P., Arisaka, K. & Portera-Cailliau, C. Simultaneous two-photon calcium imaging at different depths with spatiotemporal multiplexing. Nat. Methods 8, 139–142 (2011).
Fisher, N.I. Statistical Analysis of Circular Data (Cambridge University Press, 1995).
Acknowledgements
We thank K. Carlisle and R. Lines for help installing and running Spark on the Janelia Farm Research Campus Compute Cluster, D. Ganguli and M. Zaharia for advice on using Spark, G. Merlino for advice on benchmarking, C. Ziemba, C. Stock and T.J. Florence for help testing EC2 installation procedures, P. Keller for his help and advice in building the light-sheet microscope, B. Coop and T. Tabachnik for their help with hardware design, M. Coleman for writing the light-sheet microscope control software Zebrascope and continuing support, S. Narayan for help with zebrafish experiments, K. Svoboda and S. Peron for help setting up the mouse two-photon imaging, B. MacLennan for help with mouse surgeries, D.G.C. Hildebrand and M. Koyama for discussions, the Janelia Farm Research Campus vivarium staff for fish and mouse husbandry, and V. Jayaraman, G. Murphy, K. Svoboda and P. Keller for comments on an earlier draft of the manuscript. This work was supported by the Howard Hughes Medical Institute.
Author information
Authors and Affiliations
Contributions
J.F. and M.B.A. conceived of the project. J.F. developed the analysis library and analyzed the data. N.V., M.B.A. and T.K. developed the zebrafish light-sheet imaging experimental preparation. N.V., M.B.A., Y.M., T.K. and J.F. collected the zebrafish data. N.J.S. developed the mouse experimental preparation, collected the data reported in Figure 3 and helped develop the analysis of those data. D.V.B. contributed to zebrafish experiments. J.R. contributed code to the analysis library. C.-T.Y. and L.L.L. developed the Tg(elavl3:H2B-GCaMP6s)jf5 transgenic fish line. J.F. and M.B.A. wrote the paper, with input from all authors.
Corresponding authors
Ethics declarations
Competing interests
The authors declare no competing financial interests.
Supplementary information
Supplementary Text and Figures
Supplementary Protocol (PDF 118 kb)
Direction tuning, planes.
Maps of direction tuning from individual planes (MOV 1188 kb)
Direction tuning, volume.
Volumetric rendering of direction tuning maps (MOV 2206 kb)
Principal component analysis, planes.
Maps of sensorimotor responses from individual planes (MOV 351 kb)
Swimming-related responses, volume.
Volumetric rendering of sensorimotor response maps (MOV 1148 kb)
Swimming-related responses, planes.
Maps of swimming-related responses from individual planes (MOV 3449 kb)
Swimming-related responses, volume.
Volumetric rendering of swimming-related response maps (MOV 2840 kb)
Swim-related trajectories.
State-space trajectories showing how neural activity on individual trials evolves through a low-dimensional space. Each trace is a trial. Size of dot indicates strength of swimming. (MOV 757 kb)
Direction-related trajectories.
State-space trajectories showing how neural activity on individual trials evolves through a low-dimensional space recovered to capture variability related to different stimulus directions. Each trace is a trial. Color indicates stimulus direction. (MOV 3277 kb)
Independent component analysis, planes.
Maps of spontaneous functional networks from individual planes. (MOV 486 kb)
Independent component analysis, volume.
Volumetric rendering of spontaneous functional network maps. (MOV 1148 kb)
Rights and permissions
About this article
Cite this article
Freeman, J., Vladimirov, N., Kawashima, T. et al. Mapping brain activity at scale with cluster computing. Nat Methods 11, 941–950 (2014). https://doi.org/10.1038/nmeth.3041
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1038/nmeth.3041