Usage

Execution and the BIDS format

The dmriprep workflow takes as principal input the path of the dataset that is to be processed. The input dataset is required to be in valid BIDS format, and it must include at least one T1w structural image and a dwi series.

bids
└── sub-01
  ├── anat
  │   └── sub-01_T1w.json
  │   └── sub-01_T1w.nii.gz
  ├── dwi
  │   ├── sub-01_dwi.bval
  │   ├── sub-01_dwi.bvec
  │   ├── sub-01_dwi.json
  │   └── sub-01_dwi.nii.gz
  └── fmap
      ├── sub-01_acq-dwi_dir-AP_epi.json
      ├── sub-01_acq-dwi_dir-AP_epi.nii.gz
      ├── sub-01_acq-dwi_dir-PA_epi.json
      └── sub-01_acq-dwi_dir-PA_epi.nii.gz

We highly recommend that you validate your dataset with the free, online BIDS Validator.

The exact command to run dmriprep depends on the Installation method. The common parts of the command follow the BIDS-Apps definition.

Example:

dmriprep data/bids out/ participant -w work/

Command-Line Arguments

dmriprep

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 a group level analysis, this folder should be prepopulated with the results of the participant level analysis.

ANALYSIS_LEVEL: Level of the analysis that will be performed. Multiple participant level analyses can be run independently (in parallel).

dmriprep [OPTIONS] BIDS_DIR OUTPUT_DIR [[participant|group]]

Options

--skip_bids_validation

Assume the input dataset is BIDS compliant and skip the validation

--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 (the “sub-” prefix can be removed). If this parameter is not provided all subjects will be analyzed. Multiple participants can be specified with a space delimited list.

--session_label <session_label>

The label(s) of session(s) that should be analyzed. the label corresponds to ses-<session_label from the BIDS spec (the “ses-” prefix can be removed). If this parameter is not provided, all sessions will be analyzed. Multiple sessions can be specified with a space delimited list.

--concat_dwis <concat_dwis>

A space delimited list of acq-<label>

--b0_thresh <b0_thresh>

Threshold for b0 value [default: 5]

--output_resolution <output_resolution>

The isotropic voxel size in mm the data will be resampled to before eddy.

--bet_dwi <bet_dwi>

Fractional intensity threshold for BET on the DWI. A higher value will be more strict; it will cut off more around what it analyzes the brain to be. [default: 0.3]

--bet_mag <bet_mag>

Fractional intensity threshold for BET on the magnitude. A higher value will be more strict; it will cut off more around what it analyzes the brain to be. [default: 0.3]

--acqp_file <acqp_file>

If you want to pass in an acqp file for topup/eddy instead ofgenerating it from the json by default.

--slspec_file <slspec_file>

If you want to pass in a slspec file for eddy.

--nthreads, --n_cpus <nthreads>

Maximum number of threads across all processes [default: 1]

--omp_nthreads <omp_nthreads>

Maximum number of threads per process [default: 1]

-i, --ignore <ignore>

Specify which node(s) to skip during the preprocessing of the dwi.

Options

denoising|unringing|fieldmaps

--use_ants

Use ANTs SDC

--use_brainsuite

Use BrainSuite SDC

-w, --work_dir <work_dir>

working directory

--synb0_dir <synb0_dir>

If you want to use Synb0-DISCO for preprocessing.

--write_graph

Write out nipype workflow graph.

Arguments

BIDS_DIR

Required argument

OUTPUT_DIR

Required argument

ANALYSIS_LEVEL

Optional argument

Debugging

Logs and crash files are output into the <output dir>/dmriprep/sub-<participant_label>/log directory. Information on how to customize and understand these files can be found on the nipype errors and crashes and nipype debugging pages.