This function will assign vertex attributes lobe and lobe.hemi for all vertices in a graph, given a specific atlas. It will also add attributes circle.layout, x, y, z for plotting.
make_brainGraph(g, atlas, rand = FALSE, modality = NULL, weighting = NULL,
threshold = NULL, subject = NULL, group = NULL)
An igraph graph object.
Character string specifying the brain atlas
A character string indicating whether this function is being run
for a random graph or a "graph of interest" (default: FALSE
).
Character vector indicating imaging modality (e.g. 'dti')
(default: NULL
)
Character string indicating how the edges are weighted
(e.g., 'fa', 'pearson', etc.) (default: NULL
)
Numeric indicating the level at which the matrices were
thresholded (if at all) (default: NULL
)
Character vector indicating subject ID (default: NULL
)
Character vector indicating group membership (default: NULL)
A brainGraph graph object with additional attributes:
(graph-level) The current version of brainGraph
(graph-level)
(vertex-leve) Character vector of lobe names
(vertex-leve) Character vector of hemispheres ('L'
,
'R'
, or 'B'
)
Integer vector indicating the lobe and hemisphere
(vertex-leve) Character vector of class names (if applicable)
(vertex-leve) Character vector of network names (if applicable)
(graph-level)
(graph-level)
(graph-level)
(graph-level) The subject ID
(graph-level)
Spatial coordinates
(vertex- and edge-level) Colors based on lobe
(vertex- and edge-level) If applicable
Integer vector for ordering the vertices for circle plots
The input graph g
must have a graph attribute named
atlas
, and will assign other attributes specific to the atlas.
For the modality
argument, you can choose anything you like, but the
summary.brainGraph
knows about dti
, fmri
,
thickness
, area
, and volume
.
For the weighting
argument, you can choose anything you like, but
summary.brainGraph
knows about fa
, sld
(streamline
density, tractography), pearson
, spearman
, kendall
, and
partial
(partial correlation coefficient).
Other Graph creation functions: make_ego_brainGraph
,
make_empty_brainGraph
,
make_glm_brainGraph
,
make_mediate_brainGraph
,
make_nbs_brainGraph