Falach Rotem, Belonosov Gennadiy, Schmidig Flavio Jean, Aderka Maya, Zhelezniakov Vladislav, Shani-Hershkovich Revital, Bar Ella, Nir Yuval
Sagol School of Neuroscience, Tel Aviv University, Tel Aviv, Israel.
Sagol School of Neuroscience, Tel Aviv University, Tel Aviv, Israel; Department of Physiology and Pharmacology, Faculty of Medical and Health Sciences, Tel Aviv University, Tel Aviv, Israel.
Comput Biol Med. 2025 Jun;192(Pt A):110232. doi: 10.1016/j.compbiomed.2025.110232. Epub 2025 Apr 26.
Sleep research uses electroencephalography (EEG) to infer brain activity in health and disease. Beyond standard sleep scoring, there is growing interest in advanced EEG analysis that requires extensive preprocessing to improve the signal-to-noise ratio and specialized analysis algorithms. While many EEG software packages exist, sleep research has unique needs (e.g., specific artifacts, event detection). Currently, sleep investigators use different libraries for specific tasks in a 'fragmented' configuration that is inefficient, prone to errors, and requires the learning of multiple software environments. This complexity creates a barrier for beginners. Here, we present SleepEEGpy, an open-source Python package that simplifies sleep EEG preprocessing and analysis. SleepEEGpy builds on MNE-Python, PyPREP, YASA, and SpecParam to offer an all-in-one, beginner-friendly package for comprehensive sleep EEG research, including (i) cleaning, (ii) independent component analysis, (iii) sleep event detection, (iv) spectral feature analysis, and visualization tools. A dedicated dashboard provides an overview to evaluate data and preprocessing, serving as an initial step prior to detailed analysis. We demonstrate SleepEEGpy's functionalities using overnight high-density EEG data from healthy participants, revealing characteristic activity signatures typical of each vigilance state: alpha oscillations in wakefulness, spindles and slow waves in NREM sleep, and theta activity in REM sleep. We hope that this software will be adopted and further developed by the sleep research community, and constitute a useful entry point tool for beginners in sleep EEG research.
睡眠研究使用脑电图(EEG)来推断健康和疾病状态下的大脑活动。除了标准的睡眠评分外,人们对先进的脑电图分析越来越感兴趣,这种分析需要进行广泛的预处理以提高信噪比,并使用专门的分析算法。虽然存在许多脑电图软件包,但睡眠研究有其独特的需求(例如,特定的伪迹、事件检测)。目前,睡眠研究人员在一种“碎片化”的配置中使用不同的库来完成特定任务,这种配置效率低下、容易出错,并且需要学习多种软件环境。这种复杂性给初学者造成了障碍。在此,我们展示了SleepEEGpy,这是一个开源的Python软件包,可简化睡眠脑电图的预处理和分析。SleepEEGpy基于MNE-Python、PyPREP、YASA和SpecParam构建,提供了一个一体化、对初学者友好的软件包,用于全面的睡眠脑电图研究,包括(i)清洗,(ii)独立成分分析,(iii)睡眠事件检测,(iv)频谱特征分析和可视化工具。一个专用的仪表盘提供了评估数据和预处理的概述,作为详细分析之前的第一步。我们使用来自健康参与者的夜间高密度脑电图数据展示了SleepEEGpy的功能,揭示了每种警觉状态典型的特征性活动特征:清醒时的阿尔法振荡、非快速眼动睡眠时的纺锤波和慢波,以及快速眼动睡眠时的theta活动。我们希望该软件将被睡眠研究界采用并进一步开发,并成为睡眠脑电图研究初学者的一个有用的入门工具。