bluepysnap


Namebluepysnap JSON
Version 3.0.0 PyPI version JSON
download
home_pagehttps://github.com/BlueBrain/snap
SummarySimulation and Neural network Analysis Productivity layer
upload_time2024-01-31 13:38:38
maintainer
docs_urlNone
authorBlue Brain Project, EPFL
requires_python>=3.8
licenseLGPLv3
keywords sonata bluebrainproject
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            |banner|

|build_status| |license| |coverage| |docs| |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 <https://github.com/AllenInstitute/sonata/blob/master/docs/SONATA_DEVELOPER_GUIDE.md>`__ format.

Installation
------------

Blue Brain SNAP can be installed using ``pip``::

   pip install bluepysnap

Usage
-----

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 <https://pandas.pydata.org>`__ 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 <https://github.com/BlueBrain/libsonata>`__, for accessing SONATA files
- `MorphIO <https://github.com/BlueBrain/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:

.. code-block:: shell

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


Or a python free function:

.. code-block:: python3

    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 <https://sonata-extension.readthedocs.io/en/latest/sonata_simulation.html>`__ 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:

.. code-block:: shell

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


Or a python free function:

.. code-block:: python3

    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 <https://github.com/markovg>`_, 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 <https://github.com/BlueBrain/snap/blob/master/COPYING.LESSER>`__ and
`COPYING <https://github.com/BlueBrain/snap/blob/master/COPYING>`__ for details.

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

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/>.


.. |build_status| image:: https://github.com/BlueBrain/snap/actions/workflows/run-tox.yml/badge.svg
   :alt: Build Status

.. |license| image:: https://img.shields.io/pypi/l/bluepysnap
   :target: https://github.com/BlueBrain/snap/blob/master/COPYING.LESSER
   :alt: License

.. |coverage| image:: https://codecov.io/github/BlueBrain/snap/coverage.svg?branch=master
   :target: https://codecov.io/github/BlueBrain/snap?branch=master
   :alt: codecov.io

.. |docs| image:: https://readthedocs.org/projects/bluebrainsnap/badge/?version=latest
   :target: https://bluebrainsnap.readthedocs.io/
   :alt: documentation status

.. |DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.8026852.svg
   :target: https://doi.org/10.5281/zenodo.8026852
   :alt: DOI

