aslprep.workflows.asl.confounds module

Workflows for calculating confounds for ASL data.

init_asl_confounds_wf(n_volumes: int, mem_gb: float, freesurfer: bool = False, name: str = 'asl_confounds_wf')[source]

Build a workflow to generate and write out confounding signals.

This workflow calculates confounds for a asl series, and aggregates them into a TSV file, for use as nuisance regressors in a GLM. The following confounds are calculated, with column headings in parentheses:

  1. DVARS - original and standardized variants (dvars, std_dvars)

  2. Framewise displacement, based on head-motion parameters (framewise_displacement)

  3. Estimated head-motion parameters, in mm and rad (trans_x, trans_y, trans_z, rot_x, rot_y, rot_z)

Workflow Graph
../_images/aslprep-workflows-asl-confounds-1.png

(Source code, png, svg, pdf)

Parameters:
  • n_volumes (int) – Number of volumes in the ASL file. Some relative measures (e.g., FD, DVARS, RMSD) will produce empty arrays for single-volume datasets, so we must skip those.

  • mem_gb (float) – Size of asl file in GB - please note that this size should be calculated after resamplings that may extend the FoV

  • freesurfer (bool) – True if FreeSurfer derivatives were used.

  • name (str) – Name of workflow (default: asl_confounds_wf)

Inputs:
  • asl – asl image, after the prescribed corrections (HMC and SDC) when available.

  • asl_mask – asl series mask

  • movpar_file – SPM-formatted motion parameters file

  • rmsd_file – Framewise displacement as measured by fsl_motion_outliers.

  • skip_vols – number of non steady state volumes

  • t1w_mask – Mask of the skull-stripped template image

  • t1w_tpms – List of tissue probability maps in T1w space

  • aslref2anat_xfm – Affine matrix that maps the T1w space into alignment with the native asl space

Outputs:
  • confounds_file – TSV of all aggregated confounds

  • confounds_metadata – Confounds metadata dictionary.

  • crown_mask – Mask of brain edge voxels

  • acompcor_masks

init_carpetplot_wf(mem_gb: float, confounds_list: list, metadata: dict, cifti_output: bool, suffix: str = 'asl', name: str = 'asl_carpet_wf')[source]

Build a workflow to generate carpet plots.

Resamples the MNI parcellation (ad-hoc parcellation derived from the Harvard-Oxford template and others).

Parameters:
  • mem_gb (float) – Size of BOLD file in GB - please note that this size should be calculated after resamplings that may extend the FoV

  • confounds_list (list of length-3 tuple of str)

  • metadata (dict) – BIDS metadata for BOLD file

  • name (str) – Name of workflow (default: asl_carpet_wf)

Inputs:
  • asl – BOLD image, after the prescribed corrections (STC, HMC and SDC) when available.

  • asl_mask – BOLD series mask

  • confounds_file – TSV of all aggregated confounds

  • aslref2anat_xfm – Affine matrix that maps the T1w space into alignment with the native BOLD space

  • std2anat_xfm – ANTs-compatible affine-and-warp transform file

  • cifti_asl – BOLD image in CIFTI format, to be used in place of volumetric BOLD

  • crown_mask – Mask of brain edge voxels

  • acompcor_mask – Mask of deep WM+CSF

  • dummy_scans – Number of nonsteady states to be dropped at the beginning of the timeseries.

Outputs:

out_carpetplot – Path of the generated SVG file

init_cbf_confounds_wf(scorescrub=False, basil=False, name='cbf_confounds_wf')[source]

Create a workflow for dolui2017automated.

Workflow Graph
../_images/aslprep-workflows-asl-confounds-2.png

(Source code, png, svg, pdf)

Parameters:
  • scorescrub (bool)

  • basil (bool)

  • name (str) – Name of workflow (default: “cbf_qc_wf”)

Inputs:
  • *cbf – all cbf

  • asl_mask – asl mask NIFTI file

  • t1w_tpms – t1w probability maps

  • aslref2anat_xfm – aslref to t1w transformation file

  • asl_mask_std (list) – Since ASLPrep always includes MNI152NLin2009cAsym as a standard space, this should always be provided.

Outputs:

qc_file – qc measures in tsv