OSCR

Impaired sleep resilience underlies transient neural instability in insomnia disorder.

Code ↔ Paper

2 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 2 matches
  1. [1] § STAR★Methods › Quantification and statistical analysis › Containment: Cross frequency gating and pattern diversity ↔ ERPAC.py, lines 8 to 60 · score 0.68 · theta phase, 4–8 Hz, Event related, beta, circular, channel · Report a mismatch
  2. [2] § STAR★Methods › Quantification and statistical analysis › Containment: Cross frequency gating and pattern diversity ↔ tensorpac/methods/meth_erpac.py, lines 42 to 82 · score 0.64 · linear correlation, Event related phase, amplitude coupling, phase amplitude, circular, ERPAC · Report a mismatch

Paper

Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

Python · 77 lines · 2.7 KB · no license · 1 match

  1. import os
  2. import numpy as np
  3. import mne
  4. from tensorpac import EventRelatedPac
  5. from scipy.io import savemat
  6. def compute_erpac_for_all_channel_pairs(epochs, base_dir, source_filename):
  7. erpac_dir = os.path.join(base_dir, "ERPAC")
  8. if not os.path.exists(erpac_dir):
  9. os.makedirs(erpac_dir)
  10. print(f"创建目录: {erpac_dir}")
  11. data = 10e6 * epochs.get_data() # (n_epochs, n_channels, n_times)
  12. sfreq = epochs.info['sfreq']
  13. n_channels = data.shape[1]
  14. ch_names = epochs.info['ch_names']
  15. erpac_types = [
  16. {"name": "theta_phase_beta_amp", "f_pha": [4, 8], "f_amp": [12, 30]}
  17. ]
  18. for erpac_type in erpac_types:
  19. print(f"计算ERPAC类型: {erpac_type['name']}")
  20. erpac_matrix = np.zeros((n_channels, n_channels))
  21. for i in range(n_channels):
  22. for j in range(n_channels):
  23. phase_data = data[:, i, :] # (n_epochs, n_times)
  24. amp_data = data[:, j, :] # (n_epochs, n_times)
  25. rp_obj = EventRelatedPac(
  26. f_pha=erpac_type['f_pha'],
  27. f_amp=erpac_type['f_amp']
  28. )
  29. erpac = rp_obj.filterfit(
  30. sfreq,
  31. phase_data,
  32. amp_data,
  33. method='circular',
  34. n_perm=None
  35. )
  36. [a, b] = [xxx, xxx] ## Replace with the concerned time window e.g. [0,200]、[200,400]、[400,600](P300)、[600,1000]
  37. t1 = int(sfreq/1000 * a)
  38. t2 = int(sfreq/1000 * b)
  39. mean_erpac = np.mean(erpac[:,:,t1:t2+1])
  40. erpac_matrix[i, j] = mean_erpac
  41. result_dict = {
  42. 'erpac_matrix': erpac_matrix,
  43. 'phase_freq': erpac_type['f_pha'],
  44. 'amp_freq': erpac_type['f_amp'],
  45. 'ch_names': ch_names,
  46. 'sfreq': sfreq
  47. }
  48. filename = f"{erpac_type['name']}_erpac_{source_filename}.mat"
  49. save_path = os.path.join(erpac_dir, filename)
  50. savemat(save_path, result_dict)
  51. print(f"保存ERPAC结果到: {save_path}")
  52. base_dirs = [
  53. r'Replace your data path',
  54. r'Replace your data path',
  55. r'Replace your data path'
  56. ]
  57. for base_dir in base_dirs:
  58. set_files = [f for f in os.listdir(base_dir) if f.endswith('.set')]
  59. for file in set_files:
  60. file_path = os.path.join(base_dir, file)
  61. print(f"处理文件: {file_path}")
  62. epochs = mne.io.read_epochs_eeglab(file_path)
  63. source_filename = os.path.splitext(file)[0]
  64. compute_erpac_for_all_channel_pairs(epochs, base_dir, source_filename)

ERPAC.py at commit b5201e2, no license · at the source

Overview

