Command Reference
Complete reference for all skullduggery command-line options.
Syntax
skullduggery <BIDS_PATH> [OPTIONS]
Required Arguments
Argument |
Description |
|---|---|
|
Path to the root directory of your BIDS dataset |
Optional Arguments
Participant & Session Filtering
Flag |
Type |
Default |
Description |
|---|---|---|---|
|
space-separated list |
ALL |
Specific participant IDs to process (e.g., |
|
space-separated list |
ALL |
Specific session IDs to process (e.g., |
Template & Registration
Flag |
Type |
Default |
Description |
|---|---|---|---|
|
string |
|
TemplateFlow template for registration. Use pediatric templates like |
|
string |
none |
Default age when participants.tsv lacks age data. Format: |
Image Selection
Flag |
Type |
Default |
Description |
|---|---|---|---|
|
JSON or file path |
|
BIDS filters to select the reference series for registration. Can be inline JSON or path to JSON file. |
|
JSON or file path |
|
BIDS filters to select all images to deface. Can be inline JSON or path to JSON file. |
|
flag |
false |
Select only series marked as sensitive in git-annex metadata. |
Output Options
Flag |
Type |
Default |
Description |
|---|---|---|---|
|
flag |
false |
Save defacing masks for all defaced series. Default saves masks only for reference series. |
|
directory path |
none |
Write HTML reports with defacing visualizations to this directory. |
Processing Options
Flag |
Type |
Default |
Description |
|---|---|---|---|
|
flag |
false |
Force pyBIDS to re-scan the dataset instead of using cached metadata. Use if you recently added files. |
|
flag |
false |
Update git-annex metadata with defacing information and commit changes. Requires DataLad installation. |
Debugging
Flag |
Type |
Default |
Description |
|---|---|---|---|
|
string |
|
Set logging level. Options: |
Filter Format
JSON Format for BIDS Filters
Filters use pybids syntax. Common options:
By Suffix
{"suffix": "T1w"}
{"suffix": ["T1w", "T2w"]}
By Datatype
{"datatype": "anat"}
By Extension
{"extension": ".nii.gz"}
By Custom Label
{"label": "value"}
Combined Filters
{
"suffix": "T1w",
"datatype": "anat",
"extension": ".nii.gz"
}
Inline vs File-based
Inline JSON:
skullduggery /path/to/dataset \
--other-bids-filters '{"suffix": "T1w"}'
From file:
skullduggery /path/to/dataset \
--other-bids-filters /path/to/filters.json
Age Format
When using --default-age, format is VALUE:UNIT:
Unit |
Examples |
|---|---|
|
|
|
|
|
|
|
|
Exit Codes
Code |
Meaning |
|---|---|
|
Success - all participants processed |
|
Failure - one or more errors occurred |
Examples
Basic
skullduggery /data/bids_dataset
With participant filtering
skullduggery /data/bids_dataset --participant-label 01 02 03
With reports
skullduggery /data/bids_dataset --report-dir ./reports
Full options
skullduggery /data/bids_dataset \
--participant-label 01 02 03 \
--session-label 01 \
--template MNI152NLin6Asym \
--save-all-masks \
--report-dir ./reports \
--debug debug
Environment Variables
Variable |
Effect |
|---|---|
|
When set to any truthy value, enables debug logging |
Example:
DEBUG=1 skullduggery /path/to/dataset
Tips
Use
--helpto see the full help messageParticipant/session labels don’t need the
sub-/ses-prefixJSON filters can be tested with pybids directly
Use
-f/--force-reindexif you’ve recently modified your dataset