Git Product home page Git Product logo

braingraph's Introduction

brainGraph

Project Status: Active - The project has reached a stable, usable state and is being actively developed. Linux Build Status CRAN_Status_Badge GPL License CRAN Downloads

brainGraph is an R package for performing graph theory analyses of brain MRI data. It is most useful in atlas-based analyses (e.g. using an atlas such as AAL or one from Freesurfer); however, many of the computations (e.g., the GLM functions and the network-based statistic) will still work with any graph that is compatible with igraph. I also have used this for tractography data from FSL's probtrackx2 and resting-state fMRI data from DPABI.

Table of Contents

Installation

The package should work "out-of-the-box" on Linux systems (at least on Red Hat-based systems; i.e., CentOS, RHEL, Scientific Linux, etc.) since almost all development (and use, by me) has been on computers running CentOS 6 and (currently) CentOS 7. I have also had success running it (and did some development) on Windows 7, and have heard from users that it works on some versions of Mac OS and on Ubuntu.

There are two ways to install this package:

  • Directly from CRAN:
install.packages('brainGraph')
  • For development versions, using the devtools package (install first, if necessary):
devtools::install_github('cwatson/brainGraph')

This should install all of the dependencies needed along with the package itself. For more details, see the User Guide (link to PDF in next section).

Usage

I have a User Guide that contains extensive code examples for analyses common to brain MRI studies. I also include some code for getting your data into R from Freesurfer, FSL, and DPABI, and some suggestions for workflow organization. To access the User Guide, please use this link. (NOTE: you will be asked to download the PDF)

Graph measures

In addition to the extensive list of measures available in igraph, I have functions for calculating/performing:

Group analyses

  • Between-group differences in vertex- or graph-level measures (e.g., degree, betweenness centrality, global efficiency, etc.) using the General Linear Model. See Chapter 7 of the User Guide, which was modeled after the GLM help page on FSL's wiki
  • The multi-threshold permutation correction (MTPC) method for statistical inference (see Drakesmith et al., 2015)
  • The network-based statistic (NBS) (see Zalesky et al., 2010)
  • Bootstrapping of graph-level metrics (e.g., modularity)
  • Permutation analysis of between-group differences in vertex- or graph-level measures
  • "Individual contributions (leave-one-out [LOO] and add-one-patient [AOP]; see Saggar et al., 2015)

Null graph-related measures

  • Null/random graph generation (both the "standard" method, and also a method controlling for clustering; see Bansal et al., 2009)
  • Small-worldness (the "original" of Watts & Strogatz, 1998 and Humphries et al., 2008; and "omega" introduced in Telesford et al., 2011)
  • Rich-club coefficients and normalization (see Zhou & Mondragon, 2004; and Colizza et al., 2006)

Other measures

  • Efficiency (global, nodal, and local; see Latora & Marchiori, 2001)
  • The "rich-core" (see Ma & Mondragon, 2015)
  • Leverage centrality (see Joyce et al., 2010)
  • Asymmetry index
  • Robustness ("targeted attack" and "random failure") and vulnerability
  • Euclidean distances of edges
  • Participation coefficient and within-module degree z-score (see Guimera & Amaral, 2005)
  • Gateway coefficient (see Vargas & Wahl, 2014)
  • Communicability and communicability betweenness (see Estrada & Hatano, 2008; Estrada et al., 2009; Crofts & Higham, 2009)
  • Vertex s-core membership (see Eidsaa & Almaas, 2013)

Visualization

There is a plotting GUI for fast and easy data exploration that will not work without data from a standard atlas (ideally to be fixed some time in the future). You may use a custom atlas if you follow the same format as the other atlases in the package (see Chapter 4 of the User Guide). A screenshot of the GUI is here:

brainGraph GUI

Getting Help

For bug reports, feature requests, help with usage/code/etc., please join the Google Group brainGraph-help.

Future versions

An incomplete list of features/functionality I plan on adding to future versions:

  • Mediation analysis at both the graph- and vertex-level (currently only simple linear models)
  • Thresholding and graph creation using the minimum spanning tree as a base
  • Create methods for objects of class brainGraph, making it simpler to, for example, show a text summary of a graph or to plot the graph over the MNI slice, etc.
    • plot_brainGraph_mni will be removed as it will be a redundant step
  • Use methods for GLM-related functions/objects. For example, I am writing a function for GLM diagnostics which will mimic the functionality of the base R function plot.lm

braingraph's People

Contributors

cwatson avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.