Learn R Programming

brainGraph (version 2.2.0)

make_brainGraph: Create a brainGraph object

Description

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.

Usage

make_brainGraph(g, atlas, rand = FALSE, modality = NULL, weighting = NULL,
  threshold = NULL, subject = NULL, group = NULL)

Arguments

g

An igraph graph object.

atlas

Character string specifying the brain atlas

rand

A character string indicating whether this function is being run for a random graph or a "graph of interest" (default: FALSE).

modality

Character vector indicating imaging modality (e.g. 'dti') (default: NULL)

weighting

Character string indicating how the edges are weighted (e.g., 'fa', 'pearson', etc.) (default: NULL)

threshold

Numeric indicating the level at which the matrices were thresholded (if at all) (default: NULL)

subject

Character vector indicating subject ID (default: NULL)

group

Character vector indicating group membership (default: NULL)

Value

A brainGraph graph object with additional attributes:

version

(graph-level) The current version of brainGraph

atlas

(graph-level)

lobe

(vertex-leve) Character vector of lobe names

hemi

(vertex-leve) Character vector of hemispheres ('L', 'R', or 'B')

lobe.hemi

Integer vector indicating the lobe and hemisphere

class

(vertex-leve) Character vector of class names (if applicable)

network

(vertex-leve) Character vector of network names (if applicable)

modality

(graph-level)

weighting

(graph-level)

threshold

(graph-level)

name

(graph-level) The subject ID

Group

(graph-level)

x, y, z, x.mni, y.mni, z.mni

Spatial coordinates

color.lobe

(vertex- and edge-level) Colors based on lobe

color.class,color.network

(vertex- and edge-level) If applicable

circle.layout

Integer vector for ordering the vertices for circle plots

Details

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).

See Also

Other Graph creation functions: make_ego_brainGraph, make_empty_brainGraph, make_glm_brainGraph, make_mediate_brainGraph, make_nbs_brainGraph