BIDS-App · spinal-cord fMRI

Reproducible, QC-first preprocessing for the spinal cord.

A fully automated, containerised BIDS-App for human spinal-cord fMRI: a BIDS dataset in, GLM-ready derivatives and per-step quality control out.

spineprep /data/bids /out participant

Container recipe (Docker / Apptainer). Literature-grounded defaults: SCT · FSL · PAM50.

WORKS WITHSCTFSLANTsPAM50
SpinePrep S2.2 reportlet: sagittal spinal cord with TotalSpineSeg vertebrae and disc labels
sub-01 · S2.2 TotalSpineSegPASS
8
datasets
~360
functional runs
5
task & rest types
~250
subjects
A per-vertebral-level QC reference for cord fMRI, with fully reconciled QC attrition and a test–retest reliability characterisation. Validation is ongoing.
Why SpinePrep

Established brain-fMRI conventions, carefully adapted to the cord.

SpinePrep follows the design of the field's working pipelines (fMRIPrep, MRIQC, SCT) and applies the recommended cord-fMRI recipe to a 5–7 mm structure that moves, distorts, and spans vertebral levels. The scientific methods are those tools'; SpinePrep's contribution is the automation, reproducibility, and standardised QC around them.

BIDS-native & automatic

One command. BIDS in, BIDS-Derivatives out — no manual masking, no bespoke lab scripts.

Built for the cord

Cord-focused segmentation, motion, distortion and PAM50 normalization — not adapted from brain defaults.

QC you can read

Every step emits one step-local truth metric and one diagnostic reportlet. You see what failed and why.

Reproducible by design

Deterministic runs, versioned policy, and a provenance receipt of tool, policy and git SHAs — a re-run reproduces the same numbers under the same tool versions.

The chain · S1 → S10

Ten steps. One truth metric and one reportlet each.

S1
Input verify
BIDS + acquisition envelope
S2
Anat cordref
cord seg · TotalSpineSeg
S3
Func ref + crop
cord-focused FOV
S4
Motion
cord-aware moco · FD
S5
Distortion
topup / PNM
S6
Func → anat
cord-seg-driven reg
S7
PAM50
template normalization
S8
Confounds
physio · aCompCor
S9
Derivatives
native + PAM50 · tSNR
S10
QC release
aggregate + receipt
Scope & honest limits

What SpinePrep is — and what it isn't.

It is

A fully automated, reproducible, QC-first pipeline that packages the field's recommended cord-fMRI recipe (SCT, FSL, PAM50) into one BIDS-App command, with a readable report at every step.

It isn't

A new segmentation or registration algorithm, or a replacement for the tools it builds on. The science is theirs; SpinePrep is the engineering that makes it turnkey and reproducible.

Tested on

Cervical spinal-cord EPI-BOLD at 3 T, across eight public and internal datasets. It runs outside that envelope but warns you, and the report shows the levels actually covered.

Known limits

Methods validation is ongoing; cord-fMRI reliability is inherently modest; and it ships as a build recipe, not a prebuilt image. Treat results outside the tested envelope with care.

Get started

Build it, point it at your BIDS data, read the report.

SpinePrep ships as a build recipe — by choice — so its Apache-2.0 distribution stays free of FSL's non-commercial terms. You build once and obtain FSL under its own licence.

Container RECOMMENDED

docker build -f Dockerfile.spineprep -t spineprep:1.0.0 .
docker run -v /bids:/bids:ro -v /out:/out \
  spineprep:1.0.0 /bids /out participant

Docker locally, or convert to Apptainer for HPC. Everything (SCT, FSL, ANTs, PAM50) is inside.

Python layer ADVANCED

pip install spineprep
spineprep /bids /out participant

The orchestration layer installs from PyPI; the full pipeline still needs SCT, FSL and ANTs on your PATH.

Cite

An open BIDS-App for spinal-cord fMRI.

If SpinePrep is part of your analysis, please cite it — and the tools it stands on (SCT, FSL, ANTs, PAM50). A per-release archival DOI is minted via Zenodo.

Apache-2.0CITATION.cffDOI: pendingNeuroStars: spineprep
@software{spineprep,
  title   = {SpinePrep: a containerised BIDS-App
             for spinal-cord fMRI preprocessing},
  author  = {Sharifi, Kiomars},
  year    = {2026},
  version = {1.0.0},
  url     = {https://spineprep.com}
}