Skip to main content

siibra - Software interfaces for interacting with brain atlases

Project description

License PyPI version Python versions Documentation Status

siibra - Software interface for interacting with brain atlases

Copyright 2020-2021, Forschungszentrum Jülich GmbH

Authors: Big Data Analytics Group, Institute of Neuroscience and Medicine (INM-1), Forschungszentrum Jülich GmbH

siibra is a Python client for working with brain atlas frameworks that integrate multiple brain parcellations and reference spaces across different spatial scales, and connect them with a multimodal regional data features. It aims to facilitate the programmatic and reproducible incorporation of brain region features from different sources into reproducible neuroscience workflows.

Note: ``siibra-python`` is still in development. While care is taken that it works reliably, its API is not yet stable and you may still encounter bugs when using it.

siibra provides structured acccess to parcellation schemes in different brain reference spaces, including volumetric reference templates at both macroscopic and microscopic resolutions as well as surface representations. It supports both discretely labelled and continuous (probabilistic) parcellation maps, which can be used to assign brain regions to spatial locations and image signals, to retrieve region-specific neuroscience datasets from multiple online repositories, and to sample information from high-resolution image data. Among the datasets anchored to brain regions are many different modalities from in-vivo and post mortem studies, including regional information about cell and transmitter receptor densties, structural and functional connectivity, gene expressions, and more.

siibra is mainly developed by the Human Brain Project for accessing the EBRAINS human brain atlas. It stores much of its contents in the EBRAINS Knowledge Graph, and is designed to support the OpenMINDS metadata standards. Its functionalities include common actions known from the interactive viewer siibra explorer hosted on EBRAINS. In fact, the viewer is a good resource for exploring siibra’s core functionalities interactively: Selecting different parcellations, browsing and searching brain region hierarchies, downloading maps, identifying brain regions, and accessing multimodal features and connectivity information associated with brain regions. Feature queries in siibra are parameterized by data modality and anatomical location, while the latter could be a brain region, brain parcellation, or location in reference space. Beyond the functionality of siibra-explorer, the Python library also supports a range of data analysis features suitable for typical neuroscience workflows.

siibra hides much of the complexity that would be required to collect and interact with the individual paracellations,templates andd data repositories. By encapsulating many aspects of interacting with different maps and reference templates spaces, it also minimizes common errors like misinterpretation of coordinates from different reference spaces, mixing up label indices of brain regions, or utilisation of inconsistent versions of parcellation maps. It aims to provide a safe way of using maps defined across multiple spatial scales for reproducible analysis.

Installation

siibra is available on pypi. To install the latest released version, simply run pip install siibra. In order to work with the latest version from github, use pip install git+https://github.com/FZJ-INM1-BDA/siibra-python.git@main.

There is also an image based on jupyter:scipy-notebook, which already includes siibra.

docker run -dit \
      -p 10000:8888 \
      --rm \
      --name siibra \
      docker-registry.ebrains.eu/siibra/siibra-python:latest

Access to EBRAINS

siibra retrieves much of its data from the EBRAINS Knowledge Graph, which requires authentication. Therefore you have to provide an EBRAINS authentication token for using all features provided by siibra. Please make sure that you have a valid EBRAINS user account by registering to EBRAINS. As a last step, you need to fetch a recent token from the authorization endpoint, and To do so, please follow these steps:

  1. If you do not yet have an EBRAINS account, register here to obtain one.

  2. Your EBRAINS account needs to be enabled for programmatic access to the EBRAINS Knowledge Graph to fetch metadata. This is formal step to acknowledge additional terms of use, and done quickly by emailing to the KG team. A link and template email to do so can be found right on top of the Knowledge Graph developer page.

  3. Let siibra fetch an authentication token by using siibra.fetch_ebrains_token(). You will be asked for your EBRAINS username and password, which will be transferred encrytped and not be stored.

If you prefer not to pass your username/password on the commandline, you can also create your token by visiting the EBRAINS authorization endpoint. Copy the token, and either store it in the enviroment variable $HBP_AUTH_TOKEN or pass it explicitely to siibra using siibra.set_ebrains_token(). The token is a string sequence with more than 1000 characters, usually starting with with “ey”.

Note that as of now, you need to to steps 3 and 4 approximately every day to perform EBRAINS data queries. However, siibra maintains a local cache on disk, so once retrieved, your data will become usable and accessible without refreshing the token. During 2022, step 2 will become obsolete, and refresh times for tokens will become longer.

Documentation & Help

siibra-python’s documentation is hosted at https://siibra-python.readthedocs.io. It includes a catalogue of well documented code examples that walk you through the different concepts and functionalities. As a new user, it is recommended to go through these examples - they are easy and will quickly provide you with the right code snippets that get you started. Furthermore, a set of jupyter notebooks demonstrating concrete example usecases are maintained in the siibra-tutorials repository.

If you run into issues, please open a ticket on EBRAINS support or directly file bugs and feature requests on github. Please keep in mind that siibra-python is still in development. While care is taken to make everything work reliably, the API of the library is not yet stable, and the software is not yet fully tested.

How to contribute

If you want to contribute to siibra, feel free to fork it and open a pull request with your changes. You are also welcome to contribute to discussion in the issue tracker and of course to report issues you are facing yourself. If you find the software useful, please reference this repository URL in publications and derived work. You can also star the project to show us that you are using it.

Acknowledgements

This software code is funded from the European Union’s Horizon 2020 Framework Programme for Research and Innovation under the Specific Grant Agreement No. 945539 (Human Brain Project SGA3).

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

siibra-0.3a16.tar.gz (524.1 kB view details)

Uploaded Source

Built Distribution

siibra-0.3a16-py3-none-any.whl (551.7 kB view details)

Uploaded Python 3

File details

Details for the file siibra-0.3a16.tar.gz.

File metadata

  • Download URL: siibra-0.3a16.tar.gz
  • Upload date:
  • Size: 524.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for siibra-0.3a16.tar.gz
Algorithm Hash digest
SHA256 0154debb0914fc273bc0395ba12a88c3209884f7e294fba46415d0fbf536d1c8
MD5 69d0b8fa92f40a9097c737ec4397c520
BLAKE2b-256 051715cde2e145170183e88aa8ee992eaa5f5c05a914f83a38e53212471d9814

See more details on using hashes here.

File details

Details for the file siibra-0.3a16-py3-none-any.whl.

File metadata

  • Download URL: siibra-0.3a16-py3-none-any.whl
  • Upload date:
  • Size: 551.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for siibra-0.3a16-py3-none-any.whl
Algorithm Hash digest
SHA256 7abd74ac41c6fe17581ed4bfb2eb7bb13c91f943af2ddd7cbe2ca7c166ab44ab
MD5 7087ec1731b8a553edc5f4947a3d33b0
BLAKE2b-256 8e3434038abaa4337a45cdbb8bad0754832981b170f08bb84ab5892adfe3ddf6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page