PACTools
EEGLAB plug-in to compute Phase-Amplitude Coupling using different methods
Install / Use
/learn @sccn/PACToolsREADME
EEGLAB Event Related PACTools
The Event Related PACTools (PACTools) is an EEGLAB plug-in to compute phase-amplitude coupling in single subject data. In addition to traditional methods to compute PAC, the plugin include the Instantaneuous and Event-Related implementation of the Mutual Information Phase-Amplitude Coupling Method (MIPAC) (see Martinez-Cancino et al 2019). This toolbox was developed by the EEGLAB Team at the Swartz Center for Computational Neurosciences in UCSD, La Jolla, California, and is currently maintained by its main developer, Ramon Martinez-Cancino.
Table of Contents
- Phase-amplitude coupling in neurosciences
- Methods implemented in the toolbox
- Plugin architecture and workflow
- Demos
- Contributions and feedback
Phase Amplitude Coupling in Neuroscience
Cross-frequency coupling (CFC) could refer to any possible interaction between frequencies, phases, and amplitudes of oscillatory phenomena (Sotero, 2016). Most experimental work in this field has focused on three types of CFC: amplitude-amplitude coupling (AAC) or comodulation, phase-phase coupling (PPC) including bicoherence, and phase-amplitude coupling (PAC). Among them, PAC has attracted increasing interest given the growing amount of evidence of its potential role in brain information processing and its changes under pathological conditions, including epilepsy (López-Azcárate et al., 2010; De Hemptinne et al., 2013). In PAC, the instantaneous amplitude of a higher frequency band within a signal is modulated by (or otherwise linked to) the instantaneous phase of a lower-frequency band of the same (or a different) signal.
Methods Implemented in the Toolbox
Several methods have been proposed to address the computation of measures of Phase-Amplitude coupling, but none has been established as a gold standard. This fact explains to some extent why most of the major academic open-source programs for analyzing electroencephalographic data has implemented more than one method in its distribution (e.g., Fieldtrip, Brainstorm, MNE). This is not different in EEGLAB with PACTools. In PACTools we have implemented four of the most widely used measures: The Mean Vector Length Modulation Index (MVLmi) (Canolty et al., 2006), the Kullback-Leibler Modulation Index (KLmi) (Tort et al., 2010), the Phase-Locking Value (plv) (Lachaux et al., 1999), and the General Linear Model Modulation Index (GLMmi) (Penny et al., 2008a). The implementation of these ensures they can operate either in continuous and epoched signals. In the case of epoched signals, we use a scheme similar to the one proposed by Voytek et al., 2013 with the use of the method by (Penny et al., 2008) in the dimension of the trials (assuming a data matrix of dimensions equal to the number of trials by latencies). In addition to these measures, we have included the Mutual Information Phase Amplitude Coupling (MIPAC) (Martinez-Cancino et al., 2019) developed recently by our group. This method allows naturally for the computation of time-resolved PAC in both continuous and epoched data.
Continuous signal
In the table below are listed the methods implemented to compute PAC in continuous signals. References to the specific methods are listed in the second row of the table. A note on the dimension of the PAC values has been indicated in the third row of the table.
| Method | Reference | Output Dimension | | --------- | ----------- | -------------- | | Mean Vector Length Modulation Index | Canolty et al., 2006 | Single value | | Kullback-Leibler Modulation Index | Tort et al., 2010 | Single value | | General Linear Model Modulation Index | Penny et al., 2008 | Single value | | Phase Locking Value | Lachaux et al., 1999 | Single value | | Instantaneous Mutual Information PAC | Martinez-Cancino et al., 2019 | Unidimensional |
Epoched signal
In the table below are listed the current methods implemented in the toolbox to estimate PAC in epoched data. Epoched data is usually the result of extracting snippets of signals time-locked to an event(s) of interest. Here epoched data is assumed as being formated as a data matrix with dimensions of number of epochs(trials) by number of latencies(timepoints). The first four methods listed in the table are a natural extension of the methods listed in the previous section but applying them onto each latency along the dimension of the epochs. The first application of this scheme was proposed by Voytek et al., 2013 as an extension of the method by Penny et al., 2008. These methods return a time series describing the 'average' PAC dynamics across all trials. For this type of data, the Event-related MIPAC method returns a PAC time series for each trial provided.
| Method | Reference | Output Dimension | | --------- | ----------- | -------------- | | Mean Vector Length Modulation Index | Canolty et al., 2006 | Unidimensional | | Kullback-Leibler Modulation Index | Tort et al., 2010 | Unidimensional | | General Linear Model Modulation Index | Voytek et al., 2013 | Unidimensional | | Phase Locking Value | Lachaux et al., 1999 | Unidimensional | | Event-Related Mutual Information PAC | Martinez-Cancino et al., 2019 | Bidimensional |
Plugin Architecture and Workflow
Plugin architecture
The plugin PACTools is developed as an EEGLAB plugin. Given this, it shares the same philosophy regarding the structure and hierarchy of the functions as well as data formats(.set) as EEGLAB. In PACTools, depending on their level of Matlab expertise, users can either interact only with the graphics interface (GUI), else they can call functions directly from the Matlab command line or write their own Matlab scripts using EEGLAB functions and structures. This arrangement defines the hierarchy implemented by the two-level functions used in PACTools.
PACTools comprises two top-level functions implemented to compute and visualize PAC respectively: pop_pac and pop_plotpac Called with no (or few) arguments (as from the EEGLAB GUI), these functions pops up a query window to gather additional parameter choices. These functions can also be called directly from the Matlab command line or from Matlab scripts.
The function pop_pac.m provides the front-end interface for the toolbox it also serves as the bridge to the inner layer function, eeg_pac.m. The function eeg_pac.m is, indeed, the core function of the PAC computation and is responsible for processing and parsing the input data and options in order to distribute it to the functions in charge of the computation of each of the PAC methods mentioned in the section Methods Implemented in the Toolbox.
Code acceleration. Computation of PAC can be a highly computationally intensive task. This is especially true when dealing with multiple frequencies for phases and amplitudes. To add to the workload, the computation when using epoched data (multiples trials) makes the computation even more demanding. To speed up the PAC computation in PACTool we have parallelized the code using the MATLAB Parallel Computing Toolbox. Direct access to High-performance computing through the Neurosciences Gateways (NSG) has also been implemented. By using this option, users with a valid account in NSG can submit their PAC computation to the HPC resources hosted at NSG directly from within PACTools. To take advantage of this new feature in addition of having a valid NSG account, the user needs to install the EEGLAB plug-in nsgportal
Plug-in setup
PACTools is a plugin to EEGLAB. Thus, its installation can be done directly from the EEGLAB plug-in manager (In the EEGLAB GUI see: File -> Manage EEGLAB extensions). An alternative way is by downloading PACTools files to the user's local computer. Th
