Skip to content

CLI

Command-line interface documentation for Lacuna.

Overview

Lacuna provides a subcommand-based CLI for running lesion network mapping analyses, managing connectomes, and organizing data using BIDS-style naming conventions.

lacuna <command> [options]

Commands

  • Tutorial


    Set up the bundled tutorial data for learning Lacuna.

  • Bidsify


    Convert a directory of NIfTI mask files to BIDS format.

  • Fetch


    Download normative connectomes and other assets to the local cache.

  • Prepare


    Precompute connectome-derived data products — currently prepare afnm, which builds the parcel-level connectivity matrix that accelerated FNM consumes.

  • Run


    Run lesion analyses (focal damage, functional, accelerated functional, and structural network mapping).

  • Check


    Validate input masks and check output completeness.

  • Collect


    Aggregate subject-level parcelstats into group-level tables.

  • Info


    Display available resources (atlases, connectomes).

Quick Usage

# Setup tutorial data
lacuna tutorial ./my_tutorial

# Fetch a connectome
lacuna fetch gsp1000 --api-key $DATAVERSE_API_KEY

# Run focal damage analysis
lacuna run fd /bids /output --parcel-atlases schaefer2018parcels100networks7

# Run functional network mapping
lacuna run fnm /bids /output --connectome-path /path/to/gsp1000_batches

# Aggregate results across subjects
lacuna collect /output

# Check for missing outputs after a batch run
lacuna check fd /bids /output

# List available atlases
lacuna info atlases

Getting Help

# General help
lacuna --help

# Command-specific help
lacuna run --help
lacuna run fnm --help
lacuna fetch --help