function to count number of 0 columns in cifti files

check_cifti(
  filename = "check_cifti.csv",
  wb_path = "/home/junhong.yu/workbench/bin_rh_linux64"
)

Arguments

filename

check the directory structure to ensure that each fMRI directory should only contain one fMRI file and at least one movement file. Set to TRUE by default.

wb_path

The filepath to the workbench folder that you have previously downloaded and unzipped. Set to /home/junhong.yu/workbench/bin_rh_linux64 by default

Value

outputs a .csv file with a N x 2 data.frame, with the columns of filename and `Non-zero_values“

Details

This function searches for all *_space-fsLR_den-91k_bold.dtseries.nii files recursively. Then these files are read one at a time, data from the left and right cortices and the subcortex are then rbind to form a 91282 x N matrix, where N is the number of frames. This matrix is summed rowwise, and the number of rowwise sums that are equal to 0 are counted. If there are no issues with the structural-functional alignment, there should only be 546 zero values

Examples

if (FALSE) { # \dontrun{
check_cifti()
} # }