generate_run_data_from_bids: Function to generate a run_data object from a BIDS-compliant...

View source: R/bids_tools.R

generate_run_data_from_bidsR Documentation

Function to generate a run_data object from a BIDS-compliant folder

Description

Function to generate a run_data object from a BIDS-compliant folder

Usage

generate_run_data_from_bids(
  bids_dir,
  modality = "func",
  task_name = "ridl",
  desc = "postproc",
  suffix = "bold",
  space = NULL,
  anat_root = NULL,
  fmap_root = NULL
)

Arguments

bids_dir

a directory containing BIDS-compliant processed data for analysis

modality

the subfolder within bids_dir that contains data of a certain modality. Almost always 'func', which is the default.

task_name

the name of the task, which is appended with "task-"

suffix

an optional suffix in the expected filename (just before the file extension)

Details

The files should generally have a name like sub-220256_task-ridl3_space-MNI152NLin2009cAsym_desc-preproc_bold_postprocessed.nii.gz and be located in a folder like: /proj/mnhallqlab/proc_data/sub-220256/func/ where 'func' is the modality, 'ridl' is the task_name, and '_postprocessed' is the suffix.

Value

a data.frame containing all run_nifti and confound_input_file results for subjects in the folder

Examples

## Not run: 
  run_df <- generate_run_data_from_bids("/proj/mnhallqlab/no_backup/flanker-fmriprep", task_name = "flanker", desc = "postproc")

## End(Not run)

UNCDEPENdLab/fmri.pipeline documentation built on April 3, 2025, 3:21 p.m.