create_cfg_object: Create configuration (cfg) structure for analysis

View source: R/create_cfg_object.R

create_cfg_objectR Documentation

Create configuration (cfg) structure for analysis

Description

This function compiles the relevant settings and file paths to be fed into analysis functions.

Usage

create_cfg_object(
  pat_ids,
  lesion_paths,
  out_path,
  dsi_path = NULL,
  parcel_path = NULL,
  file_suffix = NULL,
  con_type = "end",
  sspl_spared_thresh = 50,
  node_label = NULL,
  node_group = NULL,
  parcel_coords = NULL,
  delta_sspl_thresh = 90,
  parcel_dmg_thresh = 100,
  tract_sdc_thresh = 5,
  smooth = 2
)

Arguments

pat_ids

a vector of strings specifying patients' IDs (used as directories for output files)

lesion_paths

a vector of strings specifying the path to patients' lesion masks (pre-registered to MNI template, and corresponding to pat_ids)

out_path

a string specifying the path to your desired output directory; patient and atlas result directories will be created here

dsi_path

a string specifying the path to your local DSI_Studio program

parcel_path

a string specifying the path to a parcellation map (should have identical dimensions to lesion and be in MNI template space); function defaults to the Schaefer-Yeo 100 parcel 7 network parcellation with subcortical structures

file_suffix

a string providing a suffix for results files; the atlas name is recommended (e.g. AAL, Power, Gordon, etc.)

con_type

connectivity type (must be either 'end' or 'pass'): if 'end', connections are defined based on streamline endpoints; if 'pass', they are based on streamline pass-throughs ('end' is more conservative and is recommended)

sspl_spared_thresh

a number between 1 and 100 representing the percent spared threshold for computing shortest structural path lengths (e.g. 100 means that only fully spared regions will be included in SSPL calculation, 1 means that regions with at least 1 percent spared will be included; default is 50)

node_label

a vector of strings corresponding to node labels (i.e. parcel names); must be the same length (P) as the number of parcels

node_group

a vector of strings integer values corresponding to e.g. network assignments or partitions (used to color nodes in visualizations)

parcel_coords

a P-by-3 matrix of parcel coordinates used for brain network graphs; if not supplied, they will be estimated from the parcel file

delta_sspl_thresh

a number between 1 and 100 giving the percentile threshold for displaying SSPL increases in figures (will only display SSPL increases above percentile threshold; default = 90)

parcel_dmg_thresh

a number between 1 and 100 giving the parcel damage threshold for displaying SSPL increases in figures (will not display SSPL increases for parcels with percent damage greater than or equal to the threshold; default = 100)

tract_sdc_thresh

a number between 1 and 100 giving the tract disconnection threshold for displaying tracts in figures (will not display data for tracts with percent disconnection below threshold; default = 5)

smooth

a number representing the smoothing kernel FWHM (in voxel units) for smoothing the track density imaging output file (default = 2)

Value

A list structure to be input into downstream analysis functions.


jdwor/LQT documentation built on Nov. 21, 2023, 4:34 p.m.