GUIfMRIGraphAnalysis is a graphical user interface that allows the user to define the parameters to create the connectivity matrices to analyze fMRI data, while simultaneously visualizing the resulting weighted or binary matrices. Binary connectivity matrices can be visualized as a function of density or threshold. The user can also define a community structure and restrict the analysis to a subset of brain regions. A list of the measures available for calculation is shown at the bottom of the interface. The fMRI graph analysis can be saved in a file **.fga* for future use within BRAPH; it also can be exported in xml format for use within other programs.

The layout of GUIfMRIGraphAnalysis is shown in figure __1__. It is composed of six main work areas:

**Menu**permits one to access the basic functionalities of GUIfMRIGraphAnalysis, including loading and saving an fMRI graph analysis.**Toolbar**gives direct access to some of the most commonly employed functionalities, in particular loading and saving an fMRI graph analysis as well as manipulating the graphic representations of the connectivity matrices.**Cohort panel**permits one to select an fMRI cohort for the graph analysis or, if already selected, to view the cohort properties in GUIfMRICohort.**Graph analysis panel**permits one to choose the properties of the graph analysis, to set a community structure, and to choose whether to perform the analysis on a subgraph.**Main panel**visualizes the connectivity matrix that will be used for the analysis.**Measures panel**shows the available measures for each type of graph (binary or weighted).

Example data and tutorial videos can be found on http://braph.org/videos/fmri/fmri-graph-analysis/

Getting StartedAs a first example of the use of GUIfMRIGraphAnalysis, we will proceed to import the fMRI cohort stored in the my_cohort.fc file. Then, we will define a binary undirected graph analysis with fixed density and positive Pearson correlation coefficients. We will further specify a dynamic community structure calculated with the Louvain algorithm by using the first subject group. Finally, we will choose to perform the analysis on the full connectivity matrix and save it as a **.fga* file.

- Push
**Select Cohort**to select an fMRI cohort as shown in figure__2__. The cohort must be in**.fc*format. After you select the file, the cohort panel is updated to show the properties of the cohort. The select button state is changed to**View Cohort**; pushing this button opens the uploaded cohort in GUIfMRICohort with restricted access (i.e. no further changes to the cohort are allowed). - Select
**BUD**from the ‘Graph’ popup menu in the graph analysis panel,**Pearson**from the ‘Correlation’ popup menu, and**zero**from the ‘Negative corrs.’ popup menu. With these settings, the connectivity matrix will be calculated using Pearson correlation coefficients where all negative coefficient are set to zero; this matrix will then be binarized at a fixed density.A number of settings are available to create different types of graph analysis.

