import_scn {brainGraph} | R Documentation |
Import data for structural connectivity analysis
Description
Given a directory, atlas name, and imaging modality/structural metric, this
function imports data for structural connectivity analysis. It expects files
containing a table of region-wise structural MRI measures (e.g., mean
cortical thickness), with one file for each hemisphere. The first column of
all files should contain the subject ID; the column name will be
changed to the value of getOption('bg.subject_id')
.
Usage
import_scn(datadir, atlas, modality = "thickness", exclude.subs = NULL,
custom.atlas = NULL)
Arguments
datadir |
The path name of the directory containing the data files |
atlas |
Character string specifying the atlas in use. For a custom
atlas, please specify |
modality |
The structural imaging measure (default: |
exclude.subs |
Vector indicating the subjects to exclude, if any
(default: |
custom.atlas |
Character string specifying the name of the R object for
the atlas in use, if |
Details
The files should have specific names; the second in the following list is
only required for atlases/parcellations that include subcortical gray
matter (e.g., dk.scgm
).
-
${parcellation}_${hemi}_${modality}.csv
for cortical volume, thickness, surface area, or local gyrification index (LGI). Here,${parcellation}
can beaparc
,aparc.DKTatlas40
, oraparc.a2009s
. For example, for cortical thickness with the Desikan-Killiany atlas, the filename should beaparc_lh_thickness.csv
. If you are using a custom atlas, see the Note below. The${hemi}
variable is eitherlh
orrh
. Finally,${modality}
should be eithervolume
,thickness
,area
, orlgi
. -
asegstats.csv
for SCGM volume
Value
A list containing:
atlas |
Character string |
modality |
Character string |
lhrh |
A |
aseg |
A |
subs.excluded |
Vector of subject ID's that were excluded |
subs.missing |
Vector of subject ID's that are not present in both the cortical and subcortical tables (if applicable) |
Note
When using a custom atlas, the name of the atlas's data.table should
match the ${parcellation}
portion of the filename (specification
shown above). Furthermore, it must conform to the output of Freesurfer's
aparcstats2table
(and asegstats2table
, if applicable).
Otherwise, please contact me for inclusion of a different data type.
The subject ID column will be zero-padded (to the left) to avoid issues when the variable is numeric; this ensures that all ID's will have the same number of characters and sorting will be done properly.
Author(s)
Christopher G. Watson, cgwatson@bu.edu
See Also
Other Structural covariance network functions: Bootstrapping
,
IndividualContributions
,
Residuals
,
brainGraph_permute
,
corr.matrix
, plot_volumetric
Examples
## Not run:
raw_data <- import_scn('/home/cwatson/data', atlas='dkt',
exclude.subs=c('con07', 'con23', 'pat15'))
## End(Not run)