Authors: Chao Yang1, Hai Gu1, He Chen2, Guohua Chen3, Xinhua Song4, Xin Liu3, Qing Yang3, Guang Wang4, Cancheng Li5, Heng Gu6, Shaodi Wang7, Peiyang Guo1, Jiawei Zhao1, Lu Wang1, Rui Wang1, Changming Wang8,9,10, Junhua Mei3, Xiaoli Li1
  1. State Key Laboratory of Cognitive Neuroscience and Learning & IDG/McGovern, Beijing Normal University, Beijing 100875, China
  2. School of Automation Science and Engineering, South China University of Technology, Guangzhou 511442, China
  3. Department of Neurology, Wuhan First Hospital, Wuhan 430022, China
  4. Clinical College of Traditional Chinese Medicine, Hubei University of Chinese Medicine, Wuhan 430065, China
  5. School of Biological Science and Medical Engineering, Beihang University, Beijing 100191, China
  6. Ningbo Institute of Dalian University of Technology, Ningbo 315014, China
  7. Department of Anesthesiology, Peking University Third Hospital, Beijing 100191, China
  8. Beijing Luhe Hospital, Capital Medical University, Beijing 101149, China
  9. College of Biomedical Engineering, Capital Medical University, Beijing 100069, China
  10. Jingtong Brain Research Laboratory, Beijing 101100, China
Journal: iScience, volume 29, issue 6, article 116151
Dates: received 19 November 2025; accepted 9 April 2026; published online 4 June 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1016/j.isci.2026.116151 · PMID 42305591 · PMCID PMC13266136 · OpenAlex W7163557116
Open access: gold, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: human (organism), sleep disorders (population), clinical / translational (subfield)
Methods: Spectral & time-frequency, Statistics, Smoothing, state filtering, decompositions, Preprocessing, Evoked potentials, Complexity, fMRI & imaging, Single-unit activity, calcium imaging, Connectivity
Keywords: Health sciences, Medicine, Neurology
Topic: Sleep and Wakefulness Research (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: Natural Science Foundation of Hubei Province (2025AFC109); National Natural Science Foundation of China (62271331); Department of Science and Technology of Hubei Province; Ministry of Science and Technology of the People's Republic of China (2021ZD0204300); Beijing Natural Science Foundation (22Z30074); National Science and Technology Major Project
Citations: not cited yet (Europe PMC); 46 references in the paper
Research resources: RStudio RRID:SCR_000432, MATLAB R2023a RRID:SCR_001622, R 4.5.0 RRID:SCR_001905, EEGLAB RRID:SCR_007292, PyCharm RRID:SCR_018221, NeuroKit2 RRID:SCR_021889, Lavaan RRID:SCR_027663

Abstract

This study quantified sleep resilience in insomnia disorder (ID) by examining the brain’s ability to resist, contain, and recover from auditory perturbations during nocturnal sleep. 58 ID patients and 43 healthy controls underwent real-time staged nocturnal recordings with event-locked auditory stimulation. Neural responses were evaluated using evoked complexity, P300, event-related phase-amplitude coupling (ERPAC), and coupling pattern diversity. Compared with controls, ID patients showed elevated evoked complexity and enlarged P300 responses, especially in N3 sleep, indicating reduced resistance to disturbance. ID patients also exhibited stronger fronto-parietal ERPAC during the middle post-stimulus window, suggesting impaired containment. These abnormalities weakened in the late window, consistent with relatively preserved recovery. In conclusion, ID is marked by impaired sleep resilience, particularly in deep sleep, and sleep resilience may provide useful objective markers of nocturnal instability.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repositories

Its files are read in the Code ↔ Paper reader above, with 2 matches between paragraphs and lines of code.

Zenodo 20070128

License: CC-BY-4.0
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Size: 1 file
Software Heritage: not checked
Found in: “Data and code availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: MNE-Python (3 files), NumPy (3 files), SciPy (3 files), NeuroKit2 (2 files)
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
  • 27 September 2026: the link answers (HTTP 200)
3 files

guhai123/Impaired-sleep-resilience-underlies-transient-neural-instability-in-insomnia-disorder

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: b5201e22c35350a72f4f502c929f20fe0ee14bb1, 20 April 2026
Languages: Python (3)
Size: 3 files, 3 scripts
Software Heritage: not archived
Found in: “Data and code availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: MNE-Python (3 files), NumPy (3 files), SciPy (3 files), NeuroKit2 (2 files)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
3 files

EtienneCmb/tensorpac

License: BSD-3-Clause
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: ac9058fd375d423757943810f613d63785fab85f, 8 February 2023
Languages: Python (61), Shell (1)
Size: 121 files, 62 scripts
Software Heritage: not archived
Found in: the resources table
Holds: README, license file, CITATION.cff, environment (setup.cfg, setup.py), tests, continuous integration, documentation
Tools: NumPy (39 files), Matplotlib (37 files), seaborn (14 files), SciPy (12 files), pandas (5 files), MNE-Python (4 files), statsmodels (2 files), Numba (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
64 files

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:

  • 3 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 68 scripts, each with its path and the digest of its content;
  • 2 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 and code availability

All data reported in this paper will be shared by the lead contact upon request.

All original code used for the analyses reported in this paper has been deposited at Zenodo: https://doi.org/10.5281/zenodo.20070128 and is publicly available as of the date of publication. The corresponding source repository is available at GitHub: https://github.com/guhai123/Impaired-sleep-resilience-underlies-transient-neural-instability-in-insomnia-disorder.

Any additional information required to reanalyze the data reported in this paper is available from the lead contact upon request.

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, 18 authors, 3 keywords, 6 funders, 46 references, 7 RRIDs.

Cite

This paper

Yang, C., Gu, H., Chen, H., Chen, G., Song, X., Liu, X., Yang, Q., Wang, G., Li, C., Gu, H., Wang, S., Guo, P., Zhao, J., Wang, L., Wang, R., Wang, C., Mei, J., & Li, X. (2026). Impaired sleep resilience underlies transient neural instability in insomnia disorder. iScience, 29(6), 116151. https://doi.org/10.1016/j.isci.2026.116151

BibTeX

@article{yang2026impaired,
author = {Yang, Chao and Gu, Hai and Chen, He and Chen, Guohua and Song, Xinhua and Liu, Xin and Yang, Qing and Wang, Guang and Li, Cancheng and Gu, Heng and Wang, Shaodi and Guo, Peiyang and Zhao, Jiawei and Wang, Lu and Wang, Rui and Wang, Changming and Mei, Junhua and Li, Xiaoli},
title = {{Impaired sleep resilience underlies transient neural instability in insomnia disorder}},
journal = {iScience},
year = {2026},
month = jun,
volume = {29},
number = {6},
pages = {116151},
publisher = {Elsevier},
issn = {2589-0042},
doi = {10.1016/j.isci.2026.116151},
url = {https://doi.org/10.1016/j.isci.2026.116151},
pmid = {42305591},
pmcid = {PMC13266136}
}

RIS

TY - JOUR
AU - Yang, Chao
AU - Gu, Hai
AU - Chen, He
AU - Chen, Guohua
AU - Song, Xinhua
AU - Liu, Xin
AU - Yang, Qing
AU - Wang, Guang
AU - Li, Cancheng
AU - Gu, Heng
AU - Wang, Shaodi
AU - Guo, Peiyang
AU - Zhao, Jiawei
AU - Wang, Lu
AU - Wang, Rui
AU - Wang, Changming
AU - Mei, Junhua
AU - Li, Xiaoli
TI - Impaired sleep resilience underlies transient neural instability in insomnia disorder
T2 - iScience
J2 - iScience
PY - 2026
DA - 2026/06/04
VL - 29
IS - 6
SP - 116151
SN - 2589-0042
PB - Elsevier
DO - 10.1016/j.isci.2026.116151
UR - https://doi.org/10.1016/j.isci.2026.116151
LA - en
ER -

CSL-JSON

{
"id": "10.1016/j.isci.2026.116151",
"type": "article-journal",
"title": "Impaired sleep resilience underlies transient neural instability in insomnia disorder",
"container-title": "iScience",
"author": [
{
"family": "Yang",
"given": "Chao"
},
{
"family": "Gu",
"given": "Hai"
},
{
"family": "Chen",
"given": "He"
},
{
"family": "Chen",
"given": "Guohua"
},
{
"family": "Song",
"given": "Xinhua"
},
{
"family": "Liu",
"given": "Xin"
},
{
"family": "Yang",
"given": "Qing"
},
{
"family": "Wang",
"given": "Guang"
},
{
"family": "Li",
"given": "Cancheng"
},
{
"family": "Gu",
"given": "Heng"
},
{
"family": "Wang",
"given": "Shaodi"
},
{
"family": "Guo",
"given": "Peiyang"
},
{
"family": "Zhao",
"given": "Jiawei"
},
{
"family": "Wang",
"given": "Lu"
},
{
"family": "Wang",
"given": "Rui"
},
{
"family": "Wang",
"given": "Changming"
},
{
"family": "Mei",
"given": "Junhua"
},
{
"family": "Li",
"given": "Xiaoli"
}
],
"container-title-short": "iScience",
"volume": "29",
"issue": "6",
"page": "116151",
"DOI": "10.1016/j.isci.2026.116151",
"PMID": "42305591",
"PMCID": "PMC13266136",
"ISSN": "2589-0042",
"publisher": "Elsevier",
"URL": "https://doi.org/10.1016/j.isci.2026.116151",
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
4
]
]
}
}

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.1016/j.xcrm.2023.101100 [code]
Coordinated human sleeping brainwaves map peripheral body glucose homeostasis.
Journal: Cell reports. Medicine
In common: NeuroKit2, MNE-Python, seaborn, 4 other tools, clinical / translational, 3 references
[2] doi:10.1002/advs.202417408 [code]
BrainFusion: a Low-Code, Reproducible, and Deployable Software Framework for Multimodal Brain‒Computer Interface and Brain‒Body Interaction Research.
Journal: Advanced science (Weinheim, Baden-Wurttemberg, Germany)
In common: NeuroKit2, MNE-Python, statsmodels, 5 other tools, 2 references
[3] doi:10.1038/s41598-024-73211-3 [code]
Music therapy with adult burn patients in the intensive care unit: short-term analysis of electrophysiological signals during music-assisted relaxation.
Journal: Scientific reports
In common: NeuroKit2, MNE-Python, statsmodels, 5 other tools, clinical / translational, 1 reference
[4] doi:10.1038/s41598-025-20422-x [code]
Pleasant odors specifically promote a soothing autonomic response and brain-body coupling through respiratory modulation.
Journal: Scientific reports
In common: NeuroKit2, MNE-Python, statsmodels, 5 other tools, 1 reference
[5] doi:10.1038/s41598-024-81618-1 [code]
Variations of autonomic arousal mediate the reportability of mind blanking occurrences.
Journal: Scientific reports
In common: NeuroKit2, MNE-Python, statsmodels, 5 other tools, 1 reference
[6] doi:10.1073/pnas.2311953121 [code]
Interoceptive signals shape the earliest markers and neural pathway to awareness at the visual threshold.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: NeuroKit2, MNE-Python, statsmodels, 5 other tools, 1 reference
[7] doi:10.3389/fpsyt.2024.1431837
Restoration of abnormal sleep EEG power in patients with insomnia disorder after 1Hz rTMS over left DLPFC.
Journal: Frontiers in psychiatry
In common: sleep disorders, clinical / translational, 5 references
[8] doi:10.1093/sleep/zsaf164 [code]
The Hypno-PC: uncovering sleep dynamics through principal component analysis and hidden Markov modeling of electrophysiological signals.
Journal: Sleep
In common: MNE-Python, statsmodels, seaborn, 4 other tools, 2 references
[9] doi:10.3390/bioengineering10070827 [code]
ECG Recordings as Predictors of Very Early Autism Likelihood: A Machine Learning Approach.
Journal: Bioengineering (Basel, Switzerland)
In common: NeuroKit2, MNE-Python, seaborn, 4 other tools, clinical / translational, 1 reference
[10] doi:10.7554/elife.73930 [code]
Sigma oscillations protect or reinstate motor memory depending on their temporal coordination with slow waves.
Journal: eLife
In common: MNE-Python, seaborn, pandas, 3 other tools, 3 references

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.

Add the badge to the code's README

OSCR: the badge of this paper

If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.

Markdown
<!-- oscr-badge:start -->
[![OSCR](https://openscicode.org/badge/doi/10.1016/j.isci.2026.116151.svg)](https://openscicode.org/badge/doi/10.1016/j.isci.2026.116151)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1016/j.isci.2026.116151.svg
   :target: https://openscicode.org/badge/doi/10.1016/j.isci.2026.116151
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1016/j.isci.2026.116151"><img src="https://openscicode.org/badge/doi/10.1016/j.isci.2026.116151.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->

On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".

If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.

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: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.

Report a mismatch between the code and the paper · Report a code error (signed in)

Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.

Report a reproduction failure (signed in)

Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.