write_brainNet: Create Node and Edge Files for Brain Net Viewer

Description Usage Arguments Author(s) References Examples

View source: R/write_brainNet.R

Description

Create Node and Edge Files for Brain Net Viewer

Usage

1
2
3
4
5
6
7
8
9
write_brainNet(
  MNIcoordinates,
  graph,
  node.colors = "NULL",
  node.size,
  node.labels = "NULL",
  directory = getwd(),
  name = Sys.Date()
)

Arguments

MNIcoordinates

A matrix with columns consisting of the X,Y,Z MNI152 coordinates (must be in this order) for ROIs

graph

A network in either matrix format or as an igraph object

node.colors

A vector of labels, such as module membership. Defaults to all the same color.

node.size

A vector of numbers describing the nodes (such as degree)

node.labels

A vector of node names

directory

Directory for file output. Defaults to current working directory.

name

A name for the output. Defaults to the current date.

Author(s)

Brandon Vaughan

References

Xia M, Wang J, He Y (2013) BrainNet Viewer: A Network Visualization Tool for Human Brain Connectomics. PLoS ONE 8: e68910.

https://www.nitrc.org/projects/bnv/

Examples

1
2
3
brainnet.matrix = threshold_matrix(avg_matrix) # Threshold a weighted correlation matrix first
brainnet.matrix = threshold_and_binarize(avg_matrix) # Or binarize
write.brainNet(MNIcoordinates=Node_Atlas[,1:3], graph = brainnet.matrix, node.colors=module$membership, node.size=LEV.AVG, directory="C:/Users/Abnormally-Distributed/Documents/R/", name="leverage_network")

abnormally-distributed/rsfcNet documentation built on March 8, 2020, 5:32 p.m.