groupICA.cifti: Perform group ICA based on CIFTI data

View source: R/groupICA.R

groupICA.ciftiR Documentation

Perform group ICA based on CIFTI data

Description

Perform group ICA based on CIFTI data

Usage

groupICA.cifti(
  cifti_fnames,
  subjects = NULL,
  brainstructures = c("left", "right"),
  num_PCs = 100,
  num_ICs,
  max_rows_GPCA = 10000,
  center_Bcols = FALSE,
  scale = c("global", "local", "none"),
  scale_sm_FWHM = 2,
  detrend_DCT = 0,
  verbose = TRUE,
  out_fname = NULL,
  surfL = NULL,
  surfR = NULL,
  smooth = TRUE,
  smooth_surf_FWHM = 5,
  smooth_vol_FWHM = 5,
  smooth_zeroes_as_NA = FALSE,
  smooth_subcortical_merged = FALSE
)

Arguments

cifti_fnames

Vector of file paths of CIFTI-format fMRI timeseries (*.dtseries.nii) for which to calculate group ICA

subjects

Use this argument if some subjects have more than one scan. This is a numeric or factor vector the same length as cifti_fnames. Scans for the same subject should have the same value. For example, if there are four subjects with two visits each, and the scans are ordered with the first subject's two scans first, then the second subject's two scans next, etc., then this argument should be rep(seq(4), each=2). If there are three subjects and four scans, with the last two scans belonging to the same subject, this argument should be c(1,2,3,3). If all subjects only have one scan, keep this argument as NULL (default).

brainstructures

Character vector indicating which brain structure(s) to obtain: "left" (left cortical surface), "right" (right cortical surface) and/or "subcortical" (subcortical and cerebellar gray matter). Can also be "all" (obtain all three brain structures). Default: c("left","right") (cortical surface only).

num_PCs

Maximum number of PCs to retain in initial subject-level PCA

num_ICs

Number of independent components to identify.

max_rows_GPCA

The maximum number of rows for the matrix on which group level PCA will be performed. This matrix is the result of temporal concatenation and contains length(cifti_fnames) * num_PCs rows.

center_Bcols, scale, scale_sm_FWHM, detrend_DCT

Center BOLD columns, scale by the standard deviation, and detrend voxel timecourses? See norm_BOLD. Normalization is applied separately to each scan. Defaults: Center BOLD columns, scale by the global standard deviation, but do not detrend.

verbose

If TRUE, display progress updates

out_fname

(Optional) If not specified, a xifti object will be returned but the GICA maps will not be written to a CIFTI file.

surfL

(Optional) File path to a surface GIFTI for the left cortex. If provided, will be part of xifti result object for visualization in R. Will also be used to perform any smoothing.

surfR

(Optional) File path to a surface GIFTI for the right cortex. If provided, will be part of xifti result object for visualization in R. Will also be used to perform any smoothing.

smooth

Smooth the CIFTI data prior to reading in each file? Default: TRUE. Use the following arguments to control the smoothing parameters.

smooth_surf_FWHM, smooth_vol_FWHM, smooth_zeroes_as_NA, smooth_subcortical_merged

See smooth_cifti. The defaults here are the same. Note that smooth_zeroes_as_NA will control both of the corresponding surface and volume arguments to smooth_cifti. These arguments only apply if smooth.

Value

out_fname if a file was written, or the GICA as a "xifti" object if not.


templateICAr documentation built on Feb. 16, 2023, 8:14 p.m.