Back

SleepEEGpy: a Python-based package for the preprocessing, analysis, and visualization of sleep EEG data

Belonosov, G.; Falach, R.; Schmidig, F. J.; Aderka, M.; Zhelezniakov, V.; Shani-Hershkovich, R.; Bar, E.; Nir, Y.

2023-12-18 neuroscience
10.1101/2023.12.17.572046 bioRxiv
Show abstract

Sleep research uses electroencephalography (EEG) to infer brain activity in health and disease. Beyond standard sleep scoring, there is increased interest in advanced EEG analysis that require extensive preprocessing to improve the signal-to-noise ratio, and dedicated analysis algorithms. While many EEG software packages exist, sleep research has specific needs that require dedicated tools (e.g. particular 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 leads to a high initial complexity, creating a crucial barrier for beginners in sleep research. Here, we present SleepEEGpy, an open-source Python software "wrapper" package to facilitate sleep EEG data preprocessing and analysis. SleepEEGpy builds upon MNE-Python, YASA, and SpecParam tools to provide an all-in-one, beginner-friendly package for comprehensive yet straightforward sleep EEG research including (i) cleaning, (ii) independent component analysis, (iii) detection of sleep events, (iv) analysis of spectral features, and associated visualization tools. A dashboard visualization tool provides an overview to evaluate data and its preprocessing, which can be useful as an initial step prior to detailed analysis. We demonstrate the SleepEEGpy pipeline and its functionalities by applying it to overnight high-density EEG data in healthy participants, revealing multiple characteristic activity signatures typical of each vigilance state. These include alpha oscillations in wakefulness, sleep spindle and slow wave activities in NREM sleep, and theta activity in REM sleep. We hope that this software will be embraced and further developed by the sleep research community, and constitute a useful entry point tool for beginners in sleep EEG research.

Matching journals

The top 9 journals account for 50% of the predicted probability mass.

50% of probability mass above

"Similar papers" are the closest papers from that journal in the model's embedding space. They show what the match is built on, but the ranking comes mostly from a classifier over the whole training set, not from these examples alone.