Skip to main content

BrainSpace

BrainSpace is a lightweight cross-platform toolbox primarily intended for macroscale gradient mapping and analysis of neuroimaging and connectome level data. The current version of BrainSpace is available in Python and MATLAB, programming languages widely used by the neuroimaging and network neuroscience communities. The toolbox also contains several maps that allow for exploratory analysis of gradient correspondence with other brain-derived features, together with tools to generate spatial null models.

For installation instructions, examples and documentation of BrainSpace see our documentation.

Display-independent surface reports

BrainSpace can export browser-readable HTML surface reports without opening a VTK render window. This is useful on remote servers, CI runners, notebooks, and containers where interactive VTK rendering is unavailable.

Watch the BrainSpace threemica bridge preview video. The preview is generated from BrainSpace’s bundled Conte69/fsLR-32k reference surfaces and maps; it does not contain participant data.

The native BrainSpace HTML writer keeps the dependency surface small:

from brainspace.plotting import write_surface_report

report = write_surface_report(
    surfaces={"lh": surf_lh, "rh": surf_rh},
    arrays={"Gradient 1": gradient_1},
    filename="surface_report.html",
    title="BrainSpace surface report",
)

The optional threemica bridge preserves Zhengchen Cai’s original viewer and converts BrainSpace surfaces/maps into the BIDS-style derivative layout that threemica reads:

from brainspace.plotting import write_brainspace_threemica_report

reports = write_brainspace_threemica_report(
    "brainspace_threemica_report",
    maps=["thickness", "fc_gradient1"],
    custom_maps={
        "aligned_gradient": {
            "values": aligned_gradients,
            "label": "Aligned gradient",
            "unit": "score",
            "cmap": "diverging",
        },
    },
)

Happy gradient analysis!

License

The BrainSpace source code is available under the BSD (3-Clause) license.

Support

If you have problems installing the software or questions about usage and documentation, or something else related to BrainSpace, you can post to the Issues section of our repository.

Paper

If you consider using BrainSpace, please cite our manuscript: Vos de Wael R, Benkarim O, Paquola C, Lariviere S, Royer J, Tavakol S, Xu T, Hong S, Langs G, Valk S, Misic B, Milham M, Margulies D, Smallwood J, Bernhardt B (2020). BrainSpace: a toolbox for the analysis of macroscale gradients in neuroimaging and connectomics datasets. Commun Biol 3, 103.

Core development team

  • Reinder Vos de Wael, MICA Lab - Montreal Neurological Institute

  • Oualid Benkarim, MICA Lab - Montreal Neurological Institute

  • Boris Bernhardt, MICA Lab - Montreal Neurological Institute

Metadata

Release files for brainspace 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for brainspace 0.3.0
File Size Uploaded Provenance
brainspace-0.3.0.tar.gz 60.5 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for brainspace 0.3.0
File Interpreter ABI Platform
brainspace-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 121.2 MB

Release files / brainspace-0.3.0.tar.gz

Download URL brainspace-0.3.0.tar.gz
Size 60.5 MB
Tags Source
SHA-256 checksum
How to use checksums
75f2159bacd09bbd687382653562d62be1ef8e84e2989eb4b293d4a866f2460e
BLAKE2b-256 checksum
How to use checksums
97272c92b79337662e16e23ad7c7bba3f46f894cbdbf5c09289c61853f77d737
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / brainspace-0.3.0-py3-none-any.whl

Download URL brainspace-0.3.0-py3-none-any.whl
Size 60.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
aec3854a9ad2ed8f05ee4da04943307833135320c990688ba7f16def1ce0132c
BLAKE2b-256 checksum
How to use checksums
c222af1f49ce443949b60b4034e13c7a5365a3494badd91548dc854057ca6c7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for brainspace 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page