Lacuna¶
A Python package for advanced brain lesion analysis.
Lacuna bridges the gap between individual lesion masks and normative brain data. It provides a reproducible workflow for lesion network mapping and regional damage quantification, using BIDS-style naming conventions for input and output organization.
This project is under active development and has not yet been fully validated. Use with caution.
Analyses¶
-
Functional network mapping
Map the functional brain circuitry linked to a lesion using resting-state functional connectivity.
-
Structural network mapping
Map the structural disconnectivity of a lesion using normative tractogram data.
-
Regional damage
Quantify regional damage by measuring lesion overlap with standard brain parcellation atlases.
Install¶
Usage¶
# Create a tutorial dataset with synthetic lesion masks
lacuna tutorial my_dataset
# Fetch the HCP1065 tractogram
lacuna fetch hcp1065 --output-dir connectomes
# Run structural network mapping
lacuna run snm my_dataset output \
--connectome-path connectomes/hcp1065.tck \
--mask-space MNI152NLin6Asym
For the full walkthrough, see the Getting started tutorial. Note that Lacuna expects lesion masks to be in MNI space.
Documentation¶
-
Step-by-step Jupyter notebook tutorials covering each analysis type.
-
Practical guides for specific tasks beyond core analysis workflows.
-
CLI commands, options, and auto-generated API documentation.
-
Background knowledge for using the package.