Skip to main content

Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

  • Article
  • Published:

A one-photon endoscope for simultaneous patterned optogenetic stimulation and calcium imaging in freely behaving mice

Abstract

Optogenetics and calcium imaging can be combined to simultaneously stimulate and record neural activity in vivo. However, this usually requires two-photon microscopes, which are not portable nor affordable. Here we report the design and implementation of a miniaturized one-photon endoscope for performing simultaneous optogenetic stimulation and calcium imaging. By integrating digital micromirrors, the endoscope makes it possible to activate any neuron of choice within the field of view, and to apply arbitrary spatiotemporal patterns of photostimulation while imaging calcium activity. We used the endoscope to image striatal neurons from either the direct pathway or the indirect pathway in freely moving mice while activating any chosen neuron in the field of view. The endoscope also allows for the selection of neurons based on their relationship with specific animal behaviour, and to recreate the behaviour by mimicking the natural neural activity with photostimulation. The miniaturized endoscope may facilitate the study of how neural activity gives rise to behaviour in freely moving animals.

This is a preview of subscription content, access via your institution

Access options

Rent or buy this article

Prices vary by article type

from$1.95

to$39.95

Prices may be subject to local taxes which are calculated during checkout

Fig. 1: Miniscope with all-optical patterned stimulation and imaging (MAPSI).
Fig. 2: High resolution of MAPSI allows patterned stimulation and calcium imaging.
Fig. 3: Resolution of MAPSI stimulation in freely behaving animals.
Fig. 4: Stimulation of direct pathway neurons that are active during contraversive turning reproduces contraversive turning.
Fig. 5: Selective stimulation of indirect pathway neurons that are active during ipsiversive turning recapulates ipsiversive turning.
Fig. 6: Sequential and patterned stimulation of the direct pathway causes contraversive turning.
Fig. 7: Sequential and patterned stimulation of the indirect pathway causes ipsiversive turning.

Similar content being viewed by others

Data availability

The main data supporting the results in this study are available within the paper and its Supplementary Information. The raw and analysed datasets generated during the study are too large to be publicly shared, yet they are available for research purposes from the corresponding author on reasonable request.

Code availability

The Matlab codes are available from the corresponding author on request.

