BrainGlobe Atlas API
BrainGlobe Atlas API: a common interface for neuroanatomical atlases - Published in JOSS (2020)
Science Score: 77.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 45 DOI reference(s) in README -
✓Academic publication links
Links to: joss.theoj.org -
✓Committers with academic emails
3 of 35 committers (8.6%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.5%) to scientific vocabulary
Keywords
Repository
A Python interface to access neuroanatomical atlases
Basic Info
- Host: GitHub
- Owner: brainglobe
- License: bsd-3-clause
- Language: Python
- Default Branch: main
- Homepage: https://brainglobe.info/documentation/brainglobe-atlasapi/index.html
- Size: 1.05 MB
Statistics
- Stars: 157
- Watchers: 10
- Forks: 49
- Open Issues: 157
- Releases: 21
Topics
Metadata Files
README.md
brainglobe-atlasapi
The BrainGlobe Atlas API (brainglobe-atlasapi) provides a common interface for programmers to download and process brain atlas data from multiple sources.
Atlases available
A number of atlases are in development, but those available currently are:
| Atlas Name | Resolution | Ages | Reference Images | Name in API & More Info |
| --- | --- | --- | --- | --- |
| Allen Mouse Brain Atlas | 10, 25, 50, and 100 micron | P56 | STPT | |
| Allen Human Brain Atlas | 500 micron | Adult | MRI |
|
| Max Planck Zebrafish Brain Atlas | 1 micron | 6 dpf | FISH |
|
| Enhanced and Unified Mouse Brain Atlas | 10, 25, 50, and 100 micron | P56 | STPT |
|
| Smoothed version of the Kim et al. mouse reference atlas | 10, 25, 50 and 100 micron | P56 | STPT |
|
| Gubra's LSFM mouse brain atlas | 20 micron | 8 to 10 weeks post natal | LSFM |
|
| 3D version of the Allen mouse spinal cord atlas | 20 x 10 x 10 micron | Adult | Nissl |
|
| AZBA: A 3D Adult Zebrafish Brain Atlas | 4 micron | 15-16 weeks post natal | LSFM |
|
| Waxholm Space atlas of the Sprague Dawley rat brain | 39 micron | P80 | MRI |
|
| 3D Edge-Aware Refined Atlases Derived from the Allen Developing Mouse Brain Atlases | 16, 16.75, and 25 micron | E13, E15, E18, P4, P14, P28 & P56 | Nissl |
|
| Princeton Mouse Brain Atlas | 20 micron | >P56 (older animals included) | LSFM |
|
| Kim Lab Developmental CCF v1.0 | 20, 31.5, 34, 37.5, 40, and 50 micron | E11.5, E13.5, E15.5, E18.5, P04, P14, P56 | LSFM and MRI (adc, dwi, fa, T2) |
|
| Kim Lab Developmental CCF v001 | 10 micron | P56 | STPT, LSFM (iDISCO) and MRI (a0, adc, dwo, fa, MTR, T2) |
|
| Blind Mexican Cavefish Brain Atlas | 2 micron | 6 dpf | IHC |
|
| BlueBrain Barrel Cortex Atlas | 10 and 25 micron | P56 | STPT |
|
| UNAM Axolotl Brain Atlas | 40 micron | ~ 3 months post hatching | MRI |
|
| Prairie Vole Brain Atlas | 25 micron | Unknown | LSFM |
|
| Gubra's stereotaxic MRI mouse brain atlas | 25 micron | 10 week old | MRI |
|
| Gubra's LSFM mouse brain atlas v2 | 25 micron | 10 week old | LSFM |
|
| MRI mouse lemur brain atlas | 91 micron | 15–58 months | MRI |
|
| Australian Mouse Brain Atlas | 15 micron | 12 week old | MRI |
|
| Cat brain atlas | 500 micron | Adult | MRI |
|
| Eurasian blackcap atlas | 25 micron| Adult | STPT |
|
| BlueBrain CCFv3 Augmented | 10 and 25 micron | P56 | Nissl |
|
| Kocher Bumblebee Brain Atlas | 2.542 x 1.2407 x 1.2407 micron | Adult Worker | Confocal |
|
| Drosophila wing disc instar3 atlas| 2 micron | 3rd Instar Larvae | Confocal |
|
Acronyms: - dpf: Days Post Fertilisation - E: Embryonic day - FISH: Fluorescent In Situ Hybridisation - IHC: Immunohistochemistry - LSFM: Light Sheet Fluorescent Microscopy - MRI: Magnetic Resonance Imaging - P: Post natal day - STPT: Serial Two Photon Tomography
Installation
brainglobe-atlasapi can be installed from PyPI with:
bash
pip install brainglobe-atlasapi
Usage
Full information can be found in the documentation
Python API
List of atlases
To see a list of atlases use brainglobe_atlasapi.show_atlases
```python from brainglobeatlasapi import showatlases show_atlases()
Brainglobe Atlases
╭──────────────────────────────────┬────────────┬───────────────┬──────────────╮
│ Name │ Downloaded │ Local version │ Latest │
│ │ │ │ version │
├──────────────────────────────────┼────────────┼───────────────┼──────────────┤
│ allenhuman500um │ ✔ │ 0.1 │ 0.1 │
│ mpinzfish1um │ ✔ │ 0.3 │ 0.3 │
│ allenmouse50um │ ✔ │ 0.3 │ 0.3 │
│ kimunified25um │ ✔ │ 0.1 │ 0.1 │
│ allenmouse25um │ ✔ │ 0.3 │ 0.3 │
│ allenmouse10um │ ✔ │ 0.3 │ 0.3 │
│ examplemouse100um │ --- │ --- │ 0.3 │
╰──────────────────────────────────┴────────────┴───────────────┴──────────────╯
```
Using the atlases
All the features of each atlas can be accessed via the BrainGlobeAtlas class.
e.g. for the 25um Allen Mouse Brain Atlas:
python
from brainglobe_atlasapi.bg_atlas import BrainGlobeAtlas
atlas = BrainGlobeAtlas("allen_mouse_25um")
The various files associated with the atlas can then be accessed as attributes of the class:
```python
reference image
referenceimage = atlas.reference print(referenceimage.shape)
(528, 320, 456)
annotation image
annotationimage = atlas.annotation print(annotationimage.shape)
(528, 320, 456)
a hemispheres image (value 1 in left hemisphere, 2 in right) can be generated
hemispheresimage = atlas.hemispheres print(hemispheresimage.shape)
(528, 320, 456)
```
Brain regions
There are multiple ways to work with individual brain regions. To see a dataframe of each brain region, with it's unique ID, acronym and full name, use atlas.lookup_df:
```python atlas.lookup_df.head(8)
acronym id name
0 root 997 root
1 grey 8 Basic cell groups and regions
2 CH 567 Cerebrum
3 CTX 688 Cerebral cortex
4 CTXpl 695 Cortical plate
5 Isocortex 315 Isocortex
6 FRP 184 Frontal pole, cerebral cortex
7 FRP1 68 Frontal pole, layer 1
```
Each brain region can also be access by the acronym, e.g. for primary visual cortex (VISp):
```python from pprint import pprint VISp = atlas.structures["VISp"] pprint(VISp)
{'acronym': 'VISp',
'id': 385,
'mesh': None,
'meshfilename': PosixPath('/home/user/.brainglobe/allenmouse25umv0.3/meshes/385.obj'),
'name': 'Primary visual area',
'rgb_triplet': [8, 133, 140],
'structureidpath': [997, 8, 567, 688, 695, 315, 669, 385]}
```
Note on coordinates in brainglobe-atlasapi
Working with both image coordinates and cartesian coordinates in the same space can be confusing!
In brainglobe-atlasapi, the origin is always assumed to be in the upper left corner of the image (sectioning along the first dimension), the "ij" convention.
This means that when plotting meshes and points using cartesian systems, you might encounter confusing behaviors coming from the fact that in cartesian plots one axis is inverted with respect to ij coordinates (vertical axis increases going up, image row indexes increase going down).
To make things as consistent as possible, in brainglobe-atlasapi the 0 of the meshes coordinates is assumed to coincide with the 0 index of the images stack, and meshes coordinates increase following the direction stack indexes increase.
To deal with transformations between your data space and brainglobe-atlasapi, you might find the brainglobe-space package helpful.
Seeking help or contributing
We are always happy to help users of our tools, and welcome any contributions. If you would like to get in contact with us for any reason, please see the contact page of our website. To contribute to brainglobe-atlasapi, please see the BrainGlobe developer's guide.
Citation
If you find the BrainGlobe Atlas API useful, please cite the paper in your work:
Claudi, F., Petrucco, L., Tyson, A. L., Branco, T., Margrie, T. W. and Portugues, R. (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
Don't forget to cite the developers of the atlas that you used!
Atlas Generation and Adding a New Atlas
For full instructions to add a new BrainGlobe atlas, please see here.
The brainglobe_atlasapi.atlas_generation submodule contains code for the generation of cleaned-up data, for the main brainglobe_atlasapi module.
This code was previously the bg-atlasgen module.
To contribute
- Fork this repo
- Clone your repo
- Run
git clone https://github.com/brainglobe/brainglobe-atlasapi - Install an editable version of the package; by running
pip install -e .within the cloned directory - Create a script to package your atlas, and place into
brainglobe_atlasapi/atlas_generation/atlas_scripts. Please see other scripts for examples.
Your script should contain everything required to run. The raw data should be hosted on a publicly accessible repository so that anyone can run the script to recreate the atlas.
If you need to add any dependencies, please add them as an extra in the pyproject.toml file, e.g.:
python
[project.optional-dependencies]
allenmouse = ["allensdk"]
newatlas = ["dependency_1", "dependency_2"]
Owner
- Name: BrainGlobe
- Login: brainglobe
- Kind: organization
- Location: London/Munich
- Website: https://brainglobe.info/
- Twitter: brain_globe
- Repositories: 28
- Profile: https://github.com/brainglobe
Open python tools for morphological analyses in systems neuroscience
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: BrainGlobe AtlasAPI
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Federico
family-names: Claudi
affiliation: 'Sainsbury Wellcome Centre, University College London'
- given-names: Luigi
affiliation: 'Institute of Neuroscience, Technical University of Munich'
family-names: Petrucco
- given-names: Adam
family-names: Tyson
affiliation: 'Sainsbury Wellcome Centre, University College London'
orcid: 'https://orcid.org/0000-0003-3225-1130'
email: code@adamltyson.com
repository-code: 'https://github.com/brainglobe/brainglobe-atlasapi'
url: >-
https://brainglobe.info/documentation/brainglobe-atlasapi/index.html
abstract: >-
A common interface for programmers to download and process
brain atlas data from multiple sources.
license: BSD-3-Clause
commit: fc8828d2b7797354083ceef07bcd8ddce1020ead
version: 1.0.3
date-released: '2024-01-29'
year: 2024
preferred-citation:
type: article
authors:
- given-names: Federico
family-names: Claudi
affiliation: 'Sainsbury Wellcome Centre, University College London'
- given-names: Luigi
affiliation: 'Institute of Neuroscience, Technical University of Munich'
family-names: Petrucco
- given-names: Adam
family-names: Tyson
affiliation: 'Sainsbury Wellcome Centre, University College London'
- given-names: Tiago
family-names: Branco
affiliation: 'Sainsbury Wellcome Centre, University College London'
- given-names: Troy
family-names: Margrie
affiliation: 'Sainsbury Wellcome Centre, University College London'
- given-names: Ruben
family-names: Portugues
affiliation: 'Max Planck Institute of Neurobiology, Research Group of Sensorimotor Control, Martinsried, Germany'
doi: "10.21105/joss.02668"
url: "https://doi.org/10.21105/joss.02668"
journal: "Journal of Open Source Software"
month: 10
year: 2020
title: "BrainGlobe Atlas API: a common interface for neuroanatomical atlases"
issue: 54
volume: 5
GitHub Events
Total
- Fork event: 17
- Create event: 86
- Commit comment event: 1
- Release event: 8
- Issues event: 120
- Watch event: 28
- Delete event: 72
- Member event: 2
- Issue comment event: 443
- Push event: 297
- Pull request review event: 274
- Pull request review comment event: 189
- Pull request event: 195
Last Year
- Fork event: 17
- Create event: 86
- Commit comment event: 1
- Release event: 8
- Issues event: 121
- Watch event: 28
- Delete event: 72
- Member event: 2
- Issue comment event: 444
- Push event: 297
- Pull request review event: 274
- Pull request review comment event: 189
- Pull request event: 196
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Luigi Petrucco | l****o@g****m | 81 |
| Adam Tyson | c****e@a****m | 72 |
| FedeClaudi | f****i@p****m | 57 |
| pre-commit-ci[bot] | 6****] | 34 |
| Alessandro Felder | a****r | 27 |
| Stella | 3****s | 22 |
| Harry Carey | h****5@g****m | 19 |
| Igor Tatarnikov | 6****v | 13 |
| Will Graham | 3****1 | 9 |
| viktorpm | 5****m | 8 |
| David Stansby | d****y@g****m | 7 |
| KAIXIANG SHUAI | 1****y | 4 |
| carlocastoldi | 3****i | 4 |
| saimaabdus19 | 1****9 | 4 |
| Wolf | 2****f | 3 |
| Miguel Xochicale, PhD | m****e@u****k | 3 |
| Nicholas A. Del Grosso | d****k@g****m | 2 |
| kjungwoo5 | 1****5 | 2 |
| paddyroddy | p****y@g****m | 2 |
| sacha091 | s****9@g****m | 1 |
| saarah815 | 6****5 | 1 |
| pranav33317 | 1****7 | 1 |
| kirato yoshihara | 3****8 | 1 |
| Swapnaneel Patra | 5****5 | 1 |
| Sean Martin | m****7@t****e | 1 |
| Samuel Diebolt | s****l@d****o | 1 |
| Rob Campbell | r****l | 1 |
| Oren Amsalem | o****1@m****l | 1 |
| Kimberly Meechan | 2****h | 1 |
| Henry Crosswell | 5****l | 1 |
| and 5 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 223
- Total pull requests: 259
- Average time to close issues: 5 months
- Average time to close pull requests: 9 days
- Total issue authors: 21
- Total pull request authors: 24
- Average comments per issue: 1.08
- Average comments per pull request: 1.73
- Merged pull requests: 192
- Bot issues: 0
- Bot pull requests: 21
Past Year
- Issues: 101
- Pull requests: 187
- Average time to close issues: 12 days
- Average time to close pull requests: 7 days
- Issue authors: 12
- Pull request authors: 17
- Average comments per issue: 0.84
- Average comments per pull request: 1.95
- Merged pull requests: 141
- Bot issues: 0
- Bot pull requests: 15
Top Authors
Issue Authors
- PolarBean (86)
- adamltyson (52)
- alessandrofelder (39)
- IgorTatarnikov (12)
- viktorpm (5)
- stellaprins (5)
- mxochicale (4)
- FedeClaudi (3)
- Antorhythms (3)
- dbirman (2)
- thisisrick25 (2)
- niksirbi (1)
- Robkozol (1)
- JoeZiminski (1)
- pderdeyn (1)
Pull Request Authors
- stellaprins (41)
- alessandrofelder (37)
- adamltyson (35)
- PolarBean (32)
- IgorTatarnikov (21)
- pre-commit-ci[bot] (21)
- viktorpm (11)
- pranav33317 (8)
- Skxsmy (7)
- mxochicale (7)
- Wolfffff (6)
- carlocastoldi (5)
- thisisrick25 (4)
- kira1228 (4)
- saimaabdus19 (4)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 7,373 last-month
- Total dependent packages: 8
- Total dependent repositories: 0
- Total versions: 18
- Total maintainers: 2
pypi.org: brainglobe-atlasapi
A lightweight python module to interact with and generate atlases for systems neuroscience.
- Homepage: https://brainglobe.info/documentation/brainglobe-atlasapi/index.html
- Documentation: https://brainglobe.info/documentation/brainglobe-atlasapi/index.html
- License: BSD 3-Clause License Copyright (c) 2020, BrainGlobe All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
Latest release: 2.3.0
published 5 months ago
Rankings
Maintainers (2)
Dependencies
- actions/checkout v2 composite
- actions/setup-python v1 composite
- neuroinformatics-unit/actions/lint v1 composite
- neuroinformatics-unit/actions/test v1 composite