.. substitutions
.. |banner| image:: doc/source/_images/BlueBrainSNAP.jpg
.. |circuit| replace:: **Circuit**
.. |simulation| replace:: **Simulation**

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/BlueBrain/snap",
    "name": "bluepysnap",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "SONATA,BlueBrainProject",
    "author": "Blue Brain Project, EPFL",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/8e/b3/00ba2a41680a3548be01ee2cef56b1aaa98b96fd259dc5f97e1046832fcd/bluepysnap-3.0.0.tar.gz",
    "platform": null,
    "description": "|banner|\n\n|build_status| |license| |coverage| |docs| |DOI|\n\nBlue Brain SNAP\n===============\n\nBlue Brain Simulation and Neural network Analysis Productivity layer (Blue Brain SNAP).\n\nBlue Brain SNAP is a Python library for accessing BlueBrain circuit models represented in\n`SONATA <https://github.com/AllenInstitute/sonata/blob/master/docs/SONATA_DEVELOPER_GUIDE.md>`__ format.\n\nInstallation\n------------\n\nBlue Brain SNAP can be installed using ``pip``::\n\n   pip install bluepysnap\n\nUsage\n-----\n\nThere are two main interface classes provided by Blue Brain SNAP:\n\n|circuit| corresponds to the *static* structure of a neural network, that is:\n\n- node positions and properties,\n- edge positions and properties, and,\n- detailed morphologies.\n\n|simulation| corresponds to the *dynamic* data for a neural network simulation, including:\n\n- spike reports,\n- soma reports, and,\n- compartment reports.\n\nMost of Blue Brain SNAP methods return `pandas <https://pandas.pydata.org>`__ Series or DataFrames,\nindexed in a way to facilitate combining data from different sources (that is, by node or edge IDs).\n\nAmong other dependencies, Blue Brain SNAP relies on Blue Brain Project provided libraries:\n\n- `libsonata <https://github.com/BlueBrain/libsonata>`__, for accessing SONATA files\n- `MorphIO <https://github.com/BlueBrain/MorphIO>`__, for accessing detailed morphologies\n\nTools\n-----\n\nCircuit Validation\n~~~~~~~~~~~~~~~~~~\n\nBlue Brain SNAP provides a SONATA circuit validator for verifying circuits.\n\nThe validation includes:\n\n- integrity of the circuit config file.\n- existence of the different node/edges files and ``components`` directories.\n- presence of the \"sonata required\" field for node/edges files.\n- the correctness of the edge to node population/ids bindings.\n- existence of the morphology files for the nodes.\n\nThis functionality is provided by either the cli function:\n\n.. code-block:: shell\n\n    bluepysnap validate-circuit my/circuit/path/circuit_config.json\n\n\nOr a python free function:\n\n.. code-block:: python3\n\n    from bluepysnap.circuit_validation import validate\n    errors = validate(\"my/circuit/path/circuit_config.json\")\n\n\nSimulation Validation\n~~~~~~~~~~~~~~~~~~~~~\n\nSimilarly to circuit validation, Blue Brain SNAP also provides a SONATA simulation validator for verifying simulation configs.\n\nCurrently, the validator verifies that:\n\n- all the mandatory fields are present in the config file\n- all the properties in the `simulation config specification <https://sonata-extension.readthedocs.io/en/latest/sonata_simulation.html>`__ have correct data types and accepted values\n- paths specified in the config exist\n- node sets specified in the config exist\n- input spike file's node IDs are found in the ``source`` node set\n- electrodes file's node IDs are found in the simulation's ``node_set`` (if set) or in non-virtual populations\n- neurodamus helpers and variables exist (requires ``neurodamus`` to be available in the environment)\n\nThis functionality is provided by either the cli function:\n\n.. code-block:: shell\n\n    bluepysnap validate-simulation my/circuit/path/simulation_config.json\n\n\nOr a python free function:\n\n.. code-block:: python3\n\n    from bluepysnap.simulation_validation import validate\n    errors = validate(\"my/circuit/path/simulation_config.json\")\n\n\nAcknowledgements\n----------------\n\nThe development of this software was supported by funding to the Blue Brain Project, a research center of the \u00c9cole polytechnique f\u00e9d\u00e9rale de Lausanne (EPFL), from the Swiss government\u2019s ETH Board of the Swiss Federal Institutes of Technology.\n\nThis project/research has received funding from the European Union\u2019s Horizon 2020 Framework Programme for Research and Innovation under the Specific Grant Agreement No. 785907 (Human Brain Project SGA2).\n\nThe Blue Brain Project would like to thank `Dr Eilif Muller <https://github.com/markovg>`_, the author of the precursor to Blue Brain SNAP, for his invaluable insights and contributions\n\nLicense\n-------\n\nBlue Brain SNAP is licensed under the terms of the GNU Lesser General Public License version 3,\nunless noted otherwise, for example, external dependencies.\nRefer to `COPYING.LESSER <https://github.com/BlueBrain/snap/blob/master/COPYING.LESSER>`__ and\n`COPYING <https://github.com/BlueBrain/snap/blob/master/COPYING>`__ for details.\n\nCopyright (c) 2019-2022 Blue Brain Project/EPFL\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License version 3\nas published by the Free Software Foundation.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with this program.  If not, see <https://www.gnu.org/licenses/>.\n\n\n.. |build_status| image:: https://github.com/BlueBrain/snap/actions/workflows/run-tox.yml/badge.svg\n   :alt: Build Status\n\n.. |license| image:: https://img.shields.io/pypi/l/bluepysnap\n   :target: https://github.com/BlueBrain/snap/blob/master/COPYING.LESSER\n   :alt: License\n\n.. |coverage| image:: https://codecov.io/github/BlueBrain/snap/coverage.svg?branch=master\n   :target: https://codecov.io/github/BlueBrain/snap?branch=master\n   :alt: codecov.io\n\n.. |docs| image:: https://readthedocs.org/projects/bluebrainsnap/badge/?version=latest\n   :target: https://bluebrainsnap.readthedocs.io/\n   :alt: documentation status\n\n.. |DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.8026852.svg\n   :target: https://doi.org/10.5281/zenodo.8026852\n   :alt: DOI\n\n.. substitutions\n.. |banner| image:: doc/source/_images/BlueBrainSNAP.jpg\n.. |circuit| replace:: **Circuit**\n.. |simulation| replace:: **Simulation**\n",
    "bugtrack_url": null,
    "license": "LGPLv3",
    "summary": "Simulation and Neural network Analysis Productivity layer",
    "version": "3.0.0",
    "project_urls": {
        "Homepage": "https://github.com/BlueBrain/snap"
    },
    "split_keywords": [
        "sonata",
        "bluebrainproject"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8eb300ba2a41680a3548be01ee2cef56b1aaa98b96fd259dc5f97e1046832fcd",
                "md5": "6bbecae88fad52c8c4192b181888d339",
                "sha256": "da67c44fa9d1e56eff91bb8dd62e7c2a1a8ccd90ce33a8285874678906717c6f"
            },
            "downloads": -1,
            "filename": "bluepysnap-3.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "6bbecae88fad52c8c4192b181888d339",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 967724,
            "upload_time": "2024-01-31T13:38:38",
            "upload_time_iso_8601": "2024-01-31T13:38:38.639679Z",
            "url": "https://files.pythonhosted.org/packages/8e/b3/00ba2a41680a3548be01ee2cef56b1aaa98b96fd259dc5f97e1046832fcd/bluepysnap-3.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-31 13:38:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "BlueBrain",
    "github_project": "snap",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "bluepysnap"
}
        
Elapsed time: 0.20403s