Usage notes

API

Command line API

bidspm is a SPM base BIDS app

Usage: bidspm [-h] [-v] --action
              {preprocess,smooth,default_model,create_roi,stats,contrasts,results}
              [--verbosity {0,1,2}] [--task TASK [TASK ...]]
              [--space SPACE [SPACE ...]]
              [--ignore {fieldmaps,slicetiming,unwarp,qa,contrasts,transformations,dataset} [{fieldmaps,slicetiming,unwarp,qa,contrasts,transformations,dataset} ...]]
              [--participant_label PARTICIPANT_LABEL [PARTICIPANT_LABEL ...]]
              [--boilerplate_only] [--dry_run]
              [--bids_filter_file BIDS_FILTER_FILE] [--fwhm FWHM]
              [--options OPTIONS] [--skip_validation] [--roi_dir ROI_DIR]
              [--roi_name ROI_NAME [ROI_NAME ...]] [--anat_only]
              [--dummy_scans DUMMY_SCANS]
              [--roi_atlas {neuromorphometrics,wang,anatomy_toobox,visfatlas,hcpex}]
              [--model_file MODEL_FILE] [--preproc_dir PREPROC_DIR]
              [--keep_residuals] [--concatenate] [--design_only] [--roi_based]
              bids_dir output_dir {subject,dataset}

Positional Arguments

bids_dir

Fullpath to the directory with the input dataset formatted according to the BIDS standard.

output_dir

Fullpath to the directory where the output files will be stored.

analysis_level

Possible choices: subject, dataset

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

Named Arguments

-v, --version

show program’s version number and exit

--action

Possible choices: preprocess, smooth, default_model, create_roi, stats, contrasts, results

Action to perform.

--verbosity

Possible choices: 0, 1, 2

Verbosity level.

Default: 2

--task

Tasks of the input data.

--space

Space of the input data.

Default: [‘IXI549Space’]

--ignore

Possible choices: fieldmaps, slicetiming, unwarp, qa, contrasts, transformations, dataset

To specify steps to skip.

--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. Can be a regular expression. Example: '01', '03', '08'.

--boilerplate_only

When set to true this will only generate figures describing the raw data, the methods section boilerplate.

Default: False

--dry_run

When set to true this will generate and save the SPM batches, but not actually run them.

Default: False

--bids_filter_file

Fullpath to a JSON file describing custom BIDS input filters.

--fwhm

The full width at half maximum of the gaussian kernel to apply to the preprocessed data or to use as inputs for the statistical analysis.

Default: 6.0

--options

Path to JSON file containing bidspm options.

--skip_validation

To skip BIDS dataset and BIDS stats model validation.

Default: False

--roi_dir

Fullpath to the directory with the regions of interest.

--roi_name

Name of the roi to create. If the ROI does not exist in the atlas, the list of available ROI will be returned in the error message.

preprocess only arguments

--anat_only

If preprocessing should be done only on anatomical data.

Default: False

--dummy_scans

Number of dummy scans to remove.

Default: 0

create roi only arguments

--roi_atlas

Possible choices: neuromorphometrics, wang, anatomy_toobox, visfatlas, hcpex

Atlas to create the regions of interest from.

Default: “neuromorphometrics”

stats only arguments

--model_file

Fullpath to BIDS stats model.

--preproc_dir

Fullpath to the directory with the preprocessed data.

--keep_residuals

Keep GLM residuals.

Default: False

--concatenate

To create 4D image of all the beta and contrast images of the conditions of interest included in the run level design matrix.

Default: False

--design_only

To only specify the GLM without estimating it.

Default: False

--roi_based

To run stats only in regions of interests.

Default: False