References

  1. Dana, H. et al. High-performance GFP-based calcium indicators for imaging activity in neuronal populations and microcompartments. Nat. Methods 16, 649–657 (2019).

    Article  CAS  PubMed  Google Scholar 

  2. Boyden, E. S., Zhang, F., Bamberg, E., Nagel, G. & Deisseroth, K. Millisecond-timescale, genetically targeted optical control of neural activity. Nat. Neurosci. 8, 1263–1268 (2005).

    Article  CAS  PubMed  Google Scholar 

  3. Yizhar, O., Fenno, L. E., Davidson, T. J., Mogri, M. & Deisseroth, K. Optogenetics in neural systems. Neuron 71, 9–34 (2011).

    Article  CAS  PubMed  Google Scholar 

  4. Dana, H. et al. High-performance calcium sensors for imaging activity in neuronal populations and microcompartments. Nat. Methods 16, 649–657 (2019).

    Article  CAS  PubMed  Google Scholar 

  5. Ghosh, K. K. et al. Miniaturized integration of a fluorescence microscope. Nat. Methods 8, 871–878 (2011).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  6. Kerr, J. N. & Denk, W. Imaging in vivo: watching the brain in action. Nat. Rev. Neurosci. 9, 195–205 (2008).

    Article  CAS  PubMed  Google Scholar 

  7. Hughes, R. N. et al. Precise coordination of three-dimensional rotational kinematics by ventral tegmental area gabaergic neurons. Curr. Biol. 29, 3244–3255. e4 (2019).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  8. Emiliani, V., Cohen, A. E., Deisseroth, K. & Häusser, M. All-optical interrogation of neural circuits. J. Neurosci. 35, 13917–13926 (2015).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  9. Zhang, Z., Russell, L. E., Packer, A. M., Gauld, O. M. & Häusser, M. Closed-loop all-optical interrogation of neural circuits in vivo. Nat. Methods 15, 1037–1040 (2018).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  10. Nikolenko, V. et al. SLM microscopy: scanless two-photon imaging and photostimulation using spatial light modulators. Front. Neural Circuits 2, 5 (2008).

    Article  PubMed  PubMed Central  Google Scholar 

  11. Stamatakis, A. M. et al. Simultaneous optogenetics and cellular resolution calcium imaging during active behavior using a miniaturized microscope. Front. Neurosci. 12, 496 (2018).

    Article  PubMed  PubMed Central  Google Scholar 

  12. Packer, A. M., Russell, L. E., Dalgleish, H. W. & Häusser, M. Simultaneous all-optical manipulation and recording of neural circuit activity with cellular resolution in vivo. Nat. Methods 12, 140–146 (2015).

    Article  CAS  PubMed  Google Scholar 

  13. Carrillo-Reid, L., Han, S., Yang, W., Akrouh, A. & Yuste, R. Controlling visually guided behavior by holographic recalling of cortical ensembles. Cell 178, 447–457. e5 (2019).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  14. Rickgauer, J. P., Deisseroth, K. & Tank, D. W. Simultaneous cellular-resolution optical perturbation and imaging of place cell firing fields. Nat. Neurosci. 17, 1816–1824 (2014).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  15. Yang, W., Carrillo-Reid, L., Bando, Y., Peterka, D. S. & Yuste, R. Simultaneous two-photon imaging and two-photon optogenetics of cortical circuits in three dimensions. eLife 7, e32671 (2018).

    Article  PubMed  PubMed Central  Google Scholar 

  16. Carrillo-Reid, L., Yang, W., Kang Miller, J.-E., Peterka, D. S. & Yuste, R. Imaging and optically manipulating neuronal ensembles. Annu. Rev. Biophys. 46, 271–293 (2017).

    Article  CAS  PubMed  Google Scholar 

  17. Wallace, D. J. & Kerr, J. N. Circuit interrogation in freely moving animals. Nat. Methods 16, 9–11 (2019).

    Article  CAS  PubMed  Google Scholar 

  18. Zong, W. et al. Miniature two-photon microscopy for enlarged field-of-view, multi-plane and long-term brain imaging. Nat. Methods 18, 46–49 (2021).

    Article  CAS  PubMed  Google Scholar 

  19. Warp, E. et al. Emergence of patterned activity in the developing zebrafish spinal cord. Curr. Biol. 22, 93–102 (2012).

    Article  CAS  PubMed  Google Scholar 

  20. Zhu, P., Fajardo, O., Shum, J., Schärer, Y.-P. Z. & Friedrich, R. W. High-resolution optical control of spatiotemporal neuronal activity patterns in zebrafish using a digital micromirror device. Nat. Protoc. 7, 1410–1425 (2012).

    Article  CAS  PubMed  Google Scholar 

  21. Guo, Z. V., Hart, A. C. & Ramanathan, S. Optical interrogation of neural circuits in Caenorhabditis elegans. Nat. Methods 6, 891–896 (2009).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  22. Szabo, V., Ventalon, C., De Sars, V., Bradley, J. & Emiliani, V. Spatially selective holographic photoactivation and functional fluorescence imaging in freely behaving mice with a fiberscope. Neuron 84, 1157–1169 (2014).

    Article  CAS  PubMed  Google Scholar 

  23. Cai, D. J. et al. A shared neural ensemble links distinct contextual memories encoded close in time. Nature 534, 115–118 (2016).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  24. Burton, R. A. et al. Optical control of excitation waves in cardiac tissue. Nat. Photonics 9, 813–816 (2015).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  25. Jung, H., Kang, H. & Nam, Y. Digital micromirror based near-infrared illumination system for plasmonic photothermal neuromodulation. Biomed. Opt. Express 8, 2866–2878 (2017).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  26. Ren, M., Chen, J., Chen, D. & Chen, S.-C. Aberration-free 3D imaging via DMD-based two-photon microscopy and sensorless adaptive optics. Opt. Lett. 45, 2656–2659 (2020).

    Article  CAS  PubMed  Google Scholar 

  27. Akerboom, J. et al. Genetically encoded calcium indicators for multi-colour neural activity imaging and combination with optogenetics. Front. Mol. Neurosci. 6, 2 (2013).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  28. Dana, H. et al. Sensitive red protein calcium indicators for imaging neural activity. eLife 5, e12727 (2016).

    Article  PubMed  PubMed Central  Google Scholar 

  29. Shemesh, O. A. et al. Temporally precise single-cell-resolution optogenetics. Nat. Neurosci. 20, 1796–1806 (2017).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  30. Owen, S. F., Liu, M. H. & Kreitzer, A. C. Thermal constraints on in vivo optogenetic manipulations. Nat. Neurosci. 22, 1061–1065 (2019).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  31. Gerfen, C. R., Paletzki, R. & Heintz, N. GENSAT BAC cre-recombinase driver lines to study the functional organization of cerebral cortical and basal ganglia circuits. Neuron 80, 1368–1383 (2013).

    Article  CAS  PubMed  Google Scholar 

  32. Yin, H. H. The basal ganglia in action. Neuroscientist 23, 299–313 (2017).

    Article  PubMed  Google Scholar 

  33. Mink, J. W. The basal ganglia: focused selection and inhibition of competing motor programs. Prog. Neurobiol. 50, 381–425 (1996).

    Article  CAS  PubMed  Google Scholar 

  34. Kravitz, A. V. et al. Regulation of Parkinsonian motor behaviours by optogenetic control of basal ganglia circuitry. Nature 466, 622–626 (2010).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  35. Bakhurin, K. I. et al. Opponent regulation of action performance and timing by striatonigral and striatopallidal pathways. eLife 9, e54831 (2020).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  36. Tecuapetla, F., Matias, S., Dugue, G. P., Mainen, Z. F. & Costa, R. M. Balanced activity in basal ganglia projection pathways is critical for contraversive movements. Nat. Commun. 5, 4315 (2014).

    Article  CAS  PubMed  Google Scholar 

  37. Freeze, B. S., Kravitz, A. V., Hammack, N., Berke, J. D. & Kreitzer, A. C. Control of basal ganglia output by direct and indirect pathway projection neurons. J. Neurosci. 33, 18531–18539 (2013).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  38. Rossi, M. A. et al. A wirelessly controlled implantable LED system for deep brain optogenetic stimulation. Front. Integr. Neurosci. 9, 8 (2015).

    Article  PubMed  PubMed Central  Google Scholar 

  39. Mathis, A. et al. DeepLabCut: markerless pose estimation of user-defined body parts with deep learning. Nat. Neurosci. 21, 1281–1289 (2018).

    Article  CAS  PubMed  Google Scholar 

  40. Pisanello, F. et al. Dynamic illumination of spatially restricted or large brain volumes via a single tapered optical fiber. Nat. Neurosci. 20, 1180–1188 (2017).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  41. Ronzitti, E. et al. Recent advances in patterned photostimulation for optogenetics. J. Opt. 19, 113001 (2017).

    Article  Google Scholar 

  42. Forli, A. et al. Two-photon bidirectional control and imaging of neuronal excitability with high spatial resolution in vivo. Cell Rep. 22, 3087–3098 (2018).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  43. Kane, G. A., Lopes, G., Saunders, J. L., Mathis, A. & Mathis, M. W. Real-time, low-latency closed-loop feedback using markerless posture tracking. eLife 9, e61909 (2020).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  44. Zhou, P. et al. Efficient and accurate extraction of in vivo calcium signals from microendoscopic video data. eLife 7, e28728 (2018).

    Article  PubMed  PubMed Central  Google Scholar 

  45. Tran, L. M. et al. Automated curation of CNMF-E-extracted ROI spatial footprints and calcium traces using open-source AutoML tools. Front. Neural Circuits 14, 42 (2020).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

