Skip to content
By Elizabeth Horwath · Last updated 2026-03-17

Skullstripping

The skullstripping pipeline provides several options (MASS and HD-BET) to remove skull and non-brain matter from brain images.

Usage

These examples will run the pipeline in batch mode on the cluster. To run individually or locally/with a container, set --mode individual, or -c local/-c singularity/-c docker, respectively.

This pipeline can be run with or without a container. For containerized usage, Singularity can be used on a cluster or Docker locally. This pipeline can be run in individual or batch mode, meaning you can specify a certain subject and session or run the pipeline for all subjects in the folder, respectively.

The pipeline allows for two skullstripping options: mass (default) and hdbet. To use hdbet, set -t "hdbet".


Required flags:

-m or --mainpath: path to parent data folder
-f or --file: T1 sequence name
--toolpath: path to pipeline folder

Other flags:

-p or --participant: participant ID (only needed for individual mode)
--ses: session ID (only needed for individual mode)
-t or --type: skullstripping method - mass, hdbet. Default is mass
-n or --number: number of templates. Default is 20
--mode: run pipeline individually or batch. Default is batch
-c or --container: which container to use: singularity, docker, local, cluster. Default is cluster
--sinpath: path to singularity image (only needed if using singularity container - don't need to specify if using takim cluster)
--dockerpath: path to docker image (only needed if using docker container)
-h or --help: show help message

bash /path/to/PennSIVE_neuro_pip/pipelines/skullstripping/code/bash/skullstripping.sh -m /path/to/project -f "*MPRAGE*.nii.gz" --toolpath /path/to/PennSIVE_neuro_pip