An open, portable packaging format for sharing neuroimaging and life-sciences research datasets.
Squirrel packages a research dataset โ imaging data, behavioral assessments, pipelines, and metadata โ into a single self-describing archive file. The receiving end needs no prior knowledge of the dataset structure to read it.
Squirrel is designed for moving multi-modal datasets between institutions, archives, and analysis environments while preserving the relationships between subjects, studies, and data types.
What a squirrel package contains and how it handles multi-modal datasets.
Every squirrel package contains a manifest with complete metadata โ subjects, studies, series, modalities, and acquisition parameters โ so the data is interpretable without the source database.
MRI, EEG, eye-tracking, behavioral assessments, clinical data, and genetic data all live together in a single package, preserving the relationships between modalities.
Analysis pipelines and their outputs travel alongside the raw data, so collaborators receive processed results in full context โ not just raw files.
Squirrel is an open specification. Packages can be read and created independently of NiDB, making it viable as a long-term archival and interchange format.
Export any NiDB project directly to squirrel format. Import squirrel packages into any NiDB instance to restore the full dataset structure instantly.
Works alongside BIDS and NDA exports. Squirrel complements existing standards for cases where richer packaging is needed than those formats provide.
A squirrel package is a portable archive combining data, metadata, and context in one place.
Choose subjects, studies, or an entire project in NiDB to export.
NiDB bundles data and metadata into a single .sqrl
archive.
Share the file via any means โ email, cloud storage, physical media.
Load the package into any NiDB instance, or extract
specific objects.
Squirrel is NiDB's native transfer format. Export and import are built into the NiDB web interface and do not require command-line use.
The squirrel CLI lets you create, inspect,
modify, and validate packages without NiDB โ useful for
scripted workflows, HPC pipelines, and data-cleaning tasks.
| Command | Description |
|---|---|
dicom2squirrel |
Convert a DICOM directory into a squirrel package |
bids2squirrel |
Convert a BIDS directory into a squirrel package |
info |
Display information about a package or its contents |
modify |
Add, remove, update, or transform objects within a package |
extract |
Extract objects from a package to disk |
validate |
Check whether a package is valid and readable |
Convert an existing dataset into a squirrel package in one command. Choose your output data format and whether subject directories use original IDs or sequential numbers.
# DICOM โ squirrel (NIfTI 4D gzip, default)
squirrel dicom2squirrel /data/dicoms study.sqrl
# Anonymized DICOM output, quiet mode
squirrel dicom2squirrel /data/dicoms study.sqrl \
--dataformat anon -q
# BIDS โ squirrel
squirrel bids2squirrel /data/bids_study study.sqrl
Query any level of the hierarchy โ package, subject, study, series, pipeline, experiment, and more โ in list or CSV format. Run validate before sharing a package.
# Package-level summary
squirrel info study.sqrl
# All subjects, full detail, CSV output
squirrel info study.sqrl --object subject \
--dataset full --format csv
# Series for one subject's first study
squirrel info study.sqrl --object series \
--subjectid S1234 --studynum 1
# Validate package integrity
squirrel validate study.sqrl
Add or remove objects, update metadata, strip PHI, split by modality, and renumber subjects โ all without unpacking the archive.
# Remove protected health information
squirrel modify study.sqrl --operation removephi
# Renumber subjects sequentially (sub0001โฆ)
squirrel modify study.sqrl --operation renumber \
--digits 4 --prefix sub
# Split into one package per imaging modality
squirrel modify study.sqrl --operation splitbymodality
# Update subject demographics
squirrel modify study.sqrl --operation update \
--object subject --objectid S1234 \
--objectdata 'Sex=M&DateOfBirth=1990-01-15'
Pull any object โ a subject, a specific series, an experiment, or a pipeline โ out of a package to a directory on disk.
# Extract a full subject
squirrel extract study.sqrl \
--object subject --objectid S1234 \
--outdir /tmp/out
# Extract one imaging series
squirrel extract study.sqrl \
--object series --objectid 1 \
--subjectid S1234 --studynum 1 \
--outdir /tmp/out
# Extract an experiment
squirrel extract study.sqrl \
--object experiment \
--objectid MyExperiment --outdir /tmp/out