Download references

Acknowledgements

We thank N. Calakos, S. Je and M. Rossi for helpful comments on the manuscript. This paper is dedicated to the memory of our co-author Ryan N. Hughes (1987–2021).

Author information

Authors and Affiliations

Authors

Contributions

H.H.Y. conceived the concept of the all-optical 1-photon system for freely moving mice. J.Z., N.K. and H.H.Y. designed the experiments. J.Z. designed, assembled and calibrated the circuit board and MAPSI. J.Z. and I.P.F performed testing in mice. J.Z., N.K. F.P. U.S. and K.B. analysed data. N.K., I.P.F., K.B. and R.N.H performed surgeries. R.N.H and J.K. performed histology and confocal imaging. R.N.H., J.Z. and H.H.Y. wrote the manuscript.

Corresponding author

Correspondence to Henry H. Yin.

Ethics declarations

Competing interests

H.H.Y. and J.Z. filed a provisional patent on the designs presented in this paper (63/289394, December 14, 2021, North Carolina, USA). The other authors declare no competing interests.

Peer review

Peer review information

Nature Biomedical Engineering thanks Dimitri Ryczko, Michael C. Wiest and the other, anonymous, reviewer(s) for their contribution to the peer review of this work.

Additional information

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Extended data

Extended Data Fig. 1 Free movement using MAPSI and stimulation pipeline.

To reduce the weight of MAPSI carried by the mouse, a custom commutator was built. a) The commutator is attached to a 4 g pulley, and allows the wires to rotate without being tangled. b) Top: Open field trajectory over 15 min of a representative mouse with 4 g UCLA miniscope compared to the trajectory of the same mouse carrying 7.8 g MAPSI. Bottom: Total movement distance, peak speed, and average speed (N = 7, 4 D1-cre mice and 3 A2A-cre mice, 15 minutes in the same open field platform). Unpaired t test analysis revealed no significant difference between mice carrying UCLA Miniscope and MAPSI in distance (p = 0.1274) or peak speed (p = 0.0826), but mice carrying MAPSI showed reduced average speed (p = 0.0238). * p < 0.05. c) Stimulation pipeline. Simultaneously record and analyze the calcium activity as well as the behavior. Isolate the behaviorally relevant neurons. Find the neurons that co-express both ChR2 and jRCaMP1b. Target neurons with co-expression and replay activity.

