Please cite this toolbox as:* Kruschwitz JD, List D, Waller L, Rubinov M, Walter H, GraphVar: A user-friendly toolbox for comprehensive graph analyses of functional brain connectivity, Journal of Neuroscience Methods (2015)*,

http://dx.doi.org/10.1016/j.jneumeth.2015.02.021

**New release: GraphVar 2.0: 'Machine Learning' ** **DOWNLOAD HERE**

**DOWNLOAD - GraphVar:**

www.nitrc.org/projects/graphvar

New Release: GraphVar 2.0

**Download miscellaneous**:

NEW Features GraphVar 1.02

Article in "Journal of Neuroscience Methods"*QuickGuide_GraphVar**Tutorial_GraphVar*

DynamicGraphVar_Tutorial*Manual_GraphVar**OHBM_Poster_GraphVar*

**Features and Highlights:**

“GraphVar” is a user-friendly graphical-user-interface (GUI)-based toolbox (MATLAB) for comprehensive graph-theoretical analyses of brain connectivity, including network construction and characterization, statistical analysis on network topological measures, and interactive exploration of results. By combining together features across multiple current toolboxes, such as the Brain Connectivity Toolbox, the Graph Analysis Toolbox, and the Network Based Statistic Toolbox (BCT, Rubinov and Sporns 2010; GAT, Hosseini et al., 2012; NBS, Zalesky et al., 2010), GraphVar represents a comprehensive collection of graph analysis routines for functional neuroimaging researchers. GraphVar offers an interactive viewer that allows intuitive exploration of statistical results. Results can easily be exported and reloaded.

The program entails a detailed manual that includes usage instructions and a description of all the implemented functions, a Quick Guide for getting started, and a tutorial for getting started with sample data.

*(GraphVar was developed by J.D. Kruschwitz*, D. List*, L. Waller, M. Rubinov, H. Walter and is provided under the GNU GPL v3; *equal contribution)*

**1. Highlights:**

- GraphVar does not require MATLAB programming experience

- GraphVar contains most functions included in the Brain Connectivity Toolbox, but allows users to add custom functions which can subsequently be accessed via

the GUI.

- GraphVar accepts correlation matrices as input but can also generate correlation or partial correlation matrices, offers generation of connectivity matrices based on percentage bend correlations, spearman correlation and mutual information from input time series. (e.g. ROISignals_TC from the DPARSF output). Additionally GraphVar generates covariance matrices that may be used for estimating binary graphs with the sparse inverse covariance matrix option (SICE).

- Users may also provide demographic, clinical and other subject specific data (in spreadsheet format) for statistical analyses.

- GraphVar offers pipeline construction of graph networks with a choice of no, relative, absolute and significance-based thresholding, and the generation of

subject specific “null-model networks and sub-network analyses”.

- Binary and weighted network topological measures can be easily calculated, normalized, exported, and used in statistical analyses.

- Statistical analyses include general linear models (GLM and Machine Learning) with the network measures but also on the raw connectivity matrices (i.e., network based statistics including identification of graph components).

- Statistical tests can be performed in a parametric and non-parametric fashion (i.e., testing against null-model networks, non-parametric permutation testing).

- GraphVar now supports Sliding Window analyses on the raw matrices but also with the graph topological measures!

**2. Release notes:**

**Release info GraphVar 2.0**:

MATLAB toolbox for comprehensive graph analyses of functional

brain connectivity. Here we introduce a comprehensive extension of

the toolbox allowing users to seamlessly explore easily customizable

decoding models across functional connectivity measures as

well as additional features.

model construction, validation and exploration. Machine learning

can be performed across any combination of network measures

and additional variables, allowing for a flexibility in neuroimaging

applications.

as network construction and graph-theoretical analyses of brain

connectivity with a high-speed general linear model (GLM), users

can now perform customizable ML across connectivity matrices,

network metrics and additionally imported variables. The new

extension also provides parametric and nonparametric testing of

classifier and regressor performance, data export, figure generation

and high quality export.

toolboxes, GraphVar 2.0 offers (1) comprehensive customization,

(2) an all-in-one user friendly interface, (3) customizable model

design and manual hyperparameter entry, (4) interactive results

exploration and data export, (5) automated cueing for modelling

multiple outcome variables within the same session, (6) an easy to

follow introductory review.

exploration of encoding (GLM) and decoding (ML) modelling

approaches on functional connectivity measures making big data

neuroscience readily accessible to a broader audience of neuroimaging

investigators.

**Release info GraphVar 1.03**:

We found that in the GraphVar 1.0 update, the function to calculate the clustering coefficient

for binary undirected graphs was accidentally replaced with a function to calculate the number of

triangles around each node. The clustering coefficient, however, is defined as the number of triangles

around each node divided by the number of possible triangles. In other words, the values that were

returned are simply the unscaled form of the binary undirected clustering coefficient.

The functions for calculating the clustering coefficient on weighted network (clustering_coef_wu; clustering_coef_wd)

and the binary clustering coefficient fpr directed networks (clustering_coef_bd) were not affected.

However, even though the values are thus conceptually related, the number of triangles and the

actual clustering coefficient share only roughly 20% of their variance. Therefore, please

re-run your analyses if you have used the clustering coefficient for binary undirected graphs

with a GraphVar version 1.00, 1.01, or 1.02.

GraphVar 1.03 now entails the original BCT clustering coefficient

function for binary undirected networks (clustering_coef_bu.m)

We are very sorry for the inconvenience!

**Release info GraphVar 1.02**:

1. Fixed a bug where the direction of the effect of continuous by continous

interactions was reversed in some models. This issue did not affect the

p-values of the regressors.

**Release info GraphVar 1.01**:

1. display mouseover non-parametric p-vals in one-dimensional graph metrics

2. enable the export of non-paramtric p-val maps from results viewer (previously only parametric p-vals were exported)

3. fixed a bug for drawing graphs in the network inspector for non-parametric p-vals<.0000001

**Release info GraphVar 1.0**:

1. New general linear model (GLM) framework for statistical analyses

2. Fast permutation testing via C functions

3. C++ implementation of „null_model_und_sign“ (ten times faster than the original BCT version)

4. New dynamic graph measure: Brain-Network Variability (Zhang et al. 2016)

5. Optimized results viewer

**Release info GraphVar_beta_v_0.62**:

1. *Added two NEW "dynamic" graph measures!*

- nodal flexibility and nodal promiscuity coefficient which are based on changing community assignments in an ordered multislice matrix (as in Braun et al., 2015: Dynamic reconfiguration of frontal brain networks during

executive cognition in humans)

2. *Added new "regular" graph metrics:*

- global cost-efficiency (as in Bassett et al.,2009): Cognitive fitness of cost-efficient brain functional networks, PNAS.

- small-world propensity (unbiased assessment of small-world structure in networks of varying densities) -> developed by Muldoon, Bridgeford and Bassett (http://arxiv.org/abs/1505.02194)

3. Finally, you can do *directed analyses* (graph metrics and raw matrix calculations) if you input e.g. directed granger causality matrices!

4. *Added "CheckFrag"*: will check if network fragmentation with respect to the settings in your network construction occur

5. GraphVar now *saves more output files *when doing sliding window analyses (not only the dynamic summary measure as before) and will also save all results when only "calculate and Export" for further usage.

Files in your interim results folder are now (depending on what computations you do here with clustering_coeff as example):

- clustering_coef_bu_4.9_1.mat: dynamic summary measure (e.g. variance) of clustering_coef_bu across windows for each node on threshold 0.49 for all subjects

- clustering_coef_bu_4.9_1per_SW.mat: the (normalized) clustering_coef_bu for each node in each of the sliding windows on threshold 0.49 for all subjects

- clustering_coef_bu_4.9_1-rand1.mat: dynamic summary measure (e.g. variance) of clustering_coef_bu across windows for each node in the first random network on threshold 0.49 for all subjects

- clustering_coef_bu_4.9_1-rand_per_SW.mat: the clustering_coef_bu for each node in each random network in each of the sliding windows on threshold 0.49 for all subjects (i.e., cell comprised of: subjects x random networks x sliding windows)

6. *Changed the normalization procedure for dynamic summary measures* (this does not include "nodal flexibility/promiscuity":

- OLD normalization procedure: the dynamic summary measure of the orig. data was devided by the mean of the dynamic summary measure of the random data (there was a lot of information loss)

- NOW: first, per sliding window graph metrics are normalized as usual by division of the mean of the same graph metric derived in random networks in the same sliding window. Second, the dynamic summary measure is calculated across sliding windows of the beforehand normalized graph metrics.

357

Thu, 06/22/2017 - 02:52

Permalink

## Thank you for your reply. i

Thank you for your reply. i update my GraphVar to 1.03. there is no previous error, but a new error occured that when pressing calculate variables and export, the error is occuring. I don't know what's happend? Can you help me again?

Johann Kruschwitz

Thu, 06/22/2017 - 09:04

Permalink

## update your MATLAB version

Hey,

the error you report occurs as you are using an old MATLAB version that does not support our interactive waitbar. Please update your MATLAB to 2014 or above.

Best,

Johann

Johann Kruschwitz

Wed, 06/28/2017 - 09:37

Permalink

## Matlab2017

Hi,

actually the programm should detect which Matlab version you are using and switch to the respective commands for enabling parallel computing.

Maybe the version identifier also changed with Matlab 2017 ... I will check this if I have time available and rewrite the script (I dont have updated to 2017 yet).

From your error post it seems as if you have the parallel computing toolbox. So to solve this quickly, you could uncomment lines 14 - 24 in the script "isParallel.m" under GraphVar-1.03\src\calc. Another (not preferable) option would be to deinstall the parallel computing toolbox.

Please let me know if this works.

Best,

Johann

johliesl

Wed, 06/28/2017 - 18:20

Permalink

## Re: [RFMRI] GraphVar - a user

Hello!

Nefasto

Thu, 08/10/2017 - 12:31

Permalink

## GraphVar and structural data

Hi Johann,

First of all, thank you for your effort to provide a GUI-based toolbox for people with poor scripting abilities like me.

I found a previous comment (dating about 2 years ago) saying that GraphVar can be used for structural data too, but that creation of connectivity matrices relies on other software, as GraphVar has been developed for functional data.

Indeed, I was interested in using GraphVar on DTI and cortical data extracted by Freesurfer. I was wondering if the most recent version of the software now allows to process structural data from the beginning to the end or if connectivity matrices still require other software. In the latter case, have you got any suggestion to extract them in an easy way?

Best regards,

Stefano

Johann Kruschwitz

Fri, 08/18/2017 - 09:01

Permalink

## Structural Data

Hi,

thanks for using GrapVar! Unfortunatelly, the main focus still is on creation of conn matrices with functional data. Therefore, I repost my previous answer here:

You can very well use GraphVar for graph theoretic analyses of structural connectivity data. However, the GraphVar “generate conn matrix” function is specifically written for generating connectivity matrices (nxn matrix) from time series data. Thus, you cannot use GraphVar for generating nxn matrices from structural data. Best would be that you use some other program (e.g. DoDTI or ExploreDTI) to construct a structural connectivity matrix (e.g. a matrix capturing the amount of fiber tracts from region to region) that you subsequently load into GraphVar (for GraphVar the kind of matrix does not really matter as long as it is a symmetric nxn matrix). Once you have defined your nxn matrices you can make use of all the graph theoretic functions in GraphVar.

I know that ExploreDTI (http://www.exploredti.com/) has some specific output functions that allow exporting various nxn matrices that can be used for graph theoretic analysis (e.g in GraphVar). Alternatively I think that Mnet (http://neuroimage.yonsei.ac.kr/mnet/) or GAT (http://www.plosone.org/article/info%3Adoi%2F10.1371%2Fjournal.pone.0040709) specifically entail pipelines for graph theoretical analysis of structural data.

I hope this helps,

Johann

Nefasto

Thu, 08/31/2017 - 10:04

Permalink

## Hi Johann,

Hi Johann,

Thank you for the clarifications!

All the best,

Stefano

SHS

Wed, 09/13/2017 - 11:53

Permalink

## Errors in GraphVar

Hello, Johann and the GraphVar team

When I run the GraphVar in my MATLAB, it showed up those errors in my command window:

## I used the old version (beta_v_06.2) and tried to use the latest version (v_1.03), but it didn't work.

Please help me! Thanks for your help!

Best regards,

SHS

Johann Kruschwitz

Wed, 09/13/2017 - 12:08

Permalink

## compatibility issue

Hi,

please remove the old GraphVar version from your Matlab path (i.e., the new version calls some old version of some scripts which have the same name). This should solve the problem.

Best,

Johann

SHS

Wed, 09/13/2017 - 14:10

Permalink

## Thanks for your help

Hello,

Oh, I got the answer!

When GraphVar conducted under the Matlab version above 2012, it can work.

Thanks!

Kate.Damme

Thu, 05/24/2018 - 16:49

Permalink

## GraphVar Error - Question

Hello and Thank you for this amazing tool and support!

I recently installed GraphVar on my Linux machine and was working through the sample data when it crashed halfway through the last stage of modeling. I’ve tried to track down this error, uninstalled and reinstalled the program, tried different versions and I continue to get the following:

Invalid MEX-file '/home/k/ksd770/Desktop/MATLAB/GraphVar_2.01/src/calc/tfun/tpinv.mexa64': /lib64/libc.so.6: version `GLIBC_2.14' not found (required by

/home/k/ksd770/Desktop/MATLAB/GraphVar_2.01/src/calc/tfun/tpinv.mexa64)

Error in graphvar_glm (line 494)

LXTXL = tpinv(tdot(tdot(L, XTX), tt(L)));

Error in executeStats (line 132)

[PFUN, RFUN, NFUN, ...

Error in GraphVar_corr (line 86)

[Files, LAB, N] = executeStats(allTasks, ...

Error in GraphVar>Btn_calcCorr_Callback (line 75)

GraphVar_corr(handles,allTask)

Error in gui_mainfcn (line 96)

feval(varargin{:});

Error in GraphVar (line 40)

gui_mainfcn(gui_State, varargin{:});

Error in @(hObject,eventdata)GraphVar('Btn_calcCorr_Callback',hObject,eventdata,guidata(hObject))

Error while evaluating uicontrol Callback

I'm new to GraphVar and would appreciate any advice or insight!

Kate.Damme

Thu, 05/24/2018 - 16:49

Permalink

## GraphVar Error - Question

Hello and Thank you for this amazing tool and support!

I recently installed GraphVar on my Linux machine and was working through the sample data when it crashed halfway through the last stage of modeling. I’ve tried to track down this error, uninstalled and reinstalled the program, tried different versions and I continue to get the following:

Invalid MEX-file '/home/k/ksd770/Desktop/MATLAB/GraphVar_2.01/src/calc/tfun/tpinv.mexa64': /lib64/libc.so.6: version `GLIBC_2.14' not found (required by

/home/k/ksd770/Desktop/MATLAB/GraphVar_2.01/src/calc/tfun/tpinv.mexa64)

Error in graphvar_glm (line 494)

LXTXL = tpinv(tdot(tdot(L, XTX), tt(L)));

Error in executeStats (line 132)

[PFUN, RFUN, NFUN, ...

Error in GraphVar_corr (line 86)

[Files, LAB, N] = executeStats(allTasks, ...

Error in GraphVar>Btn_calcCorr_Callback (line 75)

GraphVar_corr(handles,allTask)

Error in gui_mainfcn (line 96)

feval(varargin{:});

Error in GraphVar (line 40)

gui_mainfcn(gui_State, varargin{:});

Error in @(hObject,eventdata)GraphVar('Btn_calcCorr_Callback',hObject,eventdata,guidata(hObject))

Error while evaluating uicontrol Callback

I'm new to GraphVar and would appreciate any advice or insight!

Kate.Damme

Thu, 05/24/2018 - 16:49

Permalink

## GraphVar Error - Question

Hello and Thank you for this amazing tool and support!

I recently installed GraphVar on my Linux machine and was working through the sample data when it crashed halfway through the last stage of modeling. I’ve tried to track down this error, uninstalled and reinstalled the program, tried different versions and I continue to get the following:

Invalid MEX-file '/home/k/ksd770/Desktop/MATLAB/GraphVar_2.01/src/calc/tfun/tpinv.mexa64': /lib64/libc.so.6: version `GLIBC_2.14' not found (required by

/home/k/ksd770/Desktop/MATLAB/GraphVar_2.01/src/calc/tfun/tpinv.mexa64)

Error in graphvar_glm (line 494)

LXTXL = tpinv(tdot(tdot(L, XTX), tt(L)));

Error in executeStats (line 132)

[PFUN, RFUN, NFUN, ...

Error in GraphVar_corr (line 86)

[Files, LAB, N] = executeStats(allTasks, ...

Error in GraphVar>Btn_calcCorr_Callback (line 75)

GraphVar_corr(handles,allTask)

Error in gui_mainfcn (line 96)

feval(varargin{:});

Error in GraphVar (line 40)

gui_mainfcn(gui_State, varargin{:});

Error in @(hObject,eventdata)GraphVar('Btn_calcCorr_Callback',hObject,eventdata,guidata(hObject))

Error while evaluating uicontrol Callback

I'm new to GraphVar and would appreciate any advice or insight!

rkbhamilton

Fri, 06/29/2018 - 01:03

Permalink

## Blank threshold results box

Hello,

I would very much appreciate some guidance on a (hopefully quick fix!) error I have encountered: regardless of whether I use my own data or the provided sample data, the 'Threshold' box is blank on the Results Viewer (despite having selected thresholds in the 'Network thresholds' and 'Connectivity Thr.' boxes). I originally thought the issue might be with my version of Matlab (2016b), so I updated the program to 2018a and still encounter the error.

Additionally, Matlab shows the following error:

Any thoughts you have on how to fix this error would be much appreciated!

Thank you in advance for your help,

Rachel

Johann Kruschwitz

Mon, 07/02/2018 - 09:53

Permalink

## empty threshold box

Hi,

from the error it seems as if the programm does not find the path to the matrix with the p-values that indicate the threshold that you select. Thus, the box is empty. You will have to select the array of reference values as in described in the manual under "4.4. Connectivity Thr.).

I had the experience that this error occurs on linux sysrtems more often and not under windows.

Best,

Johann

rkbhamilton

Tue, 07/03/2018 - 17:36

Permalink

## Results Viewer Errors

Hello,I apologize if this is a duplicate message - despite refreshing my browser window my comment is not showing up on my screen. If it is a duplicate, please disregard.I would greatly appreciate any insight you might have into the following error: after running through the GraphVar GUI apparently successfully and going to the Results Viewer, there are no thresholds to select in the corresponding box. This occurs both with my own data and the provided sample data.Additionally, when I click on any of the variables in the Variables box in the Results Viewer, the following error arises:Index exceeds array bounds.Error in Results_PlotView (line 106)filterFieldStrings{3} = handles.thresholds(thresh);Error in Results>L_Var_Callback (line 299)Results_PlotView(hObject, handles)Error in gui_mainfcn (line 95)feval(varargin{:});Error in Results (line 34)gui_mainfcn(gui_State, varargin{:});Error inmatlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)Results('L_Var_Callback',hObject,eventdata,guidata(hObject))Error while evaluating UIControl Callback.And a similar error comes up when I click on the contents of the Graphvar box:Index exceeds array bounds.Error in Results_PlotView (line 106)filterFieldStrings{3} = handles.thresholds(thresh);Error in Results>L_Graph_Callback (line 301)Results_PlotView(hObject, handles)Error in gui_mainfcn (line 95)feval(varargin{:});Error in Results (line 34)gui_mainfcn(gui_State, varargin{:});Error inmatlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)Results('L_Graph_Callback',hObject,eventdata,guidata(hObject))Error while evaluating UIControl Callback.I am using Matlab2018a (I tried it also with Matlab2016b), and GraphVar 1.03.Any thoughts you have on this issue would be greatly appreciated!RachelJohann Kruschwitz

Thu, 07/05/2018 - 12:02

Permalink

## empty threshold box

Hi Rachel,

I would suggest updating to a newer GraphVar version above 1.03. I just checked and there was indeed a bug in the older versions occuring on Linux and Mac systems (windows unaffected) that could lead to an error when GraphVar tried to retrieve the selected thesholds from the GUI.

I think that we corrected this already in GraphVar 2.0. If the error still persists in a newer version please let me know. Thanks!

Best,

Johann

rkbhamilton

Thu, 07/05/2018 - 17:23

Permalink

## Now working!

Hi Johann,

Thanks so much for your quick response!

I updated to the most recent GraphVar version (2.01b) and it appears to be working!

Thanks again,

Rachel

rkbhamilton

Fri, 07/06/2018 - 00:35

Permalink

## tlstsq dgelsd error

Hi again Johann,

In trying to run a GLM on my data, I encountered the following error:

Error using tlstsqtlstsq dgelsd errorError in graphvar_glm/PFIT (line 514)[B, R] = tlstsq(X, Y);Error in executeStats (line 336)[P, F, B, SE] = PFUN(Y);Error in GraphVar_corr (line 86)[Files, LAB, N] = executeStats(allTasks, ...Error in GraphVar>Corr_Callback (line 86)GraphVar_corr(handles);Error in gui_mainfcn (line 95)feval(varargin{:});Error in GraphVar (line 40)gui_mainfcn(gui_State, varargin{:});Error inmatlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)GraphVar('Corr_Callback',hObject,eventdata,guidata(hObject))Error while evaluating UIControl Callback.Nan in Signals/CorrMatrix (caused by empty brain regions) will cause calculation tlstsq dgelsd error. However, I have reviewed my correlation matrices and my BrainRegions.xlsx file and have no missing data or invalid values.Johann Kruschwitz

Fri, 07/06/2018 - 11:21

Permalink

## tlstsq dgelsd error

Hi Rachel,

this error occurs when the GLM model cannot be fit with the data that enters the design matrix. This is rare but most likely to happen when there are some NaNs introduced somewhere in the pipeline. This can be in your input data (e.g. connectivity matrices), the variables sheet or also produced by GraphVar itself when some graph theroretical measures cannot be meaningful computed for particular individuals on the respective networks, or normalization leads to a division by zero. If you are using graph measures, you could have a look in the interim results folder and check if there are NaN graph metrics. A better way to check this, woul be to set a break point in line 514 in the GraphVar_glm script and to inspect Y for NaNs or Inf values (Y are the graph metrics and/or the connectivity matrices).

I hope this helps,

Johann

rkbhamilton

Fri, 07/06/2018 - 16:33

Permalink

## tlstsq dgelsd error

I'll give that a try - thanks!

rkbhamilton

Wed, 07/11/2018 - 17:18

Permalink

## Creating correlation matrices based on deconvolved signals

I realized that my previous comment was worded in a misrepresentative and unclear way. I will try to rephrase my question so it is clearer.

Thanks for all your support and for creating such a useful toolbox!

Johann Kruschwitz

Wed, 07/11/2018 - 08:34

Permalink

## connectivity matrix

Hi Rachel,

GraphVar needs real time courses per node [i.e., N time points) x (N nodes)] to compute connectivity matrices. Maybe I do not fully understand your problem but how should it be possible to compute measures of statistical dependence (e.g., correlation) between brain regions if you only have one number per brain region (as you wrote: 1x(N nodes) sized matrix) instead of a vector of numbers per brain region?

Best,

Johann

rkbhamilton

Sun, 08/12/2018 - 22:00

Permalink

## FDR correction

Hi Johann,

Thanks for such a useful toolbox and for your prompt responses on this site.

I am interested in reporting False Discovery Rate (FDR) adjusted p-values for my analyses. I noticed that, in the Results Viewer, the FDR option says the following: 'FDR - correction (None not applicably) (Parametric)'. Given that it is the only option that says "None not applicably", I want to confirm that this option is functional?

I also noticed that it only provides a FDR Corrected Alpha Level for analyses on the Raw Connectivity matrix (and not the graph metrics). I can, however, get a Bonferroni corrected alpha level for all sets of analyses.

Do you have any suggestions for troubleshooting?

Thank you in advance for your help!

## Pages