Stable insular spectral patterns underlie dynamic pain encoding in chronic neuropathic pain.
The 4 matches · 1 of them tie a paragraph to a whole file, not to given lines: a weak match, whose lines are not tinted
- [1] § Materials and methods › Spectral and functional connectivity analysis › Spectral analysis ↔ compute_psd_metrics.m, lines 1–54 · score 0.88 · Power spectral density, 13–30 Hz, 8–13 Hz, 1–4 Hz, 4–8 Hz, PSD
- [2] § Materials and methods › Spectral and functional connectivity analysis › Spectral analysis ↔ build_connectivity_longtable.m, lines 42–95 · score 0.76 · 13–30 Hz, 8–13 Hz, 1–4 Hz, 4–8 Hz, Welch, delta
- [3] § Materials and methods › Statistical analysis ↔ run_connectivity_lme_models.m, lines 1–66 · score 0.58 · pair day, Fisher, logit, aggregated, transformed, ipsilateral
- [4] § Materials and methods › Study participants ↔ run_all_analysis.m, the whole file · a weak match · score 0.57 · iEEG, chronic neuropathic pain, insular, day
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
MATLAB · 174 lines · 4.6 KB · MIT · 1 match
- function status = compute_epoch_psd_metrics(rootPath, subjectIDs, opts)
- % compute_epoch_psd_metrics
- %
- % Compute epoch-level power spectral density (PSD) metrics from
- % *_BipolarEEG_QC_Post.mat files.
- %
- % INPUT
- % rootPath : root data directory
- % subjectIDs : cell array of subject IDs
- %
- % OPTIONAL (opts)
- % opts.epochLenSec (default = 5)
- % opts.maxEpochs (default = 60)
- % opts.welch struct with fields:
- % .win, .noverlap, .nfft, .fmax
- % opts.writeOutputs (default = true)
- %
- % OUTPUT
- % Per subject:
- % *_PSD_PerChannel.csv
- % *_PSD_ByRegion_Day.csv
- % *_PSD_EpochLong.csv
- %
- % NOTES
- % Requires Signal Processing Toolbox (pwelch)
- % ---------------- defaults ----------------
- if nargin < 1 || isempty(rootPath)
- error('rootPath is required.');
- end
- if nargin < 2 || isempty(subjectIDs)
- error('subjectIDs must be provided.');
- end
- if nargin < 3 || isempty(opts)
- opts = struct();
- end
- if ~isfield(opts,'epochLenSec'), opts.epochLenSec = 5; end
- if ~isfield(opts,'maxEpochs'), opts.maxEpochs = 60; end
- if ~isfield(opts,'welch')
- opts.welch = struct('win',2048,'noverlap',1024,'nfft',8192,'fmax',55);
- end
- if ~isfield(opts,'writeOutputs'), opts.writeOutputs = true; end
- bands = struct( ...
- 'delta',[1 4], ...
- 'theta',[4 8], ...
- 'alpha',[8 13], ...
- 'beta',[13 30], ...
- 'gamma',[30 min(55,opts.welch.fmax)]);
- bandNames = fieldnames(bands)';
- status = struct('Subject',{},'Days',{},'EpochRows',{},'Warnings',{});
- % ================================================================
- for s = 1:numel(subjectIDs)
- subj = string(subjectIDs{s});
- inDir = fullfile(rootPath, subj, subj + "_setfiles");
- qcFile = fullfile(inDir, subj + "_BipolarEEG_QC_Post.mat");
- if exist(qcFile,'file') ~= 2
- warning('Missing QC file for %s', subj);
- continue;
- end
- L = load(qcFile);
- if ~isfield(L,'EEG_bipolar_QC') || isempty(L.EEG_bipolar_QC)
- warning('No bipolar QC data for %s', subj);
- continue;
- end
- EEGq = L.EEG_bipolar_QC;
- outDir = fullfile(rootPath, subj, 'PSD_Epochs');
- if opts.writeOutputs && ~exist(outDir,'dir')
- mkdir(outDir);
- end
- epochLong = [];
- for d = 1:numel(EEGq)
- E = EEGq{d};
- if isempty(E) || ~isfield(E,'data')
- continue;
- end
- X = double(E.data);
- fs = E.srate;
- [nChan, nSamp] = size(X);
- if nSamp < fs
- continue;
- end
- Nepoch = round(opts.epochLenSec * fs);
- nMax = min(opts.maxEpochs, floor(nSamp / Nepoch));
- if nMax < 1
- continue;
- end
- X = X(:,1:(Nepoch*nMax));
- % Welch setup
- w = opts.welch;
- wlen = min(w.win, Nepoch);
- ovlp = min(w.noverlap, floor(wlen/2));
- nfft = max(w.nfft, 2^nextpow2(wlen));
- fmax = min(w.fmax, fs/2);
- [~, fHz] = pwelch(zeros(Nepoch,1), hamming(wlen), ovlp, nfft, fs);
- useK = (fHz >= 0 & fHz <= fmax);
- fUse = fHz(useK);
- for c = 1:nChan
- xe = X(c,:) - mean(X(c,:), 'omitnan');
- xe = reshape(xe, Nepoch, nMax);
- for e = 1:nMax
- x = detrend(xe(:,e));
- [pxx,~] = pwelch(x, hamming(wlen), ovlp, nfft, fs);
- pUse = pxx(useK);
- pUse(pUse<=0) = eps;
- for b = bandNames
- band = b{1};
- fr = bands.(band);
- mask = fUse >= fr(1) & fUse < fr(2);
- if nnz(mask) < 2
- val = NaN;
- else
- val = 10*log10(trapz(fUse(mask), pUse(mask)));
- end
- row = struct();
- row.Subject = subj;
- row.DayIndex = d;
- row.Channel = c;
- row.Epoch = e;
- row.Band = band;
- row.Value = val;
- epochLong = [epochLong; row]; %#ok<AGROW>
- end
- end
- end
- end
- if isempty(epochLong)
- continue;
- end
- Tlong = struct2table(epochLong);
- if opts.writeOutputs
- outFile = fullfile(outDir, subj + "_PSD_EpochLong.csv");
- writetable(Tlong, outFile);
- fprintf('Saved PSD for %s\n', subj);
- end
- status(end+1) = struct( ...
- 'Subject', subj, ...
- 'Days', numel(EEGq), ...
- 'EpochRows', height(Tlong), ...
- 'Warnings', "" ); %#ok<AGROW>
- end
- end
compute_psd_metrics.m at commit a9e7743, under MIT · at the source
Overview
- Department of Neurological Surgery, University of Virginia School of Medicine, Charlottesville, VA 22908, USA
- Department of Neurology, University of Virginia School of Medicine, Charlottesville, VA 22908, USA
- Department of Anesthesiology, University of Virginia School of Medicine, Charlottesville, VA 22908, USA
Abstract
Chronic neuropathic pain persists for years yet fluctuates markedly from day to day, raising a fundamental question: how do stable neural patterns relate to dynamic pain experience? The insula is a central hub for pain processing, but it remains unclear whether ongoing pain is associated with enduring baseline neural patterns within the insula or day-to-day variation in neural activity.
We analysed multiday bilateral intracranial electroencephalography recordings from six individuals with chronic unilateral neuropathic pain, comprising 34 days of resting-state data. Spectral power, peak-derived spectral metrics and intra-insular functional connectivity (coherence and phase-locking value) were quantified across anterior and posterior insular subregions. Linear mixed-effects models were used to distinguish stable within-cohort neural patterns from within-subject, day-to-day pain-related fluctuations in pain intensity and unpleasantness, with explicit control for longitudinal temporal drift.
The insula exhibited stable within-cohort spectral organization characterized by an anterior–posterior gradient with lower posterior fast-band power and spectral slowing, together with greater posterior spectral power in the hemisphere contralateral to the chronic pain side. Superimposed on this stable pattern, daily pain intensity was most strongly associated with increased contralateral posterior alpha power, accounting for approximately 33% of within-subject variance. Pain unpleasantness showed its strongest association with increased contralateral posterior beta power, accounting for approximately 19% of within-subject variance. Peak-derived spectral metrics and intra-insular connectivity largely reflected stable baseline patterns, with comparatively modest day-to-day pain-related variation.
These exploratory findings suggest that chronic neuropathic pain is associated with stable insular spectral patterns upon which frequency-specific oscillatory variation relates to daily pain experience. Posterior insular alpha and beta oscillations showed partially distinct associations with pain intensity and unpleasantness, respectively, whereas intra-insular connectivity primarily reflected stable network structure. Posterior insular spectral power may therefore provide a candidate physiological signal for tracking pain states.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 4 matches between paragraphs and lines of code.
UVA-LIU/UVA-LIU-uva-insular-iEEG-neuropathic-pain-analysis
a9e7743c02a909f149875feb810ba3a0ca7bf5c3, 28 April 2026Availability: 1 check, the latest on 26 September 2026: the link answers
- 26 September 2026: the link answers
9 files
- build_bipolar_montage.m, MATLAB, 427 lines
- build_connectivity_longt
able.m , MATLAB, 196 lines, 1 match - compute_psd_metrics.m, MATLAB, 174 lines, 1 match
- run_all_analysis.m, MATLAB, 83 lines, 1 match
- run_bipolar_qc.m, MATLAB, 174 lines
- run_connectivity_lme_mod
els.m , MATLAB, 422 lines, 1 match - run_psd_lme_models.m, MATLAB, 303 lines
- LICENSE, License, 21 lines
- README.md, Text, 128 lines
The paper's code and data availability statement is in the Data section.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 7 scripts, each with its path and the digest of its content;
- 4 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Data availability
Data are available from the corresponding author upon reasonable request. The dataset is currently being prepared for public release via the DABI repository. Code used for preprocessing, spectral analysis, connectivity analysis, aperiodic residual analysis and statistical modelling is available at https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 5 authors, 5 keywords, 1 funder, 21 references.
Cite
This paper
Liu, C.-C., Quigg, M., Finan, P. H., Moosa, S., & Elias, W. J. (2026). Stable insular spectral patterns underlie dynamic pain encoding in chronic neuropathic pain. Brain communications, 8(4), fcag299. https://
BibTeX
@article{liu2026stable,
author = {Liu, Chang-Chia and Quigg, Mark and Finan, Patrick H and Moosa, Shayan and Elias, W Jeffrey},
title = {{Stable insular spectral patterns underlie dynamic pain encoding in chronic neuropathic pain}},
journal = {Brain communications},
year = {2026},
month = aug,
volume = {8},
number = {4},
pages = {fcag299},
publisher = {Oxford University Press},
issn = {2632-1297},
doi = {10.1093/
url = {https://
pmid = {42582622},
pmcid = {PMC13457931}
}
RIS
TY - JOUR
AU - Liu, Chang-Chia
AU - Quigg, Mark
AU - Finan, Patrick H
AU - Moosa, Shayan
AU - Elias, W Jeffrey
TI - Stable insular spectral patterns underlie dynamic pain encoding in chronic neuropathic pain
T2 - Brain communications
J2 - Brain Commun
PY - 2026
DA - 2026/
VL - 8
IS - 4
SP - fcag299
SN - 2632-1297
PB - Oxford University Press
DO - 10.1093/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1093/
"type": "article-journal",
"title": "Stable insular spectral patterns underlie dynamic pain encoding in chronic neuropathic pain",
"container-title": "Brain communications",
"author": [
{
"family": "Liu",
"given": "Chang-Chia"
},
{
"family": "Quigg",
"given": "Mark"
},
{
"family": "Finan",
"given": "Patrick H"
},
{
"family": "Moosa",
"given": "Shayan"
},
{
"family": "Elias",
"given": "W Jeffrey"
}
],
"container-title-short":
"volume": "8",
"issue": "4",
"page": "fcag299",
"DOI": "10.1093/
"PMID": "42582622",
"PMCID": "PMC13457931",
"ISSN": "2632-1297",
"publisher": "Oxford University Press",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
8,
3
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1038/s41467-026-71568-9 [code]
- Convergent and selective representations of pain, appetitive processes, aversive processes, and cognitive control in the insula.Journal: Nature communicationsIn common: Statistics and Machine Learning Toolbox, pain, 3 references
- [2] doi:10.1093/braincomms/fcag220 [code]
- When pain becomes self: limbic-default mode network hyperconnectivity predicts microvascular decompression failure in trigeminal neuralgia.Journal: Brain communicationsIn common: Statistics and Machine Learning Toolbox, pain, 2 references
- [3] doi:10.1016/j.ynirp.2026.100366 [code]
- Lower resting-state functional connectivity between frontoparietal and sensory networks is associated with recent pain intensity in a community sample of youth.Journal: Neuroimage. ReportsIn common: pain, 2 references
- [4] doi:10.1111/ejn.70521 [code]
- Multivariate Pattern Analysis Identifies Potential Intertrial Resting-State EEG Biomarkers in Fibromyalgia.Journal: The European journal of neuroscienceIn common: pain, 2 references
- [5] doi:10.1038/s41467-026-75359-0 [code]
- Neural mechanisms of time-forward predictions for naturalistic auditory tone sequences.Journal: Nature communicationsIn common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, 1 reference
- [6] doi:10.1038/s41593-026-02345-6 [code]
- Human hippocampal ripples tune cortical responses based on predicted uncertainty.Journal: Nature neuroscienceIn common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, 1 reference
- [7] doi:10.1073/pnas.2603966123 [code]
- Oxytocin selectively biases sensory-prefrontal communication through network-level suppression and theta coupling.Journal: Proceedings of the National Academy of Sciences of the United States of AmericaIn common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, 1 reference
- [8] doi:10.1038/s41467-026-71725-0 [code]
- Interactions across hemispheres in prefrontal cortex reflect global cognitive processing.Journal: Nature communicationsIn common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, 1 reference
- [9] doi:10.7554/elife.108408 [code]
- Frequency and laminar profile of feature-specific visual activity revealed by interleaved EEG-fMRI.Journal: eLifeIn common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, 1 reference
- [10] doi:10.1038/s41467-026-73916-1 [code]
- Learned statistical regularity modulates anticipatory micro-saccades toward suppressed distractor locations.Journal: Nature communicationsIn common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, 1 reference
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 7 scripts, and 4 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:e98dd9af70cb24b9…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