Extended Data Fig. 2 Contraversive turning behavior can be reliably elicited by stimulating as few as 3 dSPNs.

a) Calcium imaging of the selected direct pathway neurons for photostimulation. Anywhere from one to five neurons were selectively stimulated. b) Optogenetically stimulating 3 or more neurons reliably produced contraversive turning. c) Turning was significantly higher when exciting 3 or more neurons (One-way ANOVA, F(2,174) = 15.39, p = 0.0006). Tukey’s post hoc analysis revealed no significant difference between 2 neurons and 1 neuron (p = 0.9997), no significant difference between 3 neurons and 1 neuron(p = 0.3750), significant difference between 4 neurons and 1 neuron (p = 0.0454), significant difference between 5 neurons and 1 neuron (p < 0.0001), and significant difference between whole FOV stim and 1 neuron (p < 0.0001). (N = 2 D1-Cre mice, 15 trials for 1 neuron, 13 trials for 2 neurons, 13 trials for 3 neurons, 11 trials for 4 neurons, 19 trials for 5 neurons, and 14 trials for whole FOV). * p < 0.05, ** p < 0.01, *** p < 0.001, **** p < 0.0001.

Extended Data Fig. 3 Ipsiversive turning behavior can be reliably elicited by stimulating as few as 3 iSPNs.

a) Images of the selected indirect pathway neurons for photostimulation. b) Stimulating 3 or more neurons reliably produced contraversive turning. c) Higher number of stimulated neurons increased maximum ipsiversive turning angle (One-way ANOVA, F(4,21) = 6.104, p = 0.0037). Tukey’s post hoc analysis revealed no significant difference between 2 neurons and 1 neuron (p = 0.9999), no significant difference between 3 neurons and 1 neuron(p = 0.0953), significant difference between 4 neurons and 1 neuron (p = 0.0303), and significant difference between whole FOV stim and 1 neuron (p < 0.0001). 2 A2A-Cre mice, 10 trials for 1 neuron, 7 trials for 2 neurons, 9 trials for 3 neurons, 13 trials for 4 neurons, and 11 trials for whole FOV.

Extended Data Fig. 4 There is no significant difference in turning from direct and indirect pathway stimulation using different parameters of stimulation.

a) We optogenetically stimulated neurons in the calcium imaging FOV with 3 different parameters: continuous 500 ms, 20 Hz (10 pulses in 500 ms), and 10 Hz (5 pulses in 500 ms). b) Left) Optogenetic excitation of direct pathway neurons in the DLS using the MAPSI significantly increased contraversive turning. Right) There was no significant stimulation effect (One-way ANOVA, F(2,24)=1.315, p = 0.2872) (N = 2 D1-cre mice, 10 trials for 10 Hz, 8 trials for 20 Hz, and 12 trials for continuous). c) Left) Optogenetic excitation of indirect pathway neurons in the DLS using the MAPSI significantly increased ipsiversive turning behavior (One-way ANOVA, F(2,24)=4.099, p = 0.0294; continuous vs 20 Hz, p = 0.9367; continuous vs 10 Hz, p = 0.0407, 20 Hz vs 10 Hz, p = 0.1080) (2 A2A-cre mice, 12 trials for 10 Hz, 8 trials for 20 Hz, and 8 trials for continuous). * p < 0.05.

Extended Data Fig. 5 Behavioral effect of stimulation is stable across time.

a) Top, a representative A2A-cre mouse was placed in an open field arena where several neurons were selected for stimulation on day 1 of a simultaneous stimulation and recording experiment. Shown on the right are the neurons selected for stimulation. Bottom, the same mouse was then tested 10 days and 40 days later in the open field arena, and the same neurons from day 1 were selectively stimulated. b) There was no significant difference in turning from day 1 compared to day 40 (t(14) = 0.71, p = 0.49, 2 A2A-cre mice, 12 trials on day 1, 13 trials on day 40).

Supplementary information

Supplementary Information

Supplementary figures.

Reporting Summary

Supplementary Video 1

Photoactivation of a selected neuron in the dorsal striatum (direct pathway).

Supplementary Video 2

Stimulation of 4 indirect pathway neurons that are normally active during ipsiversive turning.

Supplementary Video 3

Sequence stimulation of 5 direct pathway neurons that are normally active during contraversive turning.

Supplementary Video 4

Sweep stimulation of indirect pathway neurons.

Rights and permissions

Springer Nature or its licensor holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Zhang, J., Hughes, R.N., Kim, N. et al. A one-photon endoscope for simultaneous patterned optogenetic stimulation and calcium imaging in freely behaving mice. Nat. Biomed. Eng 7, 499–510 (2023). https://doi.org/10.1038/s41551-022-00920-3

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1038/s41551-022-00920-3

This article is cited by

Search

Quick links

Nature Briefing

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing