mychan24 / r-for-brain-network

Analyze brain surface/volume (gifti, cifti, nifti) in R and extract networks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

R for brain network

Why R for brain network?

Human brain network derived from functional magnetic resonance imaging (fMRI) data are often analyzed and visualize using a combination of MATLAB or network-visualization software (e.g., cytoscape, gephi).

However, much of graph analysis can be accomplished in R. Here, I document a graph-analysis workflow of fMRI resting-state network in R. This allows easy integration with other statistical analysis conducted on the targeted graph measures (e.g., degree, participation coefficient, modularity, system segregation).

This repository includes documentation of the following:

  • Manipulate gifti (surface), nifti (volume), cifti (surface + volume) in R to generate network matrices
    • Checkout the cifti markdown file for most updated workflow (3/5/2019).
    • Most future addition would focus on cifti, as the combination of surface and volumetric data (subcortical) are preferrable.
  • Calculate network metrics/measures
  • Visualize network matrices and graphs
  • Analyze data
  • Visualize results

Prerequisites

  • The gifti and cifti packages are required to read in gifti or cifti files.
  • gridExtra & ggplotify for arranging the plots. pals for color pallete.
  • A forked version of the r package superheat is used for most of the visualization. Example:

  • The igraph is used to make network visualizaiton (i.e., hairball/spring graphs)

Acknowledgments

  • The superheat package was super convenient for my work. Check out the original author's vignette for examples.
  • The gifti and cifti packages from John Muschelli are obviously critical for interacting with these data format.

About

Analyze brain surface/volume (gifti, cifti, nifti) in R and extract networks


Languages

Language:HTML 99.9%Language:R 0.1%