This function will assign vertex attributes lobe and lobe.hemi
for all vertices in a graph, given a specific atlas. It will also add an
attribute circle.layout for plotting circular graphs.
Usage
assign_lobes(g, rand = FALSE)
Arguments
g
An igraph graph object.
rand
A character string indicating whether this function is being run
for a random graph or a "graph of interest" (default: FALSE).
Value
An igraph graph object with additional vertex attributes:
lobe
Character string indicating the lobe
lobe.hemi
Integer vector indicating the lobe and hemisphere
circle.layout
Integer vector for ordering the vertices for circle
plots
x, y, z, x.mni, y.mni, z.mni
Spatial coordinates
color.lobe
Colors based on lobe
Details
The input graph gmust have a graph attribute named atlas.