Initializes some variables that are important for further analysis of structural covariance networks (e.g., cortical thickness). This mostly involves loading CSV files (of covariates/demographics, cortical thickness/volumes, etc.) and returning them as data tables.
brainGraph_init(atlas, densities, datadir, modality = "thickness",
covars = NULL, exclude.subs = NULL, custom.atlas = NULL)
Character string indicating which brain atlas you are using.
This can be an atlas present with the package or a custom atlas; in this
case you must specify custom
here and assign the name to the
argument custom.atlas
.
Numeric vector of the graph densities you would like to investigate
Character string; the filesystem location of your input files
Character string indicating the volumetric MRI
modality/measure used to create the graphs (default: thickness
)
A data.table
of covariates; specify this if you do not
want to load your full covariates file (default: NULL
)
Character vector of the Study ID's of subjects who are to
be excluded from the analysis (default: NULL
)
Character string of the name of the custom atlas you wish
to use, if applicable (default: NULL
)
A list containing:
Character string of the brain atlas name
Numeric vector of the graph densities
Character string of the modality you chose
Integer indicating the number of densities
A data.table
of covariates
Character vector of subject group names
Integer indicating the number of groups
Integer; the number of vertices in the graphs
A data.table
of left- and right-hemispheric volumetric
data
You can use any atlas that is already present in the package; to check the
available atlases, you can type
data(package="brainGraph")$results[, 3]
at the R prompt. If you have a
custom atlas, specify atlas="custom"
and supply the R object's name
for the argument custom.atlas
.
The file containing covariates should be named covars.csv
. However,
you may also supply a data.table
using the function argument
covars
. This is useful if you have multiple covariates in your file
and wish to subset the data on your own. It must have, at minimum, columns
named Study.ID
and Group
(even if you have only 1 group).
The filenames of the structural MRI data should include hemisphere,
atlas, and modality separated by the underscore character; e.g.
lh_dkt_thickness.csv
contains cortical thickness of left hemisphere
regions of the DKT atlas. If you would like to include subcortical gray
matter, then you will need files covars.scgm.csv
and scgm.csv
.
Other Structural covariance network functions: IndividualContributions
,
brainGraph_boot
,
brainGraph_permute
,
corr.matrix
, get.resid
,
plot.brainGraph_resids
,
plot_volumetric
# NOT RUN {
init.vars <- brainGraph_init(atlas='dkt', densities=seq(0.07, 0.50, 0.01),
datadir='/home/cwatson/Data', modality='thickness', exclude.subs=c('Con07',
'Con23', 'Pat15'))
# }
Run the code above in your browser using DataLab