xcp_d.workflows.bold module

Workflows for post-processing the BOLD data.

xcp_d.workflows.bold.init_postprocess_nifti_wf(bold_file, head_radius, run_data, t1w_available, t2w_available, n_runs, exact_scans, name='bold_postprocess_wf')[source]

Organize the bold processing workflow.

Workflow Graph

(Source code)

Parameters:
  • bold_file (str) – bold file for post processing

  • run_data (dict)

  • t1w_available

  • t2w_available

  • n_runs – Number of runs being postprocessed by XCP-D. This is just used for the boilerplate, as this workflow only posprocesses one run.

  • exact_scans (list of int, optional) – If used, this parameter will produce correlation matrices limited to each requested amount of time. If there is more than the required amount of low-motion data, then volumes will be randomly selected to produce denoised outputs with the exact amounts of time requested. If there is less than the required amount of ‘good’ data, then the run will not be post-processed.

  • name (str, optional) – Name of the workflow. This is used for working directories and workflow graphs. Default is “nifti_postprocess_wf”.

Inputs:
  • bold_file – BOLD series NIfTI file

  • boldref (str) – Path to the BOLD reference file associated with the target BOLD run. This comes from the preprocessing derivatives. Loaded in this workflow.

  • bold_mask – bold_mask from fmriprep Loaded in this workflow.

  • custom_confounds_file (str or None) – Path to custom nuisance regressors.

  • template_to_anat_xfm (str) – Path to the MNI-to-T1w transform file. May be “identity”, for testing purposes. Fed from the subject workflow.

  • t1w – Preprocessed T1w image, warped to standard space. Fed from the subject workflow.

  • t2w – Preprocessed T2w image, warped to standard space. Fed from the subject workflow.

  • anat_brainmask – T1w brain mask, used for transforms in the QC report workflow. Fed from the subject workflow.

  • fmriprep_confounds_file (str) – Confounds TSV file from preprocessing derivatives.

  • fmriprep_confounds_json

  • dummy_scans (int or “auto”) – Number of volumes to remove from the beginning of each run. If set to ‘auto’, xcp_d will extract non-steady-state volume indices from the preprocessing derivatives’ confounds file.

Outputs:
  • name_source (str) – Path to the file that will be used as the source_file for derivatives. This is generally the preprocessed BOLD file. This file does not need to exist (e.g., in the case of a concatenated version of the filename).

  • preprocessed_bold (str) – The preprocessed BOLD file, after dummy scan removal.

  • filtered_motion (str) – Framewise displacement timeseries, potentially after bandstop or low-pass filtering. This is a TSV file with one column: ‘framewise_displacement’.

  • temporal_mask (str) – Temporal mask; all values above fd_thresh set to 1. This is a TSV file with one column: ‘framewise_displacement’.

  • fmriprep_confounds_file (str) – Confounds TSV file from preprocessing derivatives. After dummy scan removal.

  • denoised_interpolated_bold (str) – Path to the censored, denoised, interpolated, and filtered BOLD file. This file is the result of denoising the censored preprocessed BOLD data, followed by cubic spline interpolation and band-pass filtering.

    This output should not be used for analysis. It is primarily for DCAN QC plots.

  • smoothed_denoised_bold (str) – Path to the censored, denoised, interpolated, filtered, re-censored, and smoothed BOLD file. This file is the result of denoising the censored preprocessed BOLD data, followed by cubic spline interpolation, band-pass filtering, re-censoring, and spatial smoothing.

  • boldref (str) – Path to the BOLD reference file associated with the target BOLD run. This comes from the preprocessing derivatives.

  • bold_mask

  • timeseries (list of str) – List of paths to atlas-specific time series TSV files. These time series are produced from the censored_denoised_bold outputs.

  • timeseries_ciftis (list of str) – List of paths to atlas-specific time series CIFTI (ptseries) files. These time series are produced from the censored_denoised_bold outputs. This will not be defined.

References