Package: bluepysnap
Blue Brain SNAPBlue Brain Simulation and Neural network Analysis Productivity layer (Blue Brain SNAP).Blue Brain SNAP is a Python library for accessing BlueBrain circuit models represented inSONATAformat.InstallationBlue Brain SNAP can be installed usingpip:pip install bluepysnapUsageThere are two main interface classes provided by Blue Brain SNAP:Circuitcorresponds to thestaticstructure of a neural network, that is:node positions and properties,edge positions and properties, and,detailed morphologies.Simulationcorresponds to thedynamicdata for a neural network simulation, including:spike reports,soma reports, and,compartment reports.Most of Blue Brain SNAP methods returnpandasSeries 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 filesMorphIO, for accessing detailed morphologiesToolsCircuit ValidationBlue 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 andcomponentsdirectories.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:bluepysnapvalidate-circuitmy/circuit/path/circuit_config.jsonOr a python free function:frombluepysnap.circuit_validationimportvalidateerrors=validate("my/circuit/path/circuit_config.json")Simulation ValidationSimilarly 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 fileall the properties in thesimulation config specificationhave correct data types and accepted valuespaths specified in the config existnode sets specified in the config existinput spike file’s node IDs are found in thesourcenode setelectrodes file’s node IDs are found in the simulation’snode_set(if set) or in non-virtual populationsneurodamus helpers and variables exist (requiresneurodamusto be available in the environment)This functionality is provided by either the cli function:bluepysnapvalidate-simulationmy/circuit/path/simulation_config.jsonOr a python free function:frombluepysnap.simulation_validationimportvalidateerrors=validate("my/circuit/path/simulation_config.json")AcknowledgementsThe 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 thankDr Eilif Muller, the author of the precursor to Blue Brain SNAP, for his invaluable insights and contributionsLicenseBlue Brain SNAP is licensed under the terms of the GNU Lesser General Public License version 3,
unless noted otherwise, for example, external dependencies.
Refer toCOPYING.LESSERandCOPYINGfor details.Copyright (c) 2019-2024 Blue Brain Project/EPFLThis 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/>.