Learn R Programming

brainGraph (version 2.2.0)

set_brainGraph_attr: Set graph, vertex, and edge attributes common in MRI analyses

Description

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.

Usage

set_brainGraph_attr(g, atlas = NULL, rand = FALSE, use.parallel = TRUE,
  A = NULL, xfm.type = c("1/w", "-log(w)", "1-w"), ...)

Arguments

g

An igraph graph object

atlas

Character vector indicating which atlas was used (default: NULL)

rand

Logical indicating if the graph is random or not (default: FALSE)

use.parallel

Logical indicating whether or not to use foreach (default: TRUE)

A

Numeric matrix; the (weighted) adjacency matrix, which can be used for faster calculation of local efficiency (default: NULL)

xfm.type

Character string indicating how to transform edge weights (default: 1/w [reciprocal])

...

Other arguments passed to make_brainGraph

Value

g An igraph graph object with the following attributes:

Graph-level

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

Vertex-level

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)

Edge-level

Color (community, lobe, component), edge betweenness, Euclidean distance (in mm), weight (if weighted)

Details

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

See Also

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