{"id":19252282,"url":"https://github.com/sccn/powpowcat","last_synced_at":"2026-03-10T06:02:58.127Z","repository":{"id":150759830,"uuid":"327720260","full_name":"sccn/PowPowCAT","owner":"sccn","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-25T21:37:09.000Z","size":5776,"stargazers_count":7,"open_issues_count":1,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-21T13:38:26.992Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sccn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-07T20:40:59.000Z","updated_at":"2024-07-25T21:37:12.000Z","dependencies_parsed_at":"2024-07-26T00:02:07.095Z","dependency_job_id":"b04098cd-7660-4069-97ea-05a8d22d7ebc","html_url":"https://github.com/sccn/PowPowCAT","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sccn/PowPowCAT","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sccn%2FPowPowCAT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sccn%2FPowPowCAT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sccn%2FPowPowCAT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sccn%2FPowPowCAT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sccn","download_url":"https://codeload.github.com/sccn/PowPowCAT/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sccn%2FPowPowCAT/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30326878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T05:25:20.737Z","status":"ssl_error","status_checked_at":"2026-03-10T05:25:17.430Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T18:26:14.100Z","updated_at":"2026-03-10T06:02:58.023Z","avatar_url":"https://github.com/sccn.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"images/PowPowCAT_31stEEGLABWorkshop.pdf\" class=\"image fit\"\u003e\u003cimg src=\"images/PowPowCAT_logo.png\" alt=\"\"\u003e\u003c/a\u003e\n(Click the cat to download presentation slides). The slides are from the 31st EEGLAB workshop, day two 'Time-frequency and connectivity analysis' (November 30, 2021). Artwork is by Mayumi and Makoto Miyakoshi. All rights reserved!\n\nThe PowPowCAT plugin for EEGLAB\n==============================================\n\nWhat it does:\n\n-   It computes within-IC cross-frequency power-power coupling\n    (covariance) called 'comodugram/comodulogram' (see references below)\n    for a single-subject continuous IC activation.\n-   The preprocessing pipeline is as follows:\n-   Performs Matlab spectrogram() (hence it requires Matlab Signal\n    Processing Toolbox) to compute spectrogram and power spectrum\n    density (PSD) as its temporal average using 1-s window with 50%\n    overlap and with modified () logarithmically-spaced frequency bins.\n\n```\ndeviationFromLog = 5;\nfreqBins = logspace(log10(1+deviationFromLog), log10([user_input_value]+deviationFromLog), 100)-deviationFromLog;\n```\n\n-   Finds boundary event in EEGLAB and removes the chunks that contain\n    boundaries.\n-   Compute median across all the chunks to compute robust spectra, and\n    compute the variance to discard 20% of chunks for cleaning.\n-   Compute covariance matrices of cross-frequency power spectrum for\n    all the ICs (hence pre-selecting ICs is recommended; see [this\n    page](https://sccn.ucsd.edu/wiki/Std_selectICsByCluster) for how to\n    perform it efficiently.)\n-   Performs permutation statistics by randomizing chunk (i.e.\n    datapoint) indices differently for each frequency bin to build\n    surrogate time-frequency data, apply the same covariance\n    calculation, and repeat these processes for 5,000 times. Finally,\n    the observed (i.e. the real) covariance values are tested against\n    the surrogate distribution using non-parametric method,\n    stat_surrogate_pvals(). For multiple comparison correction, false\n    discovery rate (FDR) is computed across all ICs and all pixels.\n-   By using mouse cursor, one can explore the frequency-frequency plot\n    interactively and intuitively. The combination of frequency ranges\n    as well as the correlation coefficient of the selected combination\n    are shown.\n-   The subsampled time-courses of the two frequencies are shown in the\n    bottom left plot.\n-   The scatter plot of the two time-series data are shown.\n\nReference paper and erratum\n===========================\n\n[Thammasan N, Miyakoshi M. (2020). Cross-frequency Power-Power Coupling\nAnalysis: A Useful Cross-Frequency Measure to Classify ICA-Decomposed\nEEG. *Sensors*. 20:7040 .](https://www.mdpi.com/1424-8220/20/24/7040)\n\nHere is an erratum: The equation (1) in the above paper misses the normalization term 1/k. Too bad I had not found it before I published it! \n\n\nHow to use it\n=============\n\n![Defaultgui.png](images/Defaultgui.png)\n\n1.  On the top left panel, choose whether you analyze electrode data or\n    ICA-decomposed data.\n2.  Enter the upper frequency limit in Hz.\n3.  Choose parametric method (Pearson's correlation coefficient) or\n    non-parametric method (Spearman's correlation coefficient). The\n    parametric method is sensitive but susceptible to outliers, while\n    the non-parametric method is robust but less sensitive. For further\n    details, please see our paper (Thammasan and Miyakoshi, 2020).\n4.  Set the number of iteration for the permutation test. Default is\n    5,000.\n5.  Press the button 'Precompute' to start precomputing. It may take\n    while, depending on how long your data is and how many\n    electrodes/ICs there are.\n6.  (Optional) When precompute is done, you may press the button on the\n    top middle panel to show the first 35 electrodes/ICs to see the\n    overview of the results.\n7.  On the top right panel, enter the index of electrode/IC to show the\n    results in the main interactive plotting panels. You may show the\n    raw correlation coefficients, those masked by p\\\u003c0.05 and by p\\\u003c0.01\n    after false discovery rate (FDR) correction.\n    \nBatch process from command line\n===============================\nThe plugin package contains calc_PowPowCAT() which takes EEG and other 4\nparameters as input and outputs EEG structure which contains\nEEG.etc.PowPowCAT under which precomputed PowPowCAT variables can be found.\n\nResults comparison\n==================\n\nThese are the selected independent components (ICs) with\nICLabel-generated probabilistic labels.\n\n![Scalptopos.png](images/Scalptopos.png)\n\nHere is the comparison between PPC Pearson's correlation coefficient\n(left) with Spearman's correlation coefficient (right). The input data\nwas continuous. The comodulogram is thresholded at FDR-corrected\np\\\u003c0.01. In the comodulogram, 11.5Hz-23.0Hz is selected. Note Pearson'\ncorrelation is slightly more sensitive. Pearson's correlation is\ncalculated after removing 20% of outliers, while Spearman's correlation\nis robust so data rejection is not applied.\n\n![Continuous_pearson.png](images/Continuous_pearson.png)![Continuous_pearson.png](images/Continuous_spearman.png)\n\nThe same comparison with the same but epoched data. The comodulogram is\nthresholded at FDR-corrected p\\\u003c0.05. In the comodulogram, 11.5Hz-23.0Hz\nis selected. Note that sensitivity is reduced in the epoched data\nanalysis.\n\n![Epoched_pearson.png](images/Epoched_pearson.png)![Epoched_pearson.png](images/Epoched_spearman.png)\n\nThe difference between the continuous and epoched data analysis is that\nfor the former, 1-s sliding window with overlap of 50% is applied to\nobtain spectrogram, while for the latter, each epoch served as windows\nto analyze. Generally, it is recommended that you go back to the\ncontinuous data and apply the analysis. The results from the\nsliding-window calculation capturing 'boundary' events are excluded to\navoid the boundary effect.\n\nDemonstration\n=============\n\nEEGLAB workshop tutorial data 'stern_125.set' was analyzed. The\ncontinuous 71-ch data were low-pass filtered at 50Hz, and non-brain ICs\nwere rejected manually. The overall results are shown below.\n\n![Stern125_scalptopos.png](images/Stern125_scalptopos.png)\n![Powpowcatfigure2.png](images/Powpowcatfigure2.png)\n\nFor example, IC6 and IC8 look similar in terms of their scalp topography\nand frequency spectra. However, when you compare their cross-frequency\npower correlations, the difference is clearer. Compare the difference of\n10Hz-20Hz peak in the bottom-left box bewtween IC6 and IC8.\n\n![Ic6vs8_redone.png](images/Ic6vs8_redone.png)\n![Powpowcatfigure5.png](images/Powpowcatfigure5.png)\n![Powpowcatfigure6_redone.png](images/Powpowcatfigure6_redone.png)\n\nThe analysis revealed complex cross-frequency power coupling structure\nin IC15 and IC21. For example, IC15 showed 11Hz, 22Hz, 33Hz, and 44Hz\npeaks as 2nd, 3rd, and 4th harmonics. Note that the 4th harmonics can be\nseen more clearly in the correation coefficient plot than that in the\nPSD plot, indicating better sensitivity of this method to detect\ncross-frequency power-power coupling structure.\n\n![Powpowcatfigure7.png](images/Powpowcatfigure7.png)\n\n\nGroup-level analysis (12/29/2021 added)\n========================================\n\nNick Dogris hired me to develop this part of the extention.  He donated it for public use (Thanks Nick!)\nThe first step is to apply a batch process on multiple .set files. This can\nbe done using a batch mode. From PowPowCAT menu, click the second item.\n\n![shot1.png](images/shot1.png)\n\nIt opens the following sub-window.\n\n![shot2.png](images/shot2.png)\n\nAt this stage, both electrode data and ICA-decomposed data are available.\nThe results from the calculation is stored under EEG.etc.PowPowCAT. Note that\nthis batch process overwrites the exising .set files. Note also that the\ntarget .set files must be in the single folder.\n\n\nWhen the batch process is finished, go to the next step. Note that from now on,\nonly ICA-decomposed results are supported because the solution uses dipole\ndensity plots.\n\n![shot3.png](images/shot3.png)\n![shot4.png](images/shot4.png)\n\nIn this sub-window, first push the top button. This promptes the user to select\nall the pre-computed data. By selecting all the data you want to include, it\nautomatically starts the next calculation for optimum clustering. It may take a\nfew minutes. Then the following result report pops up.\n\n![shot5.png](images/shot5.png)\n\nThese plots show results from evalution of optimality when the numbers of the\nclusters are varied from 5 to 15. There are three popular criterion used for\nthe k-means algorithm. The optimum points are highlighted with blue dots. In this\nexample, I choose 11 because Silhouette index shows a slight peak there. Based on\nthis decision, the default number is changed from 5 to 11. If you want, a part\nof the result we will see can be exported in an Excel file format by specifying\nthe output folder (the bottom pushbotton and the edit box).\n\n![shot6.png](images/shot6.png)\n\nBy pressing 'Visualizee the results' button, it generates the clustering results.\n\n![shot7.png](images/shot7.png)\n\nNote that it generates Matlab variable PowPowCAT in the base workspace by default.\nThis is a structure variable which contains basically all the results for the\nuser-defined optimum number of clusters. If the optional file export is also\nrequested, it save to the part of the output: dataset ID, within-subject IC indices,\nand the corresponding cluster indices.\n\n![shot8.png](images/shot8.png)\n\n\nReference\n=========\n\n[Thammasan N, Miyakoshi M. (2020). Cross-frequency Power-Power Coupling\nAnalysis: A Useful Cross-Frequency Measure to Classify ICA-Decomposed\nEEG. *Sensors*. 20:7040 .](https://www.mdpi.com/1424-8220/20/24/7040)\n\nLlinás RR, Ribary U, Jeanmonod D, Kronberg E, Mitra PP. (1999).\nThalamocortical dysrhythmia: A neurological and neuropsychiatric syndrome\ncharacterized by magnetoencephalography. *Proc Natl Acad Sci USA*.\n96:15222-15227\n\nSterman MB, Kaiser D. (2000). Comodulation: A new QEEG analysis metric\nfor assessment of structural and functional disorders of the central\nnervous system. *Journal of Neurotherapy*. 4:73-83.\n\nBuzsaki G, Buhl DL, Harris KD, Csicsvari J, Czeh B, Morozov A. (2003).\nHippocampal network patterns of activity in the mouse. *Neuroscience*.\n116:201-211.\n\nCsicsvari J, Jamieson B, Wise KD, Buzsaki G. (2003). Mechanisms of Gamma\nOscillations in the Hippocampus of the Behaving Rat. *Neuron*.\n37:311-322.\n\nThatcher RW, Biver CJ, North DM. (2004). EEG and Brain Connectivity: A\nTutorial. *Unpublished manuscript, PDF available online*.\n\nSullivan D, Csicsvari J, Mizuseki K, Montgomery S, Diba K, Buzsaki G.\n(2011). Relationships between hippocampal sharp waves, ripples, and fact\ngamma oscillation: infludence of dentate and entorhinal cortical\nactivity. *The Journal of Neuroscience*. 31:8605-8616.\n\nBuzsaki G, Wang X-J. (2012). Mechanisms of Gamma Oscillations. *Annu Rev\nNeurosci*. 35:203-225.\n\nJirsa V, Mueller V. (2013). Cross-frequency coupling in real and virtual\nbrain networks. *Frontiers in Computational Neuroscience*. 7:78.\n\nZobay O, Adjamian P. (2015). Source-Space Cross-Frequency\nAmplitude-Amplitude Coupling in Tinnitus. *BioMed Research\nInternational*. 2015:489619.\n\nYeh C-H, Lo MT, Hu K. (2016). Spurious cross-frequency\namplitude-amplitude coupling in nonstationary, nonlinear signals.\nPhysica A. 454:453-150.\n\nAcknowledgement\n===============\n\nI express my gratitude to Drs. Gyorgy Buzsaki and Tim Mullen for\ninformative communication.\n\n(This page was written by Makoto Miyakoshi)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsccn%2Fpowpowcat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsccn%2Fpowpowcat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsccn%2Fpowpowcat/lists"}