Content uploaded by Adam L Tyson
Author content
All content in this area was uploaded by Adam L Tyson on Feb 12, 2021
Content may be subject to copyright.
BrainGlobe Atlas API: a common interface for
neuroanatomical atlases
Federico Claudi∗1, Luigi Petrucco*2, 3, Adam L. Tyson*1, Tiago
Branco1, Troy W. Margrie1, and Ruben Portugues2, 3, 4
1Sainsbury Wellcome Centre, University College London, London, U.K. 2Institute of Neuroscience,
Technical University of Munich, Munich, Germany 3Max Planck Institute of Neurobiology, Research
Group of Sensorimotor Control, Martinsried, Germany 4Munich Cluster for Systems Neurology
(SyNergy), Munich, Germany
DOI: 10.21105/joss.02668
Software
•Review
•Repository
•Archive
Editor: Olivia Guest
Reviewers:
•@typically
•@vitay
Submitted: 04 September 2020
Published: 05 October 2020
License
Authors of papers retain
copyright and release the work
under a Creative Commons
Attribution 4.0 International
License (CC BY 4.0).
Summary
Neuroscientists routinely perform experiments aimed at recording or manipulating neural activ-
ity, uncovering physiological processes underlying brain function or elucidating aspects of brain
anatomy. Understanding how the brain generates behaviour ultimately depends on merging
the results of these experiments into a unied picture of brain anatomy and function. Brain
atlases are crucial in this endeavour: by outlining the organization of brain regions they provide
a reference upon which our understanding of brain function can be anchored. More recently,
digital high-resolution 3d atlases have been produced for several model organisms providing
an invaluable resource for the research community. Eective use of these atlases depends
on the availability of an application programming interface (API) that enables researchers to
develop software to access and query atlas data. However, while some atlases come with an
API, these are generally specic for individual atlases, and this hinders the development and
adoption of open-source neuroanatomy software. The BrainGlobe atlas API (BG-Atlas API)
overcomes this problem by providing a common interface for programmers to download and
process data across a variety of model organisms. By adopting the BG-Atlas API, software can
then be developed agnostic to the atlas, increasing adoption and interoperability of packages
in neuroscience and enabling direct integration of dierent experimental modalities and even
comparisons across model organisms.
Statement of need
To facilitate the study of neural function, a long-standing approach has been to identify
neuroanatomically dened brain regions: structures with dened function, connectivity and
anatomical location. The study of these brain regions led to the development of a number
of brain atlases for various species. Typically these atlases are made up of a reference image
of a brain, voxel-wise annotations (e.g. a mapping from each voxel to a brain structure) and
additional metadata such as region hierarchy (region A is a subdivision of region B). These
atlases are used throughout neuroscience, for teaching, visualisation of data, and registration
of imaging data to a common coordinate space.
Many excellent and open access atlases exist, such as the Allen Mouse Brain Common Coordi-
nate Framework (Wang et al., 2020) and the Max Planck Larval Zebrash Atlas (Kunst et al.,
2019), from which the neuroscience community benets enormously. These atlases provide
a valuable resource for individual scientists and enabled important open-science projects such
∗Joint rst author, ordered alphabetically
Claudi et al., (2020). BrainGlobe Atlas API: a common interface for neuroanatomical atlases. Journal of Open Source Software, 5(54), 2668.
https://doi.org/10.21105/joss.02668
1
as Janelia Campus’ Mouse Light project (Winnubst et al., 2019). Furthermore, for several at-
lases stand-alone software is available that can be used to explore the atlas’ data and requires
no coding experience, thus making the atlases accessible to a broader audience. However,
to be used in the context of new software (e.g. new visualization tools, or brain registration
pipelines) it is necessary that atlases expose their data through an API. Several commonly
used atlases come with APIs, but learning how to use each of them is a time-consuming
endavour and can require considerable coding experience. For this reason, often developers
produce software that works only with a specic atlas. A single and well documented API that
worked across atlases would thus lower the cost of developing new software, which can also
be made available for a larger number of scientists. An eort in this direction has been made
in the R ecosystem with the natverse package (Bates et al., 2020), but, to our knowledge,
no such option exists in Python, which is emerging as the programming language of choice in
neuroscience (Muller et al., 2015).
bg-atlasapi was built to address these issues and with two main design goals in mind. The
rst was to simplify the use of atlases for neuroscientists by providing a simple, concise and
well-documented API. The second was to reduce the burden required to develop tools that can
be used across atlases. The majority of neuroanatomical software tools developed currently
are for a single model organism, yet many of these tools could be of great use for many other
neuroscientists.
Developers can use bg-atlasapi to access data from multiple atlases in common formats.
Each atlas can be instantiated by passing the atlas name to the BrainGlobeAtlas class. A
number of les are provided as class attributes including a reference (structural) image, an
annotation image (a map of brain regions coded by voxel intensity), meshes for each brain
region, and various metadata such as the authors of the atlas, and the hierarchy of the brain
regions. There are methods for many common tasks such as orienting data and parsing the
region hierarchy.
Currently six atlases across three species (larval zebrash, mouse and human) are available
(Chon, Vanselow, Cheng, & Kim, 2019; Ding et al., 2016; Kunst et al., 2019; Wang et al.,
2020), with work underway to add further atlases (e.g. rat, drosophila). The available atlases
were created by parsing their relative online sources and restructuring the data to a standard
format. The atlases were then made accessible by hosting the data in a GNode respository
(https://gin.g-node.org/brainglobe/atlases). The python code used for generating
the atlases is also made available in a separate repository in the BrainGlobe organization:
bg-atlasgen. The same code can be used for easily developing new atlases in BG-AtlasAPI’s
format and we encourage users to contribute new atlases to the project by submitting new
scripts to bg-atlasgen.
BG-atlasAPI’s exible infrastructure already proved crucial in the development and extension
of two software tools for use in neuroscience: brainreg (Tyson, Rousseau, & Margrie, 2020)
for 3D registration of image data between sample and atlas coordinate space and brainrender
(Claudi, Tyson, & Branco, 2020) for 3D visualisation of both user-generated data and atlas
data. We hope that other developers will use the API, and develop tools that can be used
across neuroscience and other research elds, increasing their reach, and preventing duplication
of eort.
Acknowledgments
We would like to thank Nouwar Mokayes for the assistance in packaging the Max Planck Ze-
brash Brain Atlas within BG-atlasAPI. This work was supported by grants from the Gatsby
Charitable Foundation (GAT3361, T.W.M. and T.B.), Wellcome Trust (090843/F/09/Z,
T.W.M. and T.B.; 214333/Z/18/Z, T.W.M.; 214352/Z/18/Z, T.B.) and by the Deutsche
Forschungsgemeinschaft (DFG, German Research Foundation) under Germany’s Excellence
Claudi et al., (2020). BrainGlobe Atlas API: a common interface for neuroanatomical atlases. Journal of Open Source Software, 5(54), 2668.
https://doi.org/10.21105/joss.02668
2
Strategy within the framework of the Munich Cluster for Systems Neurology (EXC 2145 SyN-
ergy – ID 390857198).
References
Bates, A. S., Manton, J. D., Jagannathan, S. R., Costa, M., Schlegel, P., Rohlng, T., &
Jeeris, G. S. (2020). The natverse, a versatile toolbox for combining and analysing
neuroanatomical data. eLife,9, e53350. doi:10.7554/eLife.53350
Chon, U., Vanselow, D. J., Cheng, K. C., & Kim, Y. (2019). Enhanced and unied anatomical
labeling for a common mouse brain atlas. Nature communications,10(1), 1–12. doi:10.
1038/s41467-019-13057-w
Claudi, F., Tyson, A. L., & Branco, T. (2020). Brainrender. A python based software for
visualisation of neuroanatomical and morphological data. bioRxiv. doi:10.1101/2020.02.
23.961748
Ding, S.-L., Royall, J. J., Sunkin, S. M., Ng, L., Facer, B. A., Lesnar, P., Guillozet-Bongaarts,
A., et al. (2016). Comprehensive cellular-resolution atlas of the adult human brain.
Journal of Comparative Neurology,524(16), 3127–3481. doi:10.1002/cne.24080
Kunst, M., Laurell, E., Mokayes, N., Kramer, A., Kubo, F., Fernandes, A. M., Förster, D.,
et al. (2019). A cellular-resolution atlas of the larval zebrash brain. Neuron,103(1),
21–38.e5. doi:10.1016/j.neuron.2019.04.034
Muller, E., Bednar, J. A., Diesmann, M., Gewaltig, M.-O., Hines, M., & Davison, A. P.
(2015). Python in neuroscience. Frontiers in Neuroinformatics,9, 11. doi:10.3389/fninf.
2015.00011
Tyson, A. L., Rousseau, C. V., & Margrie, T. W. (2020). brainreg: automated 3D brain
registration with support for multiple species and atlases. Zenodo. doi:10.5281/zenodo.
3991718
Wang, Q., Ding, S. L., Li, Y., Royall, J., Feng, D., Lesnar, P., Graddis, N., et al. (2020). The
Allen Mouse Brain Common Coordinate Framework: A 3D Reference Atlas. Cell,181(4),
936–953.e20. doi:10.1016/j.cell.2020.04.007
Winnubst, J., Bas, E., Ferreira, T. A., Wu, Z., Economo, M. N., Edson, P., Arthur, B. J.,
et al. (2019). Reconstruction of 1,000 projection neurons reveals new cell types and
organization of Long-Range connectivity in the mouse brain. Cell,179 (1), 268–281.e13.
doi:10.1016/j.cell.2019.07.042
Claudi et al., (2020). BrainGlobe Atlas API: a common interface for neuroanatomical atlases. Journal of Open Source Software, 5(54), 2668.
https://doi.org/10.21105/joss.02668
3