editJSON_IntendedFor.Rd
A tool to edit .JSON files' IntendedFor entry so that the fmap files can be correctly identified and processed by fMRIprep. This currently does not work with BIDS directories that contain multiple sessions of data
editJSON_IntendedFor(json_files, nii_files, subjects, base_dir = "func/")
filename suffix for one (e.g., "_phasediff.json"
) or multiple JSON files (e.g., c("_phasediff.json", "magnitude1.json", "magnitude2.json")
)
one or more filename suffix of the nii or nii.gz files (e.g., "_task-rest_bold.nii.gz"
) to be added to the IntendedFor entry of the specified JSON files.
If specified, will only processed the selected subjects
base directory of the *bold.nii.gz files. set to "func/" by default.
This function searches for .JSON files at the root of fMRIprep BIDS directory, edits their IntendedFor entry before overwriting the original JSON file
if (FALSE) { # \dontrun{
editJSON_IntendedFor(json_files="_phasediff.json",nii_files="_task-rest_bold.nii.gz")
} # }