A spatial index implementation for spheres, morphologies and synapses
Project description
brain-indexer
brain-indexer is a library for efficient spatial queries on large datasets (TBs
and more). It is currently based on boost::rtree
.
It provides a high level Python API for indexes of simple geometric shapes (boxes, spheres and cylinders) and the required functionalities to create indexes of synapses and morphologies.
Installation
From PyPI
A version of brain-indexer without processing on multiple nodes is available on PyPI and can easily be installed with:
pip install brain-indexer
From source
brain-indexer requires Boost with a minimum version of 1.79.0, but preferably 1.80.0 or
newer. If your system does not provide such a version, one can install a more recent one
into /opt/boost/
as follows:
wget -qO- https://boostorg.jfrog.io/artifactory/main/release/1.85.0/source/boost_1_85_0.tar.bz2 | tar xjf -
cd boost_1_85_0
./bootstrap.sh
./b2 --prefix=/opt/boost --with-serialization --with-filesystem --with-test install
When using a custom Boost installation like this, it is imperative to set the following environment variables to make sure that all libraries are found:
export SKBUILD_CMAKE_DEFINE="CMAKE_INSTALL_RPATH_USE_LINK_PATH=ON"
export CMAKE_PREFIX_PATH=/opt/boost
If multi-node processing via MPI is required, the following system dependencies have to be installed:
sudo apt-get install -y libopenmpi-dev
Then the installation of brain-indexer can proceed as usual, either with MPI support:
gh repo clone BlueBrain/brain-indexer
pip install "./brain-indexer[mpi]"
or without support:
gh repo clone BlueBrain/brain-indexer
pip install ./brain-indexer/
Where to start
We provide two Jupyter notebooks with a hands-on introduction to brain-indexer:
- A basic introduction in
basic_tutorial.ipynb
- More complex use-cases in
advanced_tutorial.ipynb
Examples
More examples on how to use brain-indexer are available in the examples
folder:
segment_index.py
: simple indexing and querying of a segment indexsynapses_index.py
: simple indexing and querying of a synapse indexsegment_index_sonata.py
: indexing and querying of a segment index using SONATA filessegment_multi_index_sonata.py
: indexing and querying of a segment multi-index using SONATA filessynapse_multi_index_sonata.py
: indexing and querying of a synapse multi-index using SONATA files
Also, the tests
folder contains some tests that double also as examples on how to use
brain-indexer.
Acknowledgment
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.
Copyright (c) 2019-2024 Blue Brain Project/EPFL
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
Built Distributions
Hashes for brain_indexer-3.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9cbdc2edcf7d4a3ca58bd73a055764c7c544d510209eedd32c77565d7aadf832 |
|
MD5 | 7641ab64a397f35125553b5f75522a2c |
|
BLAKE2b-256 | 3fd7de98902af5a723768ebdbee16dcd44301f6b5fff39846a0b0f911aaf674f |
Hashes for brain_indexer-3.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab9f42392aac4cca63010e452efa86b33109b671fd4599025f86146b32825d45 |
|
MD5 | d7ebb1b5c4084b1f2f2176cf239c9c69 |
|
BLAKE2b-256 | 771369fe7e6d9cfa4154abeb8a05a94ceb0343b000f8be317e96d62492ae3295 |
Hashes for brain_indexer-3.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ede485b9b04c542afa0de8bd9175140451747d0da58879a94b6230bd4f6c3baf |
|
MD5 | 9796d43bf5ceddfad5b69524786e7a7c |
|
BLAKE2b-256 | 82d59d42630f1e14f63b65a6921beeb3281838a9adae6285fe27955ffd304a91 |
Hashes for brain_indexer-3.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25cf75202b2e7a6be5c30049a2c43025985307753f3b33f7e661774c2daaf271 |
|
MD5 | 0fe8251c1efc6fd022de449f5e631229 |
|
BLAKE2b-256 | 77264dd9f1ae2a575a6337842ea82afa5671df1910856b25f32847d09ac12ea3 |