Skip to main content

HERMES: Towards an Integrated Toolbox to Characterize Functional and Effective Brain Connectivity

Abstract

The analysis of the interdependence between time series has become an important field of research in the last years, mainly as a result of advances in the characterization of dynamical systems from the signals they produce, the introduction of concepts such as generalized and phase synchronization and the application of information theory to time series analysis. In neurophysiology, different analytical tools stemming from these concepts have added to the ‘traditional’ set of linear methods, which includes the cross-correlation and the coherency function in the time and frequency domain, respectively, or more elaborated tools such as Granger Causality.

This increase in the number of approaches to tackle the existence of functional (FC) or effective connectivity (EC) between two (or among many) neural networks, along with the mathematical complexity of the corresponding time series analysis tools, makes it desirable to arrange them into a unified-easy-to-use software package. The goal is to allow neuroscientists, neurophysiologists and researchers from related fields to easily access and make use of these analysis methods from a single integrated toolbox.

Here we present HERMES (http://hermes.ctb.upm.es), a toolbox for the Matlab® environment (The Mathworks, Inc), which is designed to study functional and effective brain connectivity from neurophysiological data such as multivariate EEG and/or MEG records. It includes also visualization tools and statistical methods to address the problem of multiple comparisons. We believe that this toolbox will be very helpful to all the researchers working in the emerging field of brain connectivity analysis.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9

Notes

  1. There are other ways to obtain the phase of a real-valued signal, in particular by convolving it with a complex wavelet such as the Morlet. However, these different approaches to phase extraction are known to be roughly equivalent (see, e.g., (Bruns 2004)).

  2. Although this is normally the case, d and τ should not necessarily be the same for x(t) and y(t), but in the following, we assume that they are indeed equal for both signals. However, we will see later how it is possible to take a different value of d for x and y (see section “Transfer Entropy (TE)”).

  3. In case the signals are narrowband (i.e., they have been band-pass filtered to calculate the SL in a given frequency band), it is advisable to take into account the recommendations included in (Montez et al. 2006) for the values of all the parameters of this index.

  4. To get an idea of typical computational times, we have tested the current version of HERMES in Matlab® 2012b 64-bit (Windows® 8 Pro operating system) running on an Intel® CoreTM I7-3770 K CPU @ 3.5 GHz with 16 Gb RAM, and it takes less than 1 min per trial to calculate all the GS indexes from section “S Index” to “L Index”. (512 samples, 128 MEG sensors, d = 6, τ =7, k =10, w 1  = 8).

  5. To obtain an asymmetric (causal) estimation, delayed mutual information, (i.e. MI between one of the signals and a lagged version of another) has been proposed (Schreiber 2000; Vastano and Swinney 1988). This measure contains certain dynamical structure due to the time lag incorporated. Nevertheless, delayed mutual information has been pointed out to contain certain flaws such as problems due to a common history or shared information from a common input.

  6. In the original paper by Genovese et al. (2001), N c = V, as they study situations where only one comparison per voxel is performed to determine whether the voxel is significantly activated in a given group/situation. However, in the case of FC/EC indexes, N c is the number of different indexes, which equals V(V-1)/2 and V(V-1) for symmetric and asymmetric indexes, respectively

  7. This is conceptually similar to the currently very popular approach of regarding A as the adjacency matrix of a complex network which is then used to calculate the main parameters of the network (Bullmore and Sporns 2009; Stam and van Straaten 2012b). However, such an approach will not be covered in HERMES, as there is already at least one comprehensive Matlab® toolbox for this purpose (Rubinov and Sporns 2010)

References

Download references

Acknowledgments

We are very grateful to the generosity of many researchers who have made their code publicly available thereby contributing the initial seeds for HERMES. Among them, we are especially thankful to Dr. German Gómez-Herrero. We also acknowledge the role of Mr. Fernando Sanz, a former researcher of the Centre of Biomedical Technology, in the initial development of the toolbox.

We are also very grateful to the reviewers who perusal the original version of the manuscript and served as high quality beta testers of the toolbox, because they provided very useful feedback and comments that helped improving the quality of the work.

Role of the funding source

The authors acknowledge the financial support of the Spanish Ministry of Economy and Competitiveness through grants TEC2012-38453-CO4-01 and -03 and grant PSI2012-38375-C03-01 and the support of the Spanish Ministry of Science through grant PSI2009-14415-C03-01. Guiomar Niso has received the financial support of the Spanish Ministry of Education and Science through the FPU grant AP2008-02383. These funding sources have played no role in study design, the collection, analysis, and interpretation of data; in the writing of the report; and in the decision to submit the paper for publication.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Guiomar Niso.

APPENDIX: HERMES DATA STRUCTURE

APPENDIX: HERMES DATA STRUCTURE

A.1 Saved results

In HERMES, each created or imported project is stored in the folder Results in HERMES path. As commented in section “Project Creation”, each project is stored in a folder, named after it by replacing the non-valid characters for the underscore character. Inside the project folder, several files and folders are stored at different levels. The directory tree or these files is detailed in Fig. 9.

According to this, the main project folder contains a mat-file named project, containing the main project structure; a file named indexes.data, containing the calculated indexes; and a series of folders named in the form subject{n}, with {n} correlative integer numbers in zero-padded three digits form.

Each subject{n} folder contains the time series of a subject, with data for each condition stored separately in a mat-file with the name condition{n}.data, being {n} correlative integers indicating the condition index as stored in the project structure. The data in these files is stored in a normalized form, with zero mean and unity standard deviation. This standardization is required by the synchronization indexes to perform an accurate estimation of connectivity.

Each one of the condition files is analyzed separately, allowing the comparison among different subjects and conditions. The results of this analysis are stored in the indexes.data file, in a Matlab® structure with one entry for each calculated index. The data stored in each entry includes both the configuration used to calculate the indexes and the obtained value, for each subject and condition, along with the (optional) significance level.

A.2 Project structure

The project mat-file contains only the metadata of the project. This file does not contain any time series or results, to minimize memory requirements. As already mentioned, both the time series and the calculated indexes are stored in separated mat-files. The project structure is created as a combination of smaller structures. The metadata of the project is stored in different levels, as show in Fig. 9.

project mat-file: All the metadata information of the project is stored here.

  • project.version: String defining the version of HERMES where the project was created.

  • project.name: Name of the project, assigned by the user.

  • project.filename: Filename-friendly version of the project name, obtained by stripping out forbidden characters and replacing them by underscores.

  • project.date: Date and time of the creation of the project, in Matlab® clock format.

  • project.description: Description of the project provided for the user during the creation.

  • project.type: Type of the project: ‘continuous’ registration or data ‘with trials’.

  • project.origindata: Acquisition metadata obtained from the original files.

  • project.source: Origin from where the data were obtained.

  • project.baseline: Baseline duration (in milliseconds) in data with trials. In continuous data this value is always 0.

  • project.channels: Number of channels.

  • project.samples: Number of samples of the epoch.

  • project.time: Vector of the epoch times (in ms).

  • project.fs: Sampling rate (in Hertzs).

  • project.subjects: Cell array containing the name of each subject present in the project.

  • project.groups: Cell array containing the name of each group present in the project.

  • project.conditions: Cell array containing the name of each experimental condition present in the project.

  • project.statistical: Multidimensional structure with as many elements as subjects in the project. The fields of the structure are:

  • project.statistical.group: The group ID of the subject as listed in the project.groups cell array.

  • project.statistical.trials: Array containing the number of trials/epochs for each condition. Each element in the array corresponds with one condition, as listed in the project.conditions cell array.

  • project.statistical.check: Checksums of each file for this subject. This value is used to check the integrity of the mat-files.

  • project.sensors:

    • project.sensors.label: Labels indicating the name of the channels.

    • project.sensors.position: Tri-dimensional position of each channel, if known.

    • project.sensors.layout: Bi-dimensional position (and size) of the plots to draw the 2D layout and the connectivity plots.

    • project.sensors.order: List of channels selected from the mat-files and its order.

    • project.sensors.system: Name of the system layout selected in the creation of the project.

  • project.logs: Multidimensional structure containing the metadata of the session logs created in the execution of HERMES for this project. The fields of the structure are:

    • project.logs.filename: String containing the name of the file where the session log is stored.

    • project.logs.date: Array containing the creation date and time of the session log.

    • project.logs.description: String containing a description of the log content.

indexes.data mat-file: This file contains the description and parameters of the indexes calculated for the dataset. Each index is stored in a separated variable, named after its abbreviation (e.g. COR for Correlation index or GC for Granger Causality index). These variables contain a structure {index}, with the fields:

{index}

  • {index}.name: The complete name of the index and its abbreviation.

  • {index}.type: The family of the index.

  • {index}.date: Date and time when the index was calculated, in Matlab® clock format.

  • {index}.dimensions: Cell array containing the label of each dimension in the calculated matrix, along with the value of each step.

  • {index}.config: Structure containing the configuration used to calculate the index.

  • {index}.data: Cell array containing the computed results of the index for each subject and condition.

  • {index}.pval: Cell array containing the estimated p-values matrix for the values of the index for each subject and condition.

statistics.fdr and statistics.cbpt mat-file: These files contain the description and parameters of the statistical tests calculated for a certain index of the dataset. Each index is stored in a separated variable, named after its abbreviation (e.g. COR for Correlation index or GC for Granger Causality index). These variables contain a structure {index}, with the following fields:

{index}

  • {index}.name: The complete name of the statistical method used and its abbreviation.

  • {index}.date: Date and time when the index was calculated, in Matlab® clock format.

  • {index}.NFIX: Fix ‘Groups’ or ‘Conditions’.

  • {index}.FIX: Name of the group or condition fixed.

  • {index}.G1: Name of one of the groups or conditions being compared.

  • {index}.G2: Name of the other group or condition being compared.

  • {index}.{FDR or CBPT}: Structure which contains the results obtained and the parameters used

  • type: ‘False discovery rate’ or ‘Non parametric permutation test’.

  • config: Structure containing the configuration used to calculate the statistics.

  • results: Results of the statistics for the selected groups.

The fields in this structure may vary along the versions of HERMES. Thus, a project created by a certain version cannot be readable by another one by directly copy the project folder inside the Projects directory. We encourage users to interchange projects between different runs of HERMES by using the export/import tools described in Section “Exporting the Results”. The structure fields for each version of the toolbox will always be available in the Documents section of the HERMES website.

Rights and permissions

Reprints and Permissions

About this article

Cite this article

Niso, G., Bruña, R., Pereda, E. et al. HERMES: Towards an Integrated Toolbox to Characterize Functional and Effective Brain Connectivity. Neuroinform 11, 405–434 (2013). https://doi.org/10.1007/s12021-013-9186-1

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s12021-013-9186-1

Keywords

  • Functional connectivity
  • Effective connectivity
  • Matlab toolbox
  • Electroencephalography
  • Magnetoencephalography
  • Multiple comparisons problem