
Build "supersubject" by stacking all vertex data in one large file-backed matrix with dimensions n_subjects x n_vertices.
Source:R/build_supersubject.R
build_supersubject.Rd
Build "supersubject" by stacking all vertex data in one large file-backed matrix with dimensions n_subjects x n_vertices.
Arguments
- subj_dir
: path to the FreeSurfer data, this expects a verywise structure.
- folder_ids
: the vector of observations to include. This holds the relative path (from `subj_dir`) to the FreeSurfer data folder (e.g. "site1/sub-1_ses-01").
- outp_dir
: output path, where logs, backing files and the matrix itself (if `save_rds == TRUE`) will be stored.
- measure
: vertex-wise measure, used to identify files.
- hemi
: hemisphere, used to identify files.
- fwhmc
: (default = "fwhm10") full-width half maximum value, used to identify files.
- target
: (default = "fsaverage"), used to identify files.
- backing
: (default = `outp_dir`) location to save the matrix
backingfile
.- error_cutoff
: (default = 20) how many missing directories or brain surface files for the function to stop with an error. If < `error_cutoff` directories/files are not found a warning is thrown and missing files are registered in the `issues.log` file.
- mask
: (default = TRUE) only keep cortical vertices, according to FreeSurfer cortical map.
- save_rds
: (default = FALSE) save the supersubject file metadata for re-use in other sessions.
- cluster
: the parallel cluster
- verbose
: (default = TRUE)