This function sets a number of graph, vertex, and edge attributes for a
given igraph
graph object. These are all measures that are common in
MRI analyses of brain networks.
set_brainGraph_attr(g, atlas = NULL, rand = FALSE, use.parallel = TRUE,
A = NULL, xfm.type = c("1/w", "-log(w)", "1-w"), ...)
An igraph
graph object
Character vector indicating which atlas was used (default:
NULL
)
Logical indicating if the graph is random or not (default:
FALSE
)
Logical indicating whether or not to use foreach
(default: TRUE
)
Numeric matrix; the (weighted) adjacency matrix, which can be used
for faster calculation of local efficiency (default: NULL
)
Character string indicating how to transform edge weights
(default: 1/w
[reciprocal])
Other arguments passed to make_brainGraph
g An igraph
graph object with the following attributes:
Density, connected component sizes, diameter, \# of triangles, transitivity, average path length, assortativity, global & local efficiency, modularity, vulnerability, hub score, rich-club coefficient, \# of hubs, edge asymmetry, and modality
Degree, strength; betweenness, eigenvector, and leverage centralities; hubs; transitivity (local); k-core, s-core; local & nodal efficiency; color (community, lobe, component); membership (community, lobe, component); gateway and participation coefficients, within-module degree z-score; vulnerability; and coordinates (x, y, and z)
Color (community, lobe, component), edge betweenness, Euclidean distance (in mm), weight (if weighted)
xfm.type
allows you to choose from 3 options for transforming edge
weights when calculating distance-based metrics (e.g., shortest paths). There
is no "best-practice" for choosing one over the other, but the reciprocal is
probably most common.
1/w
: reciprocal (default)
-log(w)
: the negative (natural) logarithm
1-w
: subtract weights from 1
components
, diameter
,
clique_num
, centr_betw
,
part_coeff
, edge.betweenness
,
centr_eigen
, gateway_coeff
,
transitivity
, mean_distance
,
assortativity_degree
, efficiency
,
assortativity_nominal
, coreness
,
cluster_louvain
, set_edge_color
,
rich_club_coeff
, s_core
, centr_lev
,
within_module_deg_z_score
, edge_spatial_dist
,
vulnerability
, edge_asymmetry
,
graph.knn
, vertex_spatial_dist