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.









Similar content being viewed by others
Notes
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)).
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)”).
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.
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).
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.
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
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
Akaike, H. (1974). A new look at the statistical model identification. IEEE Transactions on Automatic Control, 19(6), 716–723.
Albanese, D., Filosi, M., Visintainer, R., Riccadonna, S., Jurman, G., & Furlanello, C. (2013). minerva and minepy: a C engine for the MINE suite and its R, Python and MATLAB wrappers. Bioinformatics, 29(3), 407–408. doi:10.1093/bioinformatics/bts707.
Allefeld, C., & Bialonski, S. (2007). Detecting synchronization clusters in multivariate time series via coarse-graining of Markov chains. Physical Review E, 76(6), 066207. doi:10.1103/PhysRevE.76.066207.
Allefeld, C., Muler, M., & Kurths, J. (2007). Eigenvalue decomposition as a generalized synchronization cluster analysis. International Journal of Bifurcation and Chaos, 17(10), 3493–3497. doi:10.1142/S0218127407019251.
Andrzejak, R. G., Kraskov, A., Stogbauer, H., Mormann, F., & Kreuz, T. (2003). Bivariate surrogate techniques: Necessity, strengths, and caveats. Physical Review E, 68(6), 66202. doi:10.1103/PhysRevE.68.066202.
Arnhold, J. (1999). A robust method for detecting interdependences: application to intracranially recorded EEG. Physica D, 134(4), 419–430. doi:10.1016/S0167-2789(99)00140-2.
Baccalá, L., & Sameshima, K. (2001). Partial directed coherence: a new concept in neural structure determination. Biological Cybernetics, 84(6), 463–474. doi:10.1007/PL00007990.
Bajo, R., Castellanos, N. P., López, M. E., Ruiz, J. M., Montejo, P., Montenegro, M., et al. (2012). Early dysfunction of functional connectivity in healthy elderly with subjective memory complaints. Age, 34(2), 497–506. doi:10.1007/s11357-011-9241-5.
Bendat, J. S., & Piersol, A. G. (2010). Random Data: Analysis and Measurement Procedures (4th ed.). Wiley Interscience.
Benjamini, Y., & Hochberg, Y. (1995). Controlling the false discovery rate: a practical and powerful approach to multiple testing. Journal of the Royal Statistical Society. Series B, 57(1), 289–300.
Benjamini, Y., & Yekutieli, D. (2001). The control of the false discovery rate in multiple testing under dependency. The Annals of Statistics, 29(4), 1165–1188.
Bhattacharya, J., Pereda, E., & Petsche, H. (2003). Effective detection of coupling in short and noisy bivariate data. IEEE Transactions on Systems, Man and Cybernetics B, 33(1), 85–95. doi:10.1109/TSMCB.2003.808175.
Bialonski, S., & Lehnertz, K. (2006). Identifying phase synchronization clusters in spatially extended dynamical systems. Physical Review E, 74(5), 51909. doi:10.1103/PhysRevE.74.051909.
Bruns, A. (2004). Fourier-, Hilbert- and wavelet-based signal analysis: are they really different approaches? Journal of Neuroscience Methods, 137(2), 321–332. doi:10.1016/j.jneumeth.2005.03.001.
Bullmore, E., & Sporns, O. (2009). Complex brain networks: graph theoretical analysis of structural and functional systems. Nature Reviews Neuroscience, 10(3), 186–198. doi:10.1038/nrn2575.
Buzug, T., Pawelzik, K., von Stamm, J., & Pfister, G. (1994). Mutual information and global strange attractors in Taylor-Couette flow. Physica D, 72(4), 343–350.
Chatfield, C. (1996). The analysis of time series: an introduction (5th ed.). Chapman & Hall.
Chicharro, D., & Andrzejak, R. G. (2009). Reliable detection of directional couplings using rank statistics. Physical Review E, 80(2), 1–5. doi:10.1103/PhysRevE.80.026217.
Curran-Everett, D. (2000). Multiple comparisons: philosophies and illustrations. American Journal of Physiology. Regulatory, Integrative and Comparative Physiology, 279(1), R1–R8.
Delorme, A., & Makeig, S. (2004). EEGLAB: an open source toolbox for analysis of single-trial EEG dynamics including independent component analysis. Journal of Neuroscience Methods, 134(1), 9–21. doi:10.1016/j.jneumeth.2003.10.009. Toolbox available at http://sccn.ucsd.edu/eeglab/.
Delorme, A., Mullen, T., Kothe, C., Akalin Acar, Z., Bigdely-Shamlo, N., Vankov, A., et al. (2011). EEGLAB, SIFT, NFT, BCILAB, and ERICA: new tools for advanced EEG processing. Computational Intelligence and Neuroscience, 2011, 130714. doi:10.1155/2011/130714.
Di Bernardi, C., Nolte, G., & Bhattacharya, J. (2013). High-learners present larger mid-frontal theta power and connectivity in response to incorrect performance feedback. The Journal of Neuroscience, 33(5), 2029–2038. doi:10.1523/JNEUROSCI.2565-12.2013.
Ding, M., Bressler, S. L., Yang, W., & Liang, H. (2000). Short-window spectral analysis of cortical event-related potentials by adaptive multivariate autoregressive modeling: data preprocessing, model validation, and variability assessment. Biological Cybernetics, 83(1), 35–45. doi:10.1007/s004229900137.
Ernst, M. D. (2004). Permutation methods: a basis for exact inference. Statistical Science, 19(4), 676–685. doi:10.1214/088342304000000396.
Frenzel, S., & Pompe, B. (2007). Partial mutual information for coupling analysis of multivariate time series. Physical Review Letters, 99(20), 1–4. doi:10.1103/PhysRevLett.99.204101.
Friston, K. J. (1994). Functional and effective connectivity in neuroimaging: a synthesis. Human Brain Mapping, 2(1–2), 56–78. doi:10.1002/hbm.460020107.
Friston, K. J. (2011). Functional and effective connectivity: a review. Brain Connectivity, 1(1), 13–16. doi:10.1089/brain.2011.0008.
Gabor, D. (1946). Theory of communication. Communication Theory, 93(26), 429–457. doi:10.1049/ji-3-2.1946.0074.
Genovese, C. R., Lazar, N. A., & Nichols, T. (2002). Thresholding of statistical maps in functional neuroimaging using the false discovery rate. NeuroImage, 15(4), 870–878. doi:10.1006/nimg.2001.1037.
Geweke, J. (1982). Measurement of linear dependence and feedback between multiple time series. Journal of the American Statistical Association, 77, 304–313.
Gomez-Herrero, G., Wu, W., Rutanen, K., Soriano, M. C., Pipa, G., & Vicente, R. (2010). Assessing coupling dynamics from an ensemble of time series. Arxiv preprint, 1008.0539, 1008.0539. Toolbox available at http://www.tut.fi/tim
Granger, C. (1969). Investigating causal relations by econometric models and cross-spectral methods. Econometrica: Journal of the Econometric Society, 37(3), 424–438.
Haufe, S., Nikulin, V. V., Mueller, K.-R., & Nolte, G. (2013). A critical assessment of connectivity measures for EEG data: a simulation stud. NeuroImage, 64, 120–133. doi:10.1016/j.neuroimage.2012.09.036.
Hegger, R., Kantz, H., & Schreiber, T. (1999). Practical implementation of nonlinear time series methods: the TISEAN package. Chaos, 9(2), 413–435. Toolbox available at http://www.mpipks-dresden.mpg.de/~tisean/.
Hipp, J. F., Hawellek, D. J., Corbetta, M., Siegel, M., & Engel, A. K. (2012). Large-scale cortical correlation structure of spontaneous oscillatory activity. Nature Neuroscience, 15(6), 884–890. doi:10.1038/nn.3101.
Horwitz, B. (2003). The elusive concept of brain connectivity. NeuroImage, 19(2 Pt 1), 466–470. doi:10.1016/S1053-8119(03)00112-5.
Kamiński, M. J., & Blinowska, K. J. (1991). A new method of the description of the information flow in the brain structures. Biological Cybernetics, 65(3), 203–210.
Kantz, H., & Schreiber, T. (2004). Nonlinear Time Series Analysis (2nd ed.). Cambridge: Cambridge University Press.
Kennel, M. B., Brown, R., & Abarbanel, H. D. I. (1992). Determining embedding dimension for phase-space reconstruction using a geometrical construction. Physical Review A, 45(6), 3403–3411. doi:10.1103/PhysRevA.45.3403.
Kozachenko, L. F., & Leonenko, N. N. (1987). Sample estimate of the entropy of a random vector. Problems of Information Transmission, 23(1), 95–101.
Kraskov, A., Stögbauer, H., Grassberger, P., & Stoegbauer, H. (2004). Estimating mutual information. Physical Review E, 69(6), 1–16. doi:10.1103/PhysRevE.69.066138.
Lachaux, J. P., Rodriguez, E., Martinerie, J., & Varela, F. J. (1999). Measuring phase synchrony in brain signals. Human Brain Mapping, 8(4), 194–208.
Maris, E., & Oostenveld, R. (2007). Nonparametric statistical testing of EEG- and MEG-data. Journal of Neuroscience Methods, 164(1), 177–190. doi:10.1016/j.jneumeth.2007.03.024.
Marwan, N., Romano, M. C., Thiel, M., & Kurths, J. (2007). Recurrence plots for the analysis of complex systems. Physics Reports, 438(5-6), 237–329. doi:10.1016/j.physrep.2006.11.001. Toolbox available at http://tocsy.pik-potsdam.de/CRPtoolbox/.
Montez, T., Linkenkaer-Hansen, K., Van Dijk, B. W., & Stam, C. J. (2006). Synchronization likelihood with explicit time-frequency priors. NeuroImage, 33(4), 1117–1125. doi:10.1016/j.neuroimage.2006.06.066.
Mormann, F. (2000). Mean phase coherence as a measure for phase synchronization and its application to the EEG of epilepsy patients. Physica D, 144(3–4), 358–369. doi:10.1016/S0167-2789(00)00087-7.
Neumaier, A., & Schneider, T. (2001). Estimation of parameters and eigenmodes of multivariate autoregressive models. ACM Transactions on Mathematical Software, 27(1), 27–57. doi:10.1145/382043.382304.
Nichols, T. E., & Holmes, A. P. (2002). Nonparametric permutation tests for functional neuroimaging: a primer with examples. Human Brain Mapping, 15(1), 1–25. doi:10.1002/hbm.1058.
Nolte, G., Bai, O., Wheaton, L., Mari, Z., Vorbach, S., & Hallet, M. (2004). Identifying true brain interaction from EEG data using the imaginary part of coherency. Clinical Neurophysiology, 115, 2292–2307. doi:10.1016/j.clinph.2004.04.029.
Nolte, G., Ziehe, A., Nikulin, V., Schlögl, A., Krämer, N., Brismar, T., et al. (2008). Robustly estimating the flow direction of information in complex physical systems. Physical Review Letters, 100(23), 234101. doi:10.1103/PhysRevLett.100.234101. Matlab function available at http://doc.ml.tu-berlin.de/causality/.
Oostenveld, R., Fries, P., Maris, E., & Schoffelen, J.-M. (2011). FieldTrip: open source software for advanced analysis of MEG, EEG, and invasive electrophysiological data. Computational Intelligence and Neuroscience, Article ID, 156869. doi:10.1155/2011/156869. Toolbox available at http://fieldtrip.fcdonders.nl/.
Pascual-Marqui, R. D., Lehmann, D., Koukkou, M., Kochi, K., Anderer, P., Saletu, B., et al. (2011). Assessing interactions in the brain with exact low-resolution electromagnetic tomography. Philosophical Transactions. Series A, Mathematical, Physical, and Engineering Sciences, 369(1952), 3768–3784. doi:10.1098/rsta.2011.0081.
Pereda, E., Rial, R., & Gamundi, A. (2001). Assessment of changing interdependencies between human electroencephalograms using nonlinear methods. Physica D, 148, 147–158. doi:10.1016/S0167-2789(00)00190-1.
Pereda, E., Quiroga, R. Q., & Bhattacharya, J. (2005). Nonlinear multivariate analysis of neurophysiological signals. Progress in Neurobiology, 77(1–2), 1–37. doi:10.1016/j.pneurobio.2005.10.003.
Poline, J. B., Worsley, K. J., Evans, A. C., & Friston, K. J. (1997). Combining spatial extent and peak intensity to test for activations in functional imaging. NeuroImage, 5(2), 83–96. doi:10.1006/nimg.1996.0248.
Quiroga, R. Q., Arnhold, J., & Grassberger, P. (2000). Learning driver-response relationships from synchronization patterns. Physical Review E, 61(5 Pt A), 5142–5148. doi:10.1103/PhysRevE.61.5142.
Quiroga, R. Q., Kraskov, A., Kreuz, T., & Grassberger, P. (2002). Performance of different synchronization measures in real data: a case study on electroencephalographic signals. Physical Review E, 65(4), 1–14. doi:10.1103/PhysRevE.65.041903.
Reshef, D. N., Reshef, Y. A., Finucane, H. K., Grossman, S. R., McVean, G., Turnbaugh, P. J., et al. (2011). Detecting novel associations in large data sets. Science, 334(6062), 1518–1524. doi:10.1126/science.1205438.
Rose, J., Otto, T., & Dittrich, L. (2008). The Biopsychology-Toolbox: a free, open-source Matlab-toolbox for the control of behavioral experiments. Journal of Neuroscience Methods, 175(1), 104–107. doi:10.1016/j.jneumeth.2008.08.006. Toolbox available at http://biopsytoolbox.sourceforge.net/.
Rosenblum, M., & Pikovsky, A. (2001). Detecting direction of coupling in interacting oscillators. Physical Review E, 64(4), 045202. doi:10.1103/PhysRevE.64.045202. Toolbox available at http://www.stat.physik.uni-potsdam.de/~mros/damoco.html.
Rosenblum, M., Pikovsky, A., & Kurths, J. (1996). Phase synchronization of chaotic oscillators. Physical Review Letters, 76(11), 1804–1807.
Rosenblum, M., Cimponeriu, L., Bezerianos, A., Patzak, A., & Mrowka, R. (2002). Identification of coupling direction: application to cardiorespiratory interaction. Physical Review E, 65(4), 041909. doi:10.1103/PhysRevE.65.041909.
Rubinov, M., & Sporns, O. (2010). Complex network measures of brain connectivity: uses and interpretations. NeuroImage, 52(3), 1059–1069. doi:10.1016/j.neuroimage.2009.10.003. Toolbox available at https://sites.google.com/site/bctnet/.
Rulkov, N., Sushchik, M. M., & Tsimring, L. (1995). Generalized synchronization of chaos in directionally coupled chaotic systems. Physical Review E, 51(2), 980–994.
Runge, J., Heitzig, J., Marwan, N., & Kurths, J. (2012a). Quantifying causal coupling strength: a lag-specific measure for multivariate time series related to transfer entropy. Physical Review E, 86, 061121. doi:10.1103/PhysRevE.86.061121.
Runge, J., Heitzig, J., Petoukhov, V., & Kurths, J. (2012b). Escaping the curse of dimensionality in estimating multivariate transfer entropy. Physical Review Letters, 108, 258701. doi:10.1103/PhysRevLett.108.258701. Phyton routines available at http://tocsy.pik-potsdam.de/tigramite.php.
Sameshima, K., & Baccalá, L. (1999). Using partial directed coherence to describe neuronal ensemble interactions. Journal of Neuroscience Methods, 94(1), 93–103.
Schneider, T., & Neumaier, A. (2001). Algorithm 808: ARfit–-a MATLAB package for the estimation of parameters and eigenmodes of multivariate autoregressive models. ACM Transactions on Mathematical Software, 27(1), 58–65. doi:10.1145/382043.382316. Toolbox available at http://www.clidyn.ethz.ch/arfit/index.html.
Schreiber, T. (2000). Measuring information transfer. Physical Review Letters, 85(2), 461–464. doi:10.1103/PhysRevLett.85.461.
Schreiber, T., & Schmitz, A. (2000). Surrogate time series. Physica D, 142(3–4), 346–382. doi:10.1016/S0167-2789(00)00043-9.
Schwarz, G. (1978). Estimating the dimension of a model. The Annals of Statistics, 6(2), 461–464. doi:10.1214/aos/1176344136.
Seth, A. K. (2010). A MATLAB toolbox for Granger causal connectivity analysis. Journal of Neuroscience Methods, 186(2), 262–273. doi:10.1016/j.jneumeth.2009.11.020. Toolbox available at http://www.sussex.ac.uk/Users/anils/aks_code.htm.
Shannon, C. E. (1948). A mathematical theory of communication. Bell System Technical Journal, 27(3), 379–423.
Shannon, C. E., & Weaver, W. (1949). The mathematical theory of information. Urbana: University Press.
Smirnov, D., & Bezruchko, B. (2003). Estimation of interaction strength and direction from short and noisy time series. Physical Review E, 68(4), 046209. doi:10.1103/PhysRevE.68.046209.
Speed, T. (2011). A Correlation for the 21st Century. Science, 334(6062), 1502–1503. doi:10.1126/science.1215894.
Stam, C. J., & Van Dijk, B. W. (2002). Synchronization likelihood: an unbiased measure of generalized synchronization in multivariate data sets. Physica D, 163(3–4), 236–251. doi:10.1016/S0167-2789(01)00386-4.
Stam, C. J., & Van Straaten, E. C. W. (2012a). Go with the flow: use of a directed phase lag index (dPLI) to characterize patterns of phase relations in a large-scale model of brain dynamics. NeuroImage, 62(3), 1415–1428. doi:10.1016/j.neuroimage.2012.05.050.
Stam, C. J., & Van Straaten, E. C. W. (2012b). The organization of physiological brain networks. Clinical Neurophysiology, 123(6), 1067–1087. doi:10.1016/j.clinph.2012.01.011.
Stam, C. J., Nolte, G., & Daffertshofer, A. (2007). Phase lag index: assessment of functional connectivity from multi channel EEG and MEG with diminished bias from common sources. Human Brain Mapping, 28(11), 1178–1193. doi:10.1002/hbm.20346.
Tadel, F., Baillet, S., Mosher, J. C., Pantazis, D., & Leahy, R. M. (2011). Brainstorm: a user-friendly application for MEG/EEG analysis. Computational Intelligence and Neuroscience, 2011, Article ID 879716. doi:10.1155/2011/879716. Toolbox available at http://neuroimage.usc.edu/brainstorm.
Takens, F. (1981). Detecting strange attractors in turbulence. Dynamical Systems and Turbulence, Warwick 1980, 898(1), 366–381. doi:10.1007/BFb0091924.
Tass, P., Rosenblum, M. G., Weule, J., Kurths, J., Pikovsky, A., & Volkmann, J. (1998). Detection of n:m phase locking from noisy data: application to magnetoencephalography. Physical Review Letters, 81(15), 3291–3294. doi:10.1103/PhysRevLett.81.3291.
Theiler, J. (1986). Spurious dimension from correlation algorithms applied to limited time-series data. Physical Review A, 34, 2427–2432.
Theiler, J., Eubank, S., Longtin, A., Galdrikian, B., & Farmer, J. D. (1992). Testing for nonlinearity in time series: the method of surrogate data. Physica D, 58(1–4), 77–94. doi:10.1016/0167-2789(92)90102-S.
Thiel, M., Romano, M. C., Kurths, J., Rolfs, M., & Kliegl, R. (2006). Twin surrogates to test for complex synchronisation. Europhysics Letters, 75(4), 535–541. doi:10.1209/epl/i2006-10147-0.
Tukey, J. W. (1991). The philosophy of multiple comparisons. Statistical Science, 6(1), 100–116. doi:10.1214/ss/1177011945.
Vastano, J. A., & Swinney, H. L. (1988). Information transport in spatiotemporal systems. Physical Review Letters, 60(18), 1773–1776. doi:10.1103/PhysRevLett.60.1773.
Vicente, R., Wibral, M., Lindner, M., & Pipa, G. (2011). Transfer entropy-a model-free measure of effective connectivity for the neurosciences. Journal of Computational Neuroscience, 30(1), 45–67. doi:10.1007/s10827-010-0262-3.
Vinck, M., Oostenveld, R., Van Wingerden, M., Battaglia, F., & Pennartz, C. M. (2011). An improved index of phase-synchronization for electrophysiological data in the presence of volume-conduction, noise and sample-size bias. NeuroImage, 55(4), 1548–1565. doi:10.1016/j.neuroimage.2011.01.055.
Wiener, N. (1956). The theory of prediction. In E. F. Beckenbach (Ed.), Modern mathematics for the engineers (pp. 165–190). New York: McGraw-Hill.
Zhou, D., Thompson, W. K., & Siegle, G. (2009). MATLAB toolbox for functional connectivity. NeuroImage, 47(4), 1590–1607. Toolbox available at https://sites.google.com/site/functionalconnectivitytoolbox/.
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
Corresponding author
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
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
Published:
Issue Date:
DOI: https://doi.org/10.1007/s12021-013-9186-1