'SleepCycles' package for R - A free software tool for the detection of sleep cycles from sleep staging
Christine Blume1, Christian Cajochen2
1Centre for Chronobiology, Psychiatric Hospital of the University of Basel, Basel, Switzerland.
Abstract:
The detection of NREM-REM sleep cycles in human sleep data (i.e., polysomnographically assessed sleep stages) enables fine-grained analyses of ultradian variations in sleep microstructure (e.g., sleep spindles, and arousals), or other amplitude- and frequency-specific electroencephalographic features during sleep. While many laboratories have software that is used internally, reproducibility requires the availability of open-source software. Therefore, we here introduce the 'SleepCycles' package for R, an open-source software package that identifies sleep cycles and their respective (non-) rapid eye movement ([N]REM) periods from sleep staging data. Additionally, each (N)REM period is subdivided into parts of equal duration (percentiles), which may be useful for further fine-grained analyses. The detection criteria used in the package are, with some adaptations, largely based on criteria originally proposed by Feinberg and Floyd (1979). The latest version of the package can be downloaded from the Comprehensive R Archives Network (CRAN).•The package 'SleepCycles' for R allows to identify sleep cycles and their respective NREM and REM periods from sleep staging results.•Besides the cycle detection, NREM and REM periods are also split into parts of equal duration (percentiles) thereby allowing for a better temporal resolution across the night and comparisons of sleep cycles with different durations amongst different night recordings.
Related Concept Videos
Sleep-Wake Cycles
NREM Sleep
NREM sleep comprises four progressive stages that seamlessly merge:
Stages of Sleep
Before sleep begins, in wakefulness, the brain exhibits primarily beta waves, which are high in frequency and low in amplitude, indicating alertness...
Understanding Sleep
The circadian rhythm, a nearly 24-hour cycle, is deeply influenced by environmental light cues. Light exposure directly affects the hypothalamus, which in turn regulates...
Correlation between ECG and Cardiac Cycle
A cardiac action potential originates in the SA node and spreads throughout the atria and the AV node in approximately 0.03 seconds. This results in the P wave in an ECG and triggers atrial contraction. The action potential is then briefly slowed at the AV node, allowing the atria to contract and fill the ventricles with blood before...
Circadian Rhythms and Gene Regulation
Management of Insomnia


