Skip to main content

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:

Examples

More examples on how to use brain-indexer are available in the examples folder:

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


Download files

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

Source Distribution

brain_indexer-3.0.0.tar.gz (8.9 MB view hashes)

Uploaded Source

Built Distributions

brain_indexer-3.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (787.3 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

brain_indexer-3.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (790.6 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

brain_indexer-3.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (790.6 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

brain_indexer-3.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (791.9 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

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