create_group_list {SparseICA}R Documentation

Create a List of fMRI Files for Group ICA Analysis

Description

This function scans a BIDS-formatted directory for subject-specific fMRI files that match a specified pattern and returns a list of these files for use in group ICA analysis.

Usage

create_group_list(bids_path, pattern = "task-rest.*\\.dtseries\\.nii$")

Arguments

bids_path

A character string specifying the path to the root directory of the BIDS-formatted dataset. This directory should contain subject folders (e.g., sub-*).

pattern

A character string specifying the pattern to match fMRI files. The default is "task-rest.*\.dtseries\.nii$".

Value

A named list where each element corresponds to a subject directory and contains a vector of matched fMRI file paths. The names of the list are the subject IDs.

Examples

# Example usage:
# Assuming `bids_dir` is the path to a BIDS dataset:
# group_list <- create_group_list(bids_path = bids_dir, pattern = "task-rest.*\.dtseries\.nii$")
# Print the structure of the list:
# str(group_list)


[Package SparseICA version 0.1.4 Index]