More details about how these options affect the graphs can be found in chapter `Brain Graphs’. These options are accessible through the popup menus in the graph analysis panel:**Graph**sets the type of graph to be analyzed:–**WU**analyzes weighted undirected graphs.

–**BUT**analyzes binary undirected graphs, i.e. graphs whose connectivity matrixes are binarized by specifying the threshold.

–**BUD**analyzes binary undirected graphs. i.e. graphs whose connectivity matrixes are binarized by specifying the density.**Correlation**sets the correlation used to calculate connectivity matrix coefficients:–**Pearson**is the Pearson product-moment correlation coefficient.

–**Spearman**is the Spearman rank correlation coefficient.

–**Kendall**is the Kendall rank correlation coefficient.

–**partial Pearson**is the partial Pearson correlation coefficient.

–**partial Spearman**is the partial Spearman correlation coefficient.**Negative corrs.**sets how to deal with the negative correlation coefficients:–**zero**sets all negative correlation coefficients to zero.

–**none**leaves all negative correlation coefficients as as they are.^{[1]}

–**abs**replaces all negative correlation coefficients with their absolute values.

- Push
**Edit**in the panel ‘Define community structure’ to define a community structure. This opens a new interface where the parameters for the calculation of the community structure can be set. Check the**Dynamic structure**checkbox to define a dynamic structure, choose the Louvain algorithm, check the**Group**checkbox, and select the first group from the popup menu, as shown in figure__3__.The community structure interface consists of five main working areas as shown in figure__3__:**Menu**permits one to generate the brain view of the community structure. This can be customized using the standard MatLab plotting tools. The figure can then be exported in several standard graphic formats.**Toolbar**gives direct access to various brain views and allows the user to choose how to represent the brain regions (spheres, symbols, or labels).**Table panel**lists all brain regions and designates their participation to a particular module. By checking the corresponding checkbox, the brain regions can be assigned to different modules.**Brain view panel**visualizes the community structure on a brain surface. Different modules are represented with different colors.**Parameter panel**allows one to choose the parameters for the calculation of the community structure. The following parameters can be specified:–**Fixed structure**fixes the community structure. The same structure will be used throughout the analysis.

–**Dynamic structure**creates a dynamic structure with the specified parameters. The structure will be recalculated with the selected parameters whenever needed throughout the analysis.

–**Louvain algorithm**calculates structure using the Louvain algorithm.

–**Newman algorithm**calculates structure using the Newman algorithm.

–**Gamma.**Sets the parameter determining the resolution of the algorithm. The default setting is . Larger values () lead to more modules and smaller values () to less modules.

–**Group**, if checked, permits one to select the group whose data serve as basis for the community structure calculation.

–**Subject**, if checked, permits one to select the subject whose data serve as basis for the community structure calculation.

The structure is calculated by pushing**Calculate**and reset by pushing**Reset**. Once all parameters are choosen, the structure can be set by pushing**Set**.Alternatively, one can choose to perform the graph analysis with the default community structure by pushing**Default**. The default structure is a dynamic structure calculated with the Louvain algorithm with .

- To start the graph analysis on the full connectivity matrix, push
**Start analysis**. This opens a new interface, GUIMRIGraphAnalysisBUD, which allows one to calculate and visualize the graph measures. The details of this interface are discussed in chapter ‘fMRI Graph Analysis BUD’. After this, the parameters of the analysis become fixed and, if any change is needed, a new graph analysis with different parameters should be created. - The analysis can be performed only on a subset of brain regions. To do this, push
**Subgraph analysis**. This opens a new interface, shown in figure__4__, with five main working areas:**Menu**permits one to generate the subgraph brain view, which can be customized using the standard MatLab plotting tools. The figure can then be exported in several standard graphic formats.**Toolbar**gives direct access to various brain views and allows the user to choose how to represent the brain regions (spheres, symbols, or labels).**Table panel**shows all brain regions. If the checkbox next to a brain region is checked, the region is included into the subgraph.**Brain view panel.**Permits one to visualize the subgraph on a brain surface. The included brain regions are highlighted with an orange color.**Control panel**allows one to choose the parameters for the calculation of the community structure as follows: (1) choose a module as subgraph (modules from previously calculated community structure can be selected from the popup menu on the right); (2)**Set**sets the subgraph that will be used in the analysis; and (3)**Start analysis**starts the analysis by opening the corresponding interface (GUIMRIGraphAnalysisBUD, GUIMRIGraphAnalysisBUT and GUIMRIGraphAnalysisWU) depending on the graph type to be analysed. The analysis can performed only after the subgraph has been set.

**Select File Save**to save the fMRI graph analysis as a**.fga*file; alternatively you can also use the shortcut**Ctrl+S**or the**Save**icon on the toolbar.**Select File Open**to open an fMRI graph analysis previously saved with GUIfMRIGraphAnalysis; alternatively you can also use the shortcut**Ctrl+O**or the**Open**icon on the toolbar. Opening a**.fga*file with with GUIfMRIGraphAnalysis interface opens a new interface (i.e. GUIfMRIGraphAnalysisWU, GUIfMRIGraphAnalysisBUT, or GUIfMRIGraphAnalysisBUD) depending on the type of analysis specified (weighted undirected, binary undirected fixed threshold, or binary undirected fixed density, respectively).

Additional information

*Main Panel*

The main panel allows one to visualize the connectivity matrix based on the parameters specified by the set of checkboxes on the right (figure __1__). The available options are:

**Group**selects the group whose connectivity matrix to show.**Weighted correlation matrix**, if checked, visualizes the correlation coefficients between any two brain regions: warmer colors denote higher coefficients.**Histogram**shows the distribution of the correlation coefficients.**Binary correlation matrix (set density)**shows the binarized connectivity matrix at the set density (text field and slider below).**Binary correlation matrix (set threshold)**shows the binarized connectivity matrix at the set threshold (text field and slider below)**Rearrange to reflect community structure**rearranges the rows and columns of the connectivity matrix to reflect the community structures (i.e. keeping together regions belonging to the same module).**Divide communities**draws lines (squares around each module) to emphasize the division of the brain into different modules. This option is available only if the matrix has been previously rearranged to reflect the community structure by selecting the option**Rearrange to reflect community structure**.

Measures panel

The measures panel lists the measures (together with a short description) that are available for calculation given the kind of graph that has been selected (WU, BUT, BUD).

Menu

**File** provides various options for importing and saving an fMRI graph analysis:

**File Open**(**Ctrl+O**) opens a popup window to load an fMRI

graph analysis saved in**.fga*format.**File Close**(**Ctrl+C**) closes the GUIfMRIGraphAnalysis.**File Save**(**Ctrl+S**) saves the current fMRI graph analysis in**.fga*format.**File Save as**opens a popup window to save the current fMRI graph analysis in**.fga*format possibly in a different file.**File Import (xml)**imports an fMRI graph analysis from an xml file.**File Export (xml)**exports the current fMRI graph analysis to an xml file.

**Brain View Generate figure** (**Ctrl+F**) generates a figure that can be customized using the standard MatLab plotting tools. The figure can then be exported in several standard graphic formats.

**About About** provides information about the current version of GUIfMRIGraphAnalysis and BRAPH.

Toolbar

The toolbar provides different options to open and save the fMRI graph analysis as well as to visualize the connectivity matrix. It is shown in figure __5__.

*Open and Save commands*

These commands allow the user to open and save an fMRI graph analysis in the **.fga* format. These are equivalent to the open and save menu options in the **File** menu.

opens a popup window to load an fMRI graph analysis saved in **.fga* format.

saves the current graph analysis in **.fga* format.

*Visualization commands*

These commands allow the user to control the visualization of the graphical representations of the connectivity matrix.

zooms in image.

zooms out image.

drags image.

shows/hides data cursor.

shows the colorbar.

Watch also:

*Footnotes and references*

^{^}Not all measures can be calculated in the presence of negative correlation coefficients.