Loading data is usually the first step before running any statistical analysis. Prior to using this function, BrainSuite and svreg should be run on all subjects. If required, smoothing should be performed on cortical surface or volumetric image based measures. A csv file containing subject demographic information should exist. The first column of this csv file should have the subject identifiers. Subject identifiers can be alphanumeric and should be exactly equal to the individual subject directory names.

load_bstr_data(
  type = "sba",
  subjdir = "",
  csv = "",
  hemi = "left",
  smooth = 0,
  roiids = 0,
  roimeas = "gmthickness",
  measure = "",
  atlas = "",
  maskfile = "",
  eddy = TRUE,
  exclude_col = ""
)

Arguments

type

character string denoting type of analysis. Should be sba, tbm, or roi.

subjdir

subject directory containing BrainSuite processed data.

csv

filename of a comma separated (csv) file containing the subject demographic information. The first column of this csv file should be "subjID" and should have subject identifiers you wish to analyze. subjID can be alphanumeric and should be exactly equal to the individual subject directory name.

hemi

chaaracter string denoting the brain hemisphere. Should either be "left" or "right".

smooth

numeric value denoting the smoothing level.

roiids

numeric label identifiers for the regions of interest (ROI) type analysis.

roimeas

character string for the ROI measure. Should either be "gmthickness", "gmvolume", or "wmvolume".

measure

character specifying the brain imaging measure. If analyzing diffusion data, should be "FA".

atlas

character specifying the file path prefix (all characters in the file name upto the first ".") for the custom atlas. If empty, the atlas will be read from the svreg.log file in the subject directory. Otherwise, for example, if the atlas for tensor based morphometry is located at /path/to/atlas/myatlas.mri.bfc.nii.gz, then specify atlas="/path/to/atlas/myatlas".

maskfile

filename of the mask for tbm or diffusion parameter analysis. The mask has to be in the atlas space.

eddy

boolean for specifying if the diffusion images were eddy-current corrected or not.

exclude_col

character string for the column in demographics csv (contains 1 or 0 for each row) specifying the subjects to exclude. 1 denotes include, 0 denotes exclude.

Examples

if (FALSE) {
my_sba_data <- load_bstr_data(type="sba", subjdir = "/path/to/my/subjectdirectory",
csv = "/path/to/my/demographics.csv", hemi = "left", smooth = 2.5)

my_roi_data <- load_bstr_data(type="roi", subjdir = "/path/to/my/subjectdirectory",
csv="/path/to/my/demographics.csv", roiids=501, roimeas="gmthickness")
}