Command line interface
usage: snakedwi [-h]
[--participant_label PARTICIPANT_LABEL [PARTICIPANT_LABEL ...]]
[--exclude_participant_label EXCLUDE_PARTICIPANT_LABEL [EXCLUDE_PARTICIPANT_LABEL ...]]
[--output-spaces {T1w,dwi} [{T1w,dwi} ...]]
[--skip-denoise SKIP_DENOISE] [--derivatives]
[--masking-method [{b0_BET,b0_SyN,b0_synthstrip}]]
[--b0-bet-frac B0_BET_FRAC]
[--gradcorrect_coeffs GRADCORRECT_COEFFS]
[--sdc_method {optimal,topup,sdcflow,synthsr,synb0,none}]
[--sdc_method_alternate {sdcflow,synthsr,synb0}]
[--use_eddy_s2v] [--use_eddy_gpu] [--skip_eddy_quad]
[--slspec-txt SLSPEC_TXT]
[--default-phase-encoding-direction {i,i-,j,j-,k,k-}]
[--gradcorrect-skip-t1w] [--use_bedpost] [--use-bedpost-gpu]
[--rigid-dwi-t1-init [{identity,image-centers}]]
[--rigid_dwi_t1_iters RIGID_DWI_T1_ITERS]
[--fs-license FS_LICENSE] [--version]
[--filter-dwi ENTITY[:METHOD][=VALUE] [ENTITY[:METHOD][=VALUE]
...]] [--filter-T1w ENTITY[:METHOD][=VALUE]
[ENTITY[:METHOD][=VALUE] ...]]
[--wildcards-dwi WILDCARD [WILDCARD ...]]
[--wildcards-T1w WILDCARD [WILDCARD ...]] [--path-dwi PATH]
[--path-T1w PATH] [--pybidsdb-dir PATH] [--pybidsdb-reset]
[--help-snakemake] [--force-output]
bids_dir output_dir {participant}
Positional Arguments
- bids_dir
The directory with the input dataset formatted according to the BIDS standard.
- output_dir
The directory where the output files should be stored. If you are running group level analysis this folder should be prepopulated with the results of the participant level analysis.
- analysis_level
Possible choices: participant
Level of the analysis that will be performed.
Named Arguments
- --participant_label, --participant-label
The label(s) of the participant(s) that should be analyzed. The label corresponds to sub-<participant_label> from the BIDS spec (so it does not include “sub-“). If this parameter is not provided all subjects should be analyzed. Multiple participants can be specified with a space separated list.
- --exclude_participant_label, --exclude-participant-label
The label(s) of the participant(s) that should be excluded. The label corresponds to sub-<participant_label> from the BIDS spec (so it does not include “sub-“). If this parameter is not provided all subjects should be analyzed. Multiple participants can be specified with a space separated list.
- --output-spaces, --output_spaces
Possible choices: T1w, dwi
Output space(s) for the final preprocessed DWI data. Options are “T1w” (registered to T1w anatomical image) and “dwi” (native DWI space). Multiple spaces can be specified. If only “dwi” is selected, T1w images will not be required or processed. (default: [‘T1w’])
Default:
['T1w']- --skip-denoise, --skip_denoise
Skip the denoising step of the workflow. By default, denoising is performed if input diffusion data was acquired with at least 30 directions. (default: None)
- --derivatives
Default:
False- --masking-method, --masking_method
Possible choices: b0_BET, b0_SyN, b0_synthstrip
Brain masking method to use for b0 (default: ‘b0_synthstrip’)
Default:
'b0_synthstrip'- --b0-bet-frac, --b0_bet_frac
BET fractional intensity threshold for b0 masking (default: 0.5)
Default:
0.5- --gradcorrect_coeffs, --gradcorrect-coeffs
Path to file containing scanner specific gradient correction coefficients. Use this to enable gradient non-linearity correction. (default: None)
- --sdc_method, --sdc-method
Possible choices: optimal, topup, sdcflow, synthsr, synb0, none
Set the susceptibility distortion correction (SDC) method to be used. By default, the optimal correction method is chosen based on the data available (“topup” if 2+ phase encoding directions or “synthsr” if single phase encoding direction). To skip SDC, set method to “none”. (default: ‘optimal’)
Default:
'optimal'- --sdc_method_alternate, --sdc-method-alternate
Possible choices: sdcflow, synthsr, synb0
Set alternate method to be used for single phase encoding SDC when “–sdc_method” is set to “optimal”, otherwise this flag is ignored. (default: ‘synthsr’)
Default:
'synthsr'- --use_eddy_s2v, --use-eddy-s2v
Enable slice-to-volume correction in Eddy. Your dwi json must either include SliceTiming information, or you must specify it with the –slspec-txt flag. If any subjects do not have this information, they will be run without slice-to-volume enabled. You must also use the –use_eddy_gpu option. (default: False)
Default:
False- --use_eddy_gpu, --use-eddy-gpu
Use GPU-based version of eddy (must set container path in config)
Default:
False- --skip_eddy_quad, --skip-eddy-quad
Disables eddy_quad QC report (default: False)
Default:
False- --slspec-txt, --slspec_txt
Path to custom slspec txt file for use with eddy. Must use this if SliceTiming does not exist in the JSON (default: False)
Default:
False- --default-phase-encoding-direction, --default_phase_encoding_direction
Possible choices: i, i-, j, j-, k, k-
Sets the PhaseEncodingDirection to use for dwi acquisitions where it is not specified in the JSON file. By default, none will be assumed, and the workflow will fail for subjects where this JSON tag is missing (default: ‘’)
Default:
''- --gradcorrect-skip-t1w, --gradcorrect_skip_t1w
Default:
False- --use_bedpost, --use-bedpost
Enable bedpost (disabled by default)
Default:
True- --use-bedpost-gpu, --use_bedpost_gpu
Use GPU-based version of bedpost (must set container path in config)
Default:
False- --rigid-dwi-t1-init, --rigid_dwi_t1_init
Possible choices: identity, image-centers
Type of initialization to use for dwi to t1 rigid registration. (default: ‘identity’)
Default:
'identity'- --rigid_dwi_t1_iters, --rigid-dwi-t1-iters
Number of iterations to use at each multi-resolution stage for dwi to t1 rigid registration. (default: ‘50x50’)
Default:
'50x50'- --fs-license, --fs_license
Path to the Freesurfer license file (needed for synb0 SDC method)
Default:
False- --version
Print the version of snakedwi
- --pybidsdb-dir, --pybidsdb_dir
Optional path to directory of SQLite databasefile for PyBIDS. If directory is passed and folder exists, indexing is skipped. If pybidsdb_reset is called, indexing will persist
- --pybidsdb-reset, --pybidsdb_reset
Reindex existing PyBIDS SQLite database
Default:
False- --help-snakemake, --help_snakemake
Options to Snakemake can also be passed directly at the command-line, use this to print Snakemake usage
- --force-output, --force_output
Force output in a new directory that already has contents
Default:
False
BIDS FILTERS
Update filters for input components. Each filter can be specified as a ENTITY=VALUE pair to select an value directly. To use regex filtering, ENTITY:match=REGEX or ENTITY:search=REGEX can be used for re.match() or re.search() respectively. Regex can also be used to select multiple values, e.g. ‘session:match=01|02’. ENTITY:required and ENTITY:none can be used to require or prohibit presence of an entity in selected paths, respectively. ENTITY:optional can be used to remove a filter.
- --filter-dwi, --filter_dwi
(default: suffix=dwi extension=.nii.gz scope=raw invalid_filters=allow datatype=dwi)
- --filter-T1w, --filter_T1w
(default: suffix=T1w extension=.nii.gz datatype=anat invalid_filters=allow)
INPUT WILDCARDS
Provide entities to be used as wildcards.
- --wildcards-dwi, --wildcards_dwi
(default: subject session acquisition run direction)
- --wildcards-T1w, --wildcards_T1w
(default: subject session acquisition run)
PATH OVERRIDE
Options for overriding BIDS by specifying absolute paths that include wildcards, e.g.: /path/to/my_data/{subject}/t1.nii.gz
- --path-dwi, --path_dwi
- --path-T1w, --path_T1w