NiSpace: Neuroimaging Spatial Colocalization Environment

Hello NeuroStars Community!

With this post, I’d like to introduce a software project I am working on: NiSpace, short for “Neuroimaging Spatial Colocalization Environment”.

NiSpace is a Python-API-based tool for running all kinds of spatial correlation (“colocalization”) analysis workflows. Although the term “spatial colocalization” might not sound familiar, the idea and application of such methods are quite common since over a decade already. Popular examples are: neuroimaging gene-set enrichment analyses using Allen Brain Atlas mRNA expression data, the neurosynth decoder, the JuSpace toolbox, and, most recently, neuromaps. What all these have in common is the idea that the correlation of two or more brain maps across space – thought to quantify similarity of spatial patterns – conveys information that can be used for interpretation or biomarker development.

NiSpace aims to provide the most comprehensive suit of spatial colocalization methods to date, embedded in workflows bridging from data preparation, over analysis and null model-based significance testing, to visualization. My core goal is to identify and implement best practices and easily reproducible workflows in a rather new neuroimaging field that just recently gained traction; due to increasing data availability and some high-profile publications.

A few key points and features:

  • One-command workflow functions: user only needs to input one or more maps of their interest.
  • Adjustable pipeline-like framework for experienced users.
  • Designed to work with many study designs: single map-to-map colocalization (like neuromaps), group comparisons (like JuSpace), set-based analyses (like many mRNA expression-focused tools).
  • Does not aim to replace neuromaps but uses neuromaps under the hood for space transformation, null map generation, and reference data fetching.
  • Works with MNI, fsaverage, and fsLR spaces.
  • Focuses on parcellated data with several included parcellations.
  • Provides ready-to-use reference datasets that are continuously updated and extended: PET maps, Allen Brain Atlas gene expression data (both abagen and magicc for data extraction), all neurosynth term maps, …
  • Provides neuromaps PET maps with detailed metadata and co-registered into MNI152NLin6Asym and MNI152NLin2009cAsym spaces.
  • Implements several uni- and multivariate colocalization methods.
  • Implements a flexible null map generation and permutation framework, e.g., if you are interested in whether a set of PET maps explains the difference map between two groups, you can choose to generate null PET maps, permute groups, or randomly sample sets of PET maps (or a combination of those).
  • Advances neuromaps’ parcel-level null map functionality by providing options to generate null maps by parcel subsets (hemispheres, cortex vs. subcortex) and multiple options to ensure (matched) bilateral symmetry.
  • replaces two tools I have been working on before: JuSpyce and ABAnnotate.
  • planned features: support for voxel-wise analyses, graphical and command-line interfaces, and much more.

I am interested, where do I find this?

NiSpace is under development. You can check it out at:
Github: GitHub - LeonDLotter/NiSpace: Neuroimaging Spatial Colocalization Environment (under development).
Docs: https://nispace.readthedocs.io/
Install: pip install git+https://github.com/LeonDLotter/NiSpace.git@dev

I have a question about NiSpace and how to use it:

Feel free to ask here using the tag nispace, so that others can benefit from our exchange.

I think I found a bug, or I would like a new feature or dataset:

Raise a new issue. I will see what I can do!

This sounds very cool, I would like to contribute!

Write me via leondlotter [at] gmail [dot] com for direct contact, or feel free to proactively go the GitHub route. :slight_smile:

3 Likes