Skip to main content

Simulation and Neural network Analysis Productivity layer

Project description

banner

Build Status License codecov.io documentation status DOI

Blue Brain SNAP

Blue Brain Simulation and Neural network Analysis Productivity layer (Blue Brain SNAP).

Blue Brain SNAP is a Python library for accessing BlueBrain circuit models represented in SONATA format.

Installation

Blue Brain SNAP can be installed using pip:

pip install bluepysnap

Usage

For a full in-depth usage quide, there’s a series of jupyter notebooks available in doc/source/notebooks subfolder.

There are two main interface classes provided by Blue Brain SNAP:

Circuit corresponds to the static structure of a neural network, that is:

  • node positions and properties,

  • edge positions and properties, and,

  • detailed morphologies.

Simulation corresponds to the dynamic data for a neural network simulation, including:

  • spike reports,

  • soma reports, and,

  • compartment reports.

Most of Blue Brain SNAP methods return pandas Series or DataFrames, indexed in a way to facilitate combining data from different sources (that is, by node or edge IDs).

Among other dependencies, Blue Brain SNAP relies on Blue Brain Project provided libraries:

  • libsonata, for accessing SONATA files

  • MorphIO, for accessing detailed morphologies

Tools

Circuit Validation

Blue Brain SNAP provides a SONATA circuit validator for verifying circuits.

The validation includes:

  • integrity of the circuit config file.

  • existence of the different node/edges files and components directories.

  • presence of the “sonata required” field for node/edges files.

  • the correctness of the edge to node population/ids bindings.

  • existence of the morphology files for the nodes.

This functionality is provided by either the cli function:

bluepysnap validate-circuit my/circuit/path/circuit_config.json

Or a python free function:

from bluepysnap.circuit_validation import validate
errors = validate("my/circuit/path/circuit_config.json")

Simulation Validation

Similarly to circuit validation, Blue Brain SNAP also provides a SONATA simulation validator for verifying simulation configs.

Currently, the validator verifies that:

  • all the mandatory fields are present in the config file

  • all the properties in the simulation config specification have correct data types and accepted values

  • paths specified in the config exist

  • node sets specified in the config exist

  • input spike file’s node IDs are found in the source node set

  • electrodes file’s node IDs are found in the simulation’s node_set (if set) or in non-virtual populations

  • neurodamus helpers and variables exist (requires neurodamus to be available in the environment)

This functionality is provided by either the cli function:

bluepysnap validate-simulation my/circuit/path/simulation_config.json

Or a python free function:

from bluepysnap.simulation_validation import validate
errors = validate("my/circuit/path/simulation_config.json")

Acknowledgements

The development of this software was supported by funding to the Blue Brain Project, a research center of the École polytechnique fédérale de Lausanne (EPFL), from the Swiss government’s ETH Board of the Swiss Federal Institutes of Technology.

This project/research has received funding from the European Union’s Horizon 2020 Framework Programme for Research and Innovation under the Specific Grant Agreement No. 785907 (Human Brain Project SGA2).

The Blue Brain Project would like to thank Dr Eilif Muller, the author of the precursor to Blue Brain SNAP, for his invaluable insights and contributions

License

Blue Brain SNAP is licensed under the terms of the GNU Lesser General Public License version 3, unless noted otherwise, for example, external dependencies. Refer to COPYING.LESSER and COPYING for details.

Copyright (c) 2019-2024 Blue Brain Project/EPFL

Copyright (c) 2025 Open Brain Institute

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

Project details


Download files

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

Source Distribution

bluepysnap-3.0.2.tar.gz (1.1 MB view details)

Uploaded Source

File details

Details for the file bluepysnap-3.0.2.tar.gz.

File metadata

  • Download URL: bluepysnap-3.0.2.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for bluepysnap-3.0.2.tar.gz
Algorithm Hash digest
SHA256 4a04fe8fa2fe421f17cdc3f5a5e342b6d2d84102b19d41b1ecb4ebae9941ae70
MD5 2ab27d25aa85ba74eb6a72fae71b44da
BLAKE2b-256 3482394f79ff7da5c77793348edc87d39e4a6267d98688b6d8076c1d9ac3b9bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for bluepysnap-3.0.2.tar.gz:

Publisher: publish-sdist.yml on openbraininstitute/snap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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