Skip to main content

siibra - Software interfaces for interacting with brain atlases

Project description

License PyPI version doi Python versions Documentation Status

siibra - Software interface for interacting with brain atlases

Copyright 2020-2023, 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 to a brain atlas framework that integrates brain parcellations and reference spaces at different spatial scales, and connects them with a broad range of multimodal regional data features. It aims to facilitate programmatic and reproducible incorporation of brain parcellations and brain region features from different sources into 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 access to parcellation schemes in different brain reference spaces, including volumetric reference templates at macroscopic and microscopic resolutions as well as surface representations. It supports both discretely labelled and statistical (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. The datasets anchored to brain regions address features of molecular, cellular and architecture as well as connectivity, and are complemented with live queries to external repositories as well as dynamic extraction from “big” image volumes such as the 20 micrometer BigBrain model.

siibra was developed in the frame of the Human Brain Project for accessing the EBRAINS human brain atlas. It stores most of its contents as sustainable and open datasets 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 at 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 explorative focus of siibra-explorer, the Python library supports a range of data analysis functions suitable for typical neuroscience workflows.

siibra hides much of the complexity that would be required to collect and interact with the individual parcellations, templates and 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, confusing label indices of brain regions, or using 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

While the core features in siibra can be accessed without any authentication, siibra can perform dynamic queries to regional datasets stored in the EBRAINS Knowledge Graph. To use this functionality, you need to obtain an EBRAINS authentication token with a valid EBRAINS user account. Registering to EBRAINS is easy and free of charge, so we strongly recommend to sign up. To use your EBRAINS access token in siibra:

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

  2. When using siibra, fetch an authentication token by using siibra.fetch_ebrains_token(). You will be asked to visit an ebrains login website. Login, and accept the requested detail.

Since tokens are temporary, step 2. needs to be repeated regularly. If you prefer, you can also create your token by visiting the EBRAINS authorization endpoint. Copy the token, and either store it in the environment variable $HBP_AUTH_TOKEN or pass it explicitly 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 step 2 approximately every day to perform EBRAINS data queries. However, siibra maintains a local cache on disk, so once retrieved, data features become usable and accessible without refreshing the token.

Documentation & Help

siibra-python’s documentation is hosted on https://siibra-python.readthedocs.io. The documentation includes a catalogue of 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 more extensive example use cases are maintained in the siibra-tutorials repository. We are working on a full API documentation of the library. You find the current status on readthedocs, but be aware that it is not yet complete and as up-to-date as the code examples.

If you run into issues, please open a ticket on EBRAINS support or 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 discussions in the issue tracker and of course to report issues you are facing. 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.4a58.tar.gz (550.9 kB view details)

Uploaded Source

Built Distribution

siibra-0.4a58-py3-none-any.whl (607.6 kB view details)

Uploaded Python 3

File details

Details for the file siibra-0.4a58.tar.gz.

File metadata

  • Download URL: siibra-0.4a58.tar.gz
  • Upload date:
  • Size: 550.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for siibra-0.4a58.tar.gz
Algorithm Hash digest
SHA256 f24660f094932628f088ef3f9575b196fd360bd74a1e1c8e2627d985ed35e210
MD5 dec68c33a2aa4639805d37075fd225c4
BLAKE2b-256 72d25770295febfa71be70b20c7c8210a850180fef7888bde3ee246b7d905990

See more details on using hashes here.

File details

Details for the file siibra-0.4a58-py3-none-any.whl.

File metadata

  • Download URL: siibra-0.4a58-py3-none-any.whl
  • Upload date:
  • Size: 607.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for siibra-0.4a58-py3-none-any.whl
Algorithm Hash digest
SHA256 6bc0f3cfeb411bd2758e39c3ab84d85d9da0ab96b2d43ef6853e0537e71712a3
MD5 f112e66d5685560a609142f61179724c
BLAKE2b-256 b355d4291725b084ff016c9d4a16cc6aa8e25f56ed12a697ce53d225b1ae42e4

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