<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "journalpublishing.dtd">
<article xml:lang="EN" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" article-type="research-article">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">Front. Sleep</journal-id>
<journal-title>Frontiers in Sleep</journal-title>
<abbrev-journal-title abbrev-type="pubmed">Front. Sleep</abbrev-journal-title>
<issn pub-type="epub">2813-2890</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.3389/frsle.2023.1102391</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Sleep</subject>
<subj-group>
<subject>Technology and Code</subject>
</subj-group>
</subj-group>
</article-categories>
<title-group>
<article-title><italic>SSAVE</italic>: A tool for analysis and visualization of sleep periods using electroencephalography data</article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author" corresp="yes">
<name><surname>Talukder</surname> <given-names>Amlan</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="corresp" rid="c001"><sup>&#x0002A;</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/2104117/overview"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Li</surname> <given-names>Yuanyuan</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/1722240/overview"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Yeung</surname> <given-names>Deryck</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
</contrib>
<contrib contrib-type="author">
<name><surname>Umbach</surname> <given-names>David M.</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/245084/overview"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Fan</surname> <given-names>Zheng</given-names></name>
<xref ref-type="aff" rid="aff3"><sup>3</sup></xref>
<xref ref-type="aff" rid="aff4"><sup>4</sup></xref>
</contrib>
<contrib contrib-type="author" corresp="yes">
<name><surname>Li</surname> <given-names>Leping</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="corresp" rid="c002"><sup>&#x0002A;</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/1288677/overview"/>
</contrib>
</contrib-group>
<aff id="aff1"><sup>1</sup><institution>Biostatistics and Computational Biology Branch</institution>, <addr-line>National Institute of Environmental Health Sciences, RTP, NC</addr-line>, <country>United States</country></aff>
<aff id="aff2"><sup>2</sup><institution>Department of Engineering Science, Trinity University</institution>, <addr-line>San Antonio, TX</addr-line>, <country>United States</country></aff>
<aff id="aff3"><sup>3</sup><institution>Division of Sleep Medicine, University of North Carolina at Chapel Hill</institution>, <addr-line>Chapel Hill, NC</addr-line>, <country>United States</country></aff>
<aff id="aff4"><sup>4</sup><institution>Department of Neurology, University of North Carolina at Chapel Hill</institution>, <addr-line>Chapel Hill, NC</addr-line>, <country>United States</country></aff>
<author-notes>
<fn fn-type="edited-by"><p>Edited by: Ramalingam Vetrivelan, Beth Israel Deaconess Medical Center and Harvard Medical School, United States</p></fn>
<fn fn-type="edited-by"><p>Reviewed by: Jennifer Ramautar, Amsterdam University Medical Center, Netherlands; M. Quigg, University of Virginia, United States</p></fn>
<corresp id="c001">&#x0002A;Correspondence: Amlan Talukder &#x02709; <email>amlanaccount&#x00040;gmail.com</email></corresp>
<corresp id="c002">Leping Li &#x02709; <email>li3&#x00040;nih.gov</email></corresp>
<fn fn-type="other" id="fn001"><p>This article was submitted to Sleep and Circadian Rhythms, a section of the journal Frontiers in Sleep</p></fn></author-notes>
<pub-date pub-type="epub">
<day>27</day>
<month>01</month>
<year>2023</year>
</pub-date>
<pub-date pub-type="collection">
<year>2023</year>
</pub-date>
<volume>2</volume>
<elocation-id>1102391</elocation-id>
<history>
<date date-type="received">
<day>18</day>
<month>11</month>
<year>2022</year>
</date>
<date date-type="accepted">
<day>09</day>
<month>01</month>
<year>2023</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#x000A9; 2023 Talukder, Li, Yeung, Umbach, Fan and Li.</copyright-statement>
<copyright-year>2023</copyright-year>
<copyright-holder>Talukder, Li, Yeung, Umbach, Fan and Li</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/"><p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.</p></license> </permissions>
<abstract>
<p>Human sleep architecture is structured with repeated episodes of rapid-eye-movement (REM) and non-rapid-eye-movement (NREM) sleep. An overnight sleep study facilitates identification of macro and micro changes in the pattern and duration of sleep stages associated with sleep disorders and other aspects of human mental and physical health. Overnight sleep studies record, in addition to electroencephalography (EEG) and other electro-physiological signals, a sequence of sleep-stage annotations. <italic>SSAVE</italic>, introduced here, is open-source software that takes sleep-stage annotations and EEG signals as input, identifies and characterizes periods of NREM and REM sleep, and produces a hypnogram and its time-matched EEG spectrogram. <italic>SSAVE</italic> fills an important gap for the rapidly growing field of sleep medicine by providing an easy-to-use tool for sleep-period identification and visualization. <italic>SSAVE</italic> can be used as a Python package, a desktop standalone tool or through a web portal. All versions of the <italic>SSAVE</italic> tool can be found on: <ext-link ext-link-type="uri" xlink:href="https://manticore.niehs.nih.gov/ssave">https://manticore.niehs.nih.gov/ssave</ext-link>.</p></abstract>
<kwd-group>
<kwd>sleep cycle</kwd>
<kwd>EEG</kwd>
<kwd>circadian rhythm</kwd>
<kwd>NREM</kwd>
<kwd>REM</kwd>
</kwd-group>
<counts>
<fig-count count="3"/>
<table-count count="0"/>
<equation-count count="0"/>
<ref-count count="27"/>
<page-count count="9"/>
<word-count count="5810"/>
</counts>
</article-meta>
</front>
<body>
<sec sec-type="intro" id="s1">
<title>Introduction</title>
<p>Sleep is essential for good physical and mental health, yet physical and mental conditions also affect sleep (Krause et al., <xref ref-type="bibr" rid="B15">2017</xref>; Franks and Wisden, <xref ref-type="bibr" rid="B7">2021</xref>; Paller et al., <xref ref-type="bibr" rid="B23">2021</xref>). In fact, sleep architecture can reflect human physiology (Ju et al., <xref ref-type="bibr" rid="B13">2014</xref>; Mander et al., <xref ref-type="bibr" rid="B18">2017</xref>). Sleep quantity and quality tend to differ with sex and age as well as among people who suffer from sleep disorders, stress, anxiety, neuropsychiatric disorders, or diabetes (Redline et al., <xref ref-type="bibr" rid="B25">2004</xref>; Wulff et al., <xref ref-type="bibr" rid="B27">2010</xref>; Ju et al., <xref ref-type="bibr" rid="B13">2014</xref>; Mander et al., <xref ref-type="bibr" rid="B18">2017</xref>; H&#x000F6;gl et al., <xref ref-type="bibr" rid="B11">2018</xref>).</p>
<p>A normal overnight sleep is structured with certain characteristics that reflect a dynamic physiological process. Sleep is broadly dichotomized into non-rapid eye movement (NREM) sleep and rapid eye movement (REM) sleep. NREM sleep is further sub-divided into three stages&#x02013;N1, N2 and N3&#x02013;based on the new American Academy of Sleep Medicine (AASM) rules (Moser et al., <xref ref-type="bibr" rid="B21">2009</xref>). This structure is generally monitored with an in-laboratory overnight sleep study, also called a polysomnography (PSG) study. PSG records electrical signals from multiple sources; these include electroencephalography (EEG) or voltage signals from the cerebral cortex as well as signals for muscle and eye movement and heart activity. These sensor data are grouped into a sequence of temporal units; each unit, known as an &#x0201C;epoch,&#x0201D; has a fixed duration (typically 30 s). In addition, a qualified sleep technician uses data from these sources and scores each epoch as one of five sleep stages: wake (W), N1, N2, N3 or REM (R) (Berry et al., <xref ref-type="bibr" rid="B4">2017</xref>). The sleep-stage annotation for each epoch is embedded together with electrical signals as part of the data arising from a PSG study.</p>
<p>The basic structural organization of sleep stages during an overnight sleep is referred to as sleep architecture and reflects a pattern known as the ultradian rhythm (Adamantidis et al., <xref ref-type="bibr" rid="B1">2019</xref>; Goh et al., <xref ref-type="bibr" rid="B9">2019</xref>). Typically, in a healthy adult, NREM and REM stages alternate throughout an overnight sleep, along with a few W stages. A sequence of epochs composed predominantly of NREM stages constitutes an NREM period or NREMP; similarly, a sequence of epochs composed predominantly of REM stages constitutes a REM period or REMP. The alternating pattern of NREMP and REMP with the duration of the respective periods varying throughout the night is typically referred to as a &#x0201C;sleep cycle,&#x0201D; although &#x0201C;sleep cycle&#x0201D; is not a precisely defined concept (Feinberg and Floyd, <xref ref-type="bibr" rid="B6">1979</xref>). Normal sleep architecture in healthy young adults usually contains 4-6 sleep cycles, each consisting of an NREMP and a REMP (Hartmann, <xref ref-type="bibr" rid="B10">1968</xref>; Feinberg and Floyd, <xref ref-type="bibr" rid="B6">1979</xref>; McCarley, <xref ref-type="bibr" rid="B19">2007</xref>; Kryger et al., <xref ref-type="bibr" rid="B16">2017</xref>; Adamantidis et al., <xref ref-type="bibr" rid="B1">2019</xref>; Knoop et al., <xref ref-type="bibr" rid="B14">2021</xref>). The number and structure of the NREMPs and REMPs during a full night sleep exhibit patterns that can distinguish between subjects of different age groups or between healthy subjects and those with underlying sleep disorders.</p>
<p>Sleep stages, and consequently sleep periods, are highly associated with EEG electrical activity. EEG signals recorded as temporal sequences of voltages from multiple scalp electrodes can be re-expressed as frequencies in five primary frequency bands of interest: delta (&#x0003C; 4 Hz), theta (4&#x02013;7 Hz), alpha (8&#x02013;12 Hz), beta (13&#x02013;30 Hz) and gamma (&#x0003E;30 Hz), along with special frequency sub-bands like spindles (11-15 Hz) and saw tooth waves (2&#x02013;6 Hz) (Newson and Thiagarajan 2019). A spectrogram displays the power at each frequency through time. Spectrograms contain rich information on sleep-stage transitions and ultradian features that are important for sleep disorder detection (Iber et al., <xref ref-type="bibr" rid="B12">2007</xref>). The number and structure of the sleep periods and cycles during a full night&#x00027;s sleep as visualized by hypnograms and spectrograms provide distinguishing patterns between subjects with different physiological conditions or mental states. Consequently, successful identification and visualization of NREMPs and REMPs can aid physicians&#x00027; diagnoses.</p>
<p>To our knowledge, &#x0201C;<italic>SleepCycles</italic>&#x0201D; (Blume and Cajochen, <xref ref-type="bibr" rid="B5">2021</xref>) is the first, and currently the only, tool that uses a sequence of epoch-wise sleep-stage annotations to identify sleep cycles and their respective NREMPs and REMPs. <italic>SleepCycles</italic> is an R package; it outputs a hypnogram mapping the detected sleep periods to a time axis. It also provides the flexibility to choose the start of a sleep period and to set the REM period duration. Although <italic>SleepCycles</italic> has proved highly useful for sleep clinicians and researchers, its utility can be enhanced. As an R package, users must have some familiarity with that programming language to run it. In addition, users interested in seeing a spectrogram to complement the <italic>SleepCycles</italic>-generated hypnogram must familiarize themselves with spectrogram analysis and must learn and run separate software to generate the spectrogram. Finally, the rules for sleep-cycle and sleep-period detection applied by <italic>SleepCycles</italic>, though based on criteria adapted from seminal work by Feinberg and Floyd (<xref ref-type="bibr" rid="B6">1979</xref>), allow wake stages of arbitrary length within an NREMP or a REMP&#x02013;a choice that conflicts with the common-sense notion that extended wakefulness should not be included as part of a sleep period.</p>
<p>Our goal was to develop a tool for identifying sleep periods that retained the much of the conceptual framework of <italic>SleepCycles</italic> but expanded its utility. We wanted a tool that was fast, versatile, easy to use, and accessible without specialized programming expertise. In addition, we wanted it to take as input either sleep-stage annotations alone or EEG data with embedded annotations; so that, with appropriate data, the tool could display both a sleep-stage hypnogram and a time-matched spectrogram. Finally, we sought to modify the rules for identifying sleep periods to address anomalies may occur during a PSG recording&#x02013;such as long-duration wakefulness. Our tool, <italic>SSAVE</italic>, was developed in Python. We provide both web-based and desktop-based applications for <italic>SSAVE</italic>, including a command line version for users.</p>
</sec>
<sec sec-type="methods" id="s2">
<title>Methods</title>
<sec>
<title>Overview of <italic>SSAVE</italic></title>
<p><italic>SSAVE</italic> was designed to identify sleep periods from the sleep-stage annotations that are embedded with EEG signals in data files in the EDF (European Data Format) format. The EDF file formats can be vendor dependent. SSAVE extracts epoch-based sleep stages from the embedded annotations provided by board-certified sleep technicians/doctors using all polysomnography data and employs our revised rules (<xref ref-type="supplementary-material" rid="SM1">Supplementary Table S1</xref>) (Feinberg and Floyd, <xref ref-type="bibr" rid="B6">1979</xref>; Blume and Cajochen, <xref ref-type="bibr" rid="B5">2021</xref>) to identify sleep periods. <italic>SSAVE</italic> outputs the hypnogram as a JPEG image and a listing of epoch-based sleep stages and sleep periods in text format. If EEG data are the input, <italic>SSAVE</italic> uses the EEG signals to automatically generate a multitaper spectrogram (Prerau et al., <xref ref-type="bibr" rid="B24">2017</xref>) that is time-matched to the hypnogram. If sleep-stage annotations are not available in the EDF file, <italic>SSAVE</italic> can generate only the spectrogram but neither the sleep periods nor the corresponding the hypnogram. Alternatively, <italic>SSAVE</italic> can input user provided sleep annotations in text format and outputs only the hypnogram and listing (<xref ref-type="fig" rid="F1">Figure 1</xref>).</p>
<fig id="F1" position="float">
<label>Figure 1</label>
<caption><p>Overview of <italic>SSAVE</italic>. <italic>SSAVE</italic> takes EEG signals and sleep-stages annotations (N1, N2, N3, R, W) and outputs sleep periods as a hypnogram with different shading for NREM and REM periods (denoted as NC and RC, respectively) together with a time-matched spectrogram.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="frsle-02-1102391-g0001.tif"/>
</fig>
</sec>
<sec>
<title>Processing of input data</title>
<p>With EEG data as input, <italic>SSAVE</italic> simultaneously divides the EEG signal data and sleep-stage annotations embedded in the EDF data into epochs commensurate with the annotation timestamps. An epoch size of 30 s is the default, but that value can be changed by the user. Any epochs without sleep-stage annotation, are removed from both the annotations and the signal data. <italic>SSAVE</italic> then constructs a hypnogram (a graph representing the stages of sleep as a function of time) using the annotations and identifies NREMPs and REMPs using its identification rules. It also generates a spectrogram using the EEG signal data aligned with the timestamps of the hypnogram. When a text file provides sleep-stage annotations as the only input, similar to <italic>SleepCycles, SSAVE</italic> constructs the hypnograms and identifies the sleep periods without generating the spectrogram. <italic>SSAVE</italic> currently requires sleep-stage annotations to identify sleep periods and construct a hypnogram.</p>
</sec>
<sec>
<title>Overview of sleep-period characteristics</title>
<p>An NREMP begins with an N1 or N2 stage, whichever appears first. A REMP begins with an R stage. The NREMP must be at least 15 min long. No minimum duration is required for the first REMP. All subsequent REMPs must be longer than 5 min. Short duration (i.e., &#x0003C; 5 min) R and W stages are allowed within NREMPs. Similarly, short duration of NREM and W stages are allowed within REMPs. NREMPs longer than 120 min are split with user feedback. Detailed rules are provided below.</p>
</sec>
<sec>
<title>Rules for identifying sleep periods</title>
<p><italic>SSAVE</italic> scans from low to high timestamps of the annotation epochs to detect a sleep period using a set of rules (<xref ref-type="supplementary-material" rid="SM1">Supplementary Table S1</xref>). We adopted most of the traditional rules used previously (Feinberg and Floyd, <xref ref-type="bibr" rid="B6">1979</xref>; Blume and Cajochen, <xref ref-type="bibr" rid="B5">2021</xref>) with the following five modifications.</p>
<p>(1) <italic>SSAVE</italic> does not explicitly define sleep cycles; instead, it defines the two types of component sleep periods, NREMP and REMP, separately. This approach differs somewhat from that of <italic>SleepCycle</italic> which considers a pair of NREMP and REMP together as a sleep cycle (Blume and Cajochen, <xref ref-type="bibr" rid="B5">2021</xref>). This approach of focusing on individual sleep periods is useful. For example, the first NREMP is often not accompanied by a REMP for young adults. Moreover, NREMP and REMP have distinct characteristics such as duration and frequency, especially for younger subjects or those with sleep disorders (Ohayon et al., <xref ref-type="bibr" rid="B22">2004</xref>; Galland et al., <xref ref-type="bibr" rid="B8">2012</xref>). Treating NREMP and REMP separately, instead of combining consecutive pairs into cycles, enables one to obtain distinct features for each NREMP and REMP. This emphasis on sleep periods is also in accord with work suggesting that NREM and REM sleep have distinct regulation mechanisms (Le Bon et al., <xref ref-type="bibr" rid="B17">2002</xref>).</p>
<p>(2) Like <italic>SleepCycles, SSAVE</italic> sets the minimum and maximum durations of an NREMP (excluding any internal W stages) to be 15 and 120 min, respectively. For an NREMP longer than 120 min, both tools accommodate splitting the NREMP (details below). This feature is important especially when a REMP does not occur between two NREMPs (Blume and Cajochen, <xref ref-type="bibr" rid="B5">2021</xref>). Neither tool sets a maximum duration for REMPs. The minimum duration for a REMP is 5 min, although this restriction does not apply to the first REMP. If an NREMP is &#x0003C; 15 min long or a REMP (except the first one) is &#x0003C; 5 min long, <italic>SSAVE</italic> merges it into the adjacent respective sleep periods.</p>
<p>(3) The first NREMP ends upon encountering an R stage. All remaining NREMPs and all REMPs end, respectively, upon encountering consecutive REM and NREM stages of at least 5 min duration. There may be occasions when a person wakes up from sleep in the middle of an NREMP (REMP) for at least 5 min and falls back to sleep. In this scenario, <italic>SleepCycles</italic> considers the whole period as one NREMP (REMP). In contrast, <italic>SSAVE</italic> breaks the NREMP (REMP) into two NREMPs (REMPs) while omitting the W stages.</p>
<p>(4) In <italic>SSAVE</italic>, an NREMP may contain W stages if and only if the W stages are &#x0003C; 5 consecutive minutes long. When it encounters consecutive W stages lasting at least 5 min, <italic>SSAVE</italic> ends the current sleep period, removes the W stages, and begins a new sleep period. This rule allows <italic>SSAVE</italic> to properly handle EEG data with frequent W stages [e.g., EEG data for insomnia patients where the subject may wake up frequently in the middle of sleep cycles (Wei et al., <xref ref-type="bibr" rid="B26">2017</xref>)]. In <italic>SleepCycles</italic>, all NREMPs may contain W stages regardless of their duration.</p>
<p>(5) An NREMP that is longer than 120 min is split at the first point of either arousal or &#x0201C;lightening of sleep&#x0201D;; but <italic>SSAVE</italic> and <italic>SleepCycles</italic> choose splitting points differently. <italic>SleepCycles</italic> splits at the end of the first N3 stage after at least 12 consecutive minutes of N1, N2 or W stages. <italic>SSAVE</italic>, instead, splits the NREMP at an &#x0201C;arousal&#x0201D; point defined by consecutive W stages exceeding 1 min or at a &#x0201C;lightening of sleep&#x0201D; point defined by consecutive N1 stages exceeding 3 min. Because these definitions may admit multiple splitting positions for a long NREMP, the user is provided the flexibility to choose the splitting positions by selecting the appropriate epoch number (in the web and desktop versions) or by typing it (in the command line interface). Note that a REMP does not have any maximum duration, thus, is never split.</p>
<p>Lastly, sleep-stage annotation may begin before sleep commences and continue after sleep ends; the annotation file typically includes these superfluous W stages. Both tools ignore W stages before the first NREMP and W stages after the last REMP or NREMP. Because newborns have unique sleep structures, these rules are more appropriate for individuals at least 1 year old.</p>
</sec>
<sec>
<title>Multitaper spectrogram</title>
<p><italic>SSAVE</italic> provides a multitaper spectrogram aligned with the sleep hypnogram in the visualization plot. A spectrogram is a frequency domain representation of EEG signal power through time as a heatmap. Its X-axis shows the time (in epochs), its Y-axis shows the frequency, and color indicates the relative signal power. <italic>SSAVE</italic> aligns its multitaper spectrogram with the epochs of the sleep hypnogram (<xref ref-type="supplementary-material" rid="SM1">Supplementary Figure S1</xref>, Section 1). This alignment can help users to identify useful sleep band features (e.g., alpha, beta, gamma, delta, theta waves), and sleep spindles (Paller et al., <xref ref-type="bibr" rid="B23">2021</xref>) and map them to sleep periods.</p>
</sec>
<sec>
<title>Implementation</title>
<p><italic>SSAVE</italic> was developed with Python version 3. It can be imported either as a Python package or run as a standalone desktop application. We have also developed a web-based portal so that users can directly access the tool using a web browser. The web-based portal can be slower than the package or the desktop version, as it requires the user to upload an input file to the <italic>SSAVE</italic> server (<ext-link ext-link-type="uri" xlink:href="https://manticore.niehs.nih.gov/ssave">https://manticore.niehs.nih.gov/ssave</ext-link>).</p>
</sec>
</sec>
<sec sec-type="results" id="s3">
<title>Results</title>
<sec>
<title>User interface</title>
<p>The web-based and the desktop-based applications present a similar user interface (<xref ref-type="supplementary-material" rid="SM1">Supplementary Figures S2</xref>&#x02013;<xref ref-type="supplementary-material" rid="SM1">S6</xref>). Initially, the user will see a home window prompting for either one of the two data inputs: an EDF file containing EEG signals with embedded sleep-stage annotations; or a text file of only sleep-stage annotations having two columns, epoch number and sleep stage (&#x0201C;W,&#x0201D; &#x0201C;N1,&#x0201D; &#x0201C;N2,&#x0201D; &#x0201C;N3,&#x0201D; &#x0201C;R&#x0201D;) (<xref ref-type="supplementary-material" rid="SM1">Supplementary Figure S2A</xref>). The desktop-based and the command-line versions take the output directory as an additional input. Data are loaded when the &#x0201C;Load&#x0201D; button is clicked (<xref ref-type="supplementary-material" rid="SM1">Supplementary Figure S2B</xref>). The &#x0201C;Execute&#x0201D; button allows <italic>SSAVE</italic> to extract the sleep periods and generate the visualization figure and a listing of epoch-based sleep stages and identified sleep periods (<xref ref-type="supplementary-material" rid="SM1">Supplementary Figure S2C</xref>). The outputs are shown in the user interface under the &#x0201C;Visualization&#x0201D; and &#x0201C;Sleep Periods and Stages&#x0201D; tabs (<xref ref-type="supplementary-material" rid="SM1">Supplementary Figure S2D</xref>) and can be downloaded (See &#x0201C;Output&#x0201D; below).</p>
<p><italic>SSAVE</italic> allows a user to split long NREMP (<xref ref-type="supplementary-material" rid="SM1">Supplementary Figure S3</xref>). When a NREMP is longer than 120 min, <italic>SSAVE</italic> searches for suitable epoch positions to split the period based on the arousal or lightening-of-sleep criteria mentioned earlier. If <italic>SSAVE</italic> finds such epoch positions, an additional tab &#x0201C;NREMP cut points&#x0201D; will appear (<xref ref-type="supplementary-material" rid="SM1">Supplementary Figure S3A</xref>). This tab shows a table of suitable epochs at which the long NREMP may be cut (<xref ref-type="supplementary-material" rid="SM1">Supplementary Figure S3B</xref>). User can select a cut option and click &#x0201C;Execute&#x0201D; to apply it (<xref ref-type="supplementary-material" rid="SM1">Supplementary Figure S3C</xref>). Once execution completes, the new outputs will show up with the split applied (<xref ref-type="supplementary-material" rid="SM1">Supplementary Figure S3D</xref>).</p>
<p><italic>SSAVE</italic> uses default settings (<xref ref-type="supplementary-material" rid="SM1">Supplementary Table S2</xref>) to analyze the sleep periods, but the user can change the defaults in the settings window (<xref ref-type="supplementary-material" rid="SM1">Supplementary Figure S4</xref>). The settings window opens by clicking the &#x0201C;Configure&#x0201D; button at the home window after the input data are loaded. This window has four tabs corresponding to four categories of settings. In the &#x0201C;Select Channels&#x0201D; panel, the user can select their preferred EEG channels for analysis. The default settings contain eight channels: F3, F4, C3, C4, O1, O2, M1 and M2 (<xref ref-type="supplementary-material" rid="SM1">Supplementary Figure S4A</xref>). The &#x0201C;Select Sleep Stage&#x0201D; panel helps user to assign the proper annotations for the five sleep stages (<xref ref-type="supplementary-material" rid="SM1">Supplementary Figure S4B</xref>). User can also apply filters to remove noise and irrelevant epochs from the data using the &#x0201C;Set Filters&#x0201D; panel (<xref ref-type="supplementary-material" rid="SM1">Supplementary Figure S4C</xref>). The filters include two types of frequency filters (notch and bandpass); and three epoch filters (to remove epochs with maximum amplitude, flat signals, and unwanted annotations that do not bear useful information, e.g., bathroom breaks). The &#x0201C;Set Epoch Size&#x0201D; panel allows users to change the epoch size if the data provided as input was constructed with an epoch size different from 30 s (<xref ref-type="supplementary-material" rid="SM1">Supplementary Figure S4D</xref>). The user needs to re-run the analyses after changing the settings by clicking the &#x0201C;Execute&#x0201D; button at the home window. The filters can be optionally applied by checking the &#x0201C;Apply Filters&#x0201D; checkbox and then clicking the &#x0201C;Execute&#x0201D; button. All other settings will be automatically applied once the &#x0201C;Execute&#x0201D; button is clicked.</p>
<p>For machines without desktop support, <italic>SSAVE</italic> can be used as a command-line application. After running the tool, the user is prompted for the same inputs as above.</p>
<p>The <italic>SSAVE</italic> file &#x0201C;app_desktop.py&#x0201D; represents the desktop or command-line front end of the tool. The &#x0201C;utils.py&#x0201D; file contains the default settings of the tool. The &#x0201C;visualize_sleep.py&#x0201D; file can be imported as a Python package to use for further analysis.</p>
</sec>
<sec>
<title>Output</title>
<p><italic>SSAVE</italic> generates four outputs: the visualization figure (both hypnogram and spectrogram, or hypnogram alone, depending on input), a listing of epoch-based sleep stages, a listing of the sleep periods identified, and spectrogram data matrix containing epoch, frequency band and channel-wise EEG signal power data written to a NumPy file with &#x0201C;.npz&#x0201D; extension. The dimension of the spectrogram data matrix is (number of epochs x 901 x number of channels) (see <xref ref-type="supplementary-material" rid="SM1">Supplementary Method</xref>). The desktop-based and the command-line versions save output files in the user-specified output directory. The web-based application requires the user to download any files to be saved.</p>
</sec>
<sec>
<title>Key differences between <italic>SSAVE</italic> and <italic>SleepCycles</italic></title>
<p><italic>SSAVE</italic> mimics <italic>SleepCycles</italic> (Blume and Cajochen, <xref ref-type="bibr" rid="B5">2021</xref>) in concept but offers several notable advantages. First, <italic>SSAVE</italic> was developed to be used easily in multiple platforms for users with or without programming skills. The web version provides a convenient platform for all users. <italic>SleepCycles</italic> requires familiarity with the R programming language. Second, both <italic>SleepCycles</italic> and <italic>SSAVE</italic> takes sleep stage annotations in text format as input, but only <italic>SSAVE</italic> takes EEG data with embedded sleep stage annotations as input. When EEG data are input, <italic>SSAVE</italic> outputs not only a hypnogram with the identified sleep periods but also the time-matched spectrogram. The spectrogram provides power in spectral bands that are characteristic of sleep periods. <italic>SleepCycles</italic> provides only a hypnogram. Third, <italic>SSAVE</italic> uses revised rules for identifying sleep periods to avoid including long consecutive W stages within any NREMP or REMP, in contrast to <italic>SleepCycles</italic>. Below, we provide three examples to illustrate these key differences.</p>
<p>In the first example, <italic>SleepCycles</italic> fails to exclude a long period (more than 5 min) of wakefulness in a sleep period (<xref ref-type="fig" rid="F2">Figure 2A</xref>). In contrast, <italic>SSAVE</italic> breaks the current NREMP or REMP and starts a new one after excluding consecutive W stages (<xref ref-type="fig" rid="F2">Figure 2B</xref>). As a result, <italic>SSAVE</italic> allows consecutive W stages within a sleep period only if their duration is &#x0003C; 5 min (10 epochs). This choice allows an NREMP or REMP to contain brief intervals of arousal or lightening of sleep without containing intervals where a subject is likely fully awake.</p>
<fig id="F2" position="float">
<label>Figure 2</label>
<caption><p>Example of difference between <italic>SleepCycles</italic> <bold>(A)</bold> and <italic>SSAVE</italic> <bold>(B)</bold> in handling consecutive wake stages of long duration within a sleep period. The wake stages are indicated by arrows. <italic>SSAVE</italic> removes awakenings from the sleep period, while <italic>SleepCycles</italic> includes them. In this example, <italic>SleepCycles</italic> identifies two NREM periods and one REM period whereas <italic>SSAVE</italic> identifies five NREM periods and one REM period by splitting the first and second NREM periods into two and three NREM periods, respectively.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="frsle-02-1102391-g0002.tif"/>
</fig>
<p>In the second example, for a long NREMP (more than 2 h), <italic>SleepCycles</italic> searches for the first N3 stage preceded by at least 12 min of consecutive N1, N2 or W stages and then splits the NREMP at the beginning of the N3 stage, resulting in two consecutive NREMPs (<xref ref-type="fig" rid="F3">Figure 3A</xref>). Instead, <italic>SSAVE</italic> searches for the first N3 stage immediately preceded either by more than 1 min of consecutive W stages and splits the NREMP at the beginning of the N3 stage. Alternatively, it searches the for the first N3 stage following more than 3 min of consecutive of N1 stages and splits the NREMP at the beginning of the first N1 stage (<xref ref-type="fig" rid="F3">Figure 3B</xref>). Because W or N1 stages precede deep sleep, <italic>SSAVE</italic>&#x00027;s rule provides reasonable place to split a long NREMP.</p>
<fig id="F3" position="float">
<label>Figure 3</label>
<caption><p>Example of difference between <italic>SleepCycles</italic> <bold>(A)</bold> and <italic>SSAVE</italic> <bold>(B)</bold> in handling the first long NREM period. In this example, <italic>SSAVE</italic> finds a reasonable position to split the long NREM period (indicated by arrow), whereas <italic>SleepCycles&#x00027;</italic> stringent splitting criterion does not.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="frsle-02-1102391-g0003.tif"/>
</fig>
<p>In the third example, <italic>SSAVE</italic> breaks a long sleep period, either NREMP or REMP, upon encountering more than 5 min of consecutive W stages and starts a new sleep period after their removal. This process divides long sleep periods, so that two consecutive NREMPs or two consecutive REMPs are possible. This possibility is one reason why <italic>SSAVE</italic> does not explicitly define a sleep cycle as an NREMP followed by a REMP.</p>
</sec>
</sec>
<sec sec-type="discussion" id="s4">
<title>Discussion</title>
<p>Sleep is structured. Infants have different sleep structure compared to children and adults. For children and adults, early sleep normally starts with the N1 stage, followed by the N2 stage, then the N3 stage (all NREM sleep). N1 is usually short lasting 5&#x02013;10 min. In N1, both the body and brain slow down to prepare for a deeper sleep. In N2, further relaxation occurs with heart rate and breathing slowing down and muscle relaxed and body temperature dropping. N3 is the deep sleep in which both muscles and eyes are fully relaxed, and brain waves are largely slow waves (delta). Later in sleep, REM sleep begins to appear after NREM sleep. Traditionally, the consecutive occurrence of an NREMP and a REMP defines one sleep cycle (Feinberg and Floyd, <xref ref-type="bibr" rid="B6">1979</xref>). Traditional sleep cycles&#x02013;i.e., alternating NREMP and REMP&#x02013;are more common in healthy children and young adults.</p>
<p>For those with sleep disorders or other medical conditions, normal sleep structure is usually disrupted. For example, the duration of an NREMP can be very long, making it hard to judge whether it should be one long or two shorter periods. Frequently, a REMP is too short (&#x0003C; 5 min) to be considered part of an alternating cycle. Sometimes, an NREMP consists of only one or two of the three NREM stages. Both NREM and REM sleep can often be interrupted by many mini-arousals (wake stages lasting at least 1 min). These examples represent just a few of the challenges for identifying sleep periods or sleep cycles; in addition, identification must cope with the heterogeneity and noise present in the recorded polysomnography (PSG) data.</p>
<p>Overnight PSG recordings consist of electrophysiology data over many hours of sleep; these data provide information on overall sleep architecture including sleep periods. Clinicians typically use the clinically obtained shorter length PSG data and the associated hypnograms for the diagnosis of sleep-related diseases such as sleep apnea. The vast amount of the PSG data generated by an overnight sleep study are often underutilized by clinicians. For example, hypnograms only provide an overview of sleep stages and their transitions throughout the night; however, hypnograms do not include other potentially useful information such as sleep period transitions and ultradian features such as delta power and spindle density.</p>
<p>Here, we modestly revised previously published rules for identifying NREMP and REMP (Feinberg and Floyd, <xref ref-type="bibr" rid="B6">1979</xref>; Merica and Gaillard, <xref ref-type="bibr" rid="B20">1986</xref>; Blume and Cajochen, <xref ref-type="bibr" rid="B5">2021</xref>) and developed user-friend software for multiple platforms. Our tool can generate and display on the same time axis both the hypnogram with sleep stages and periods and the multitaper spectrogram (Prerau et al., <xref ref-type="bibr" rid="B24">2017</xref>) extracted from the raw EEG signal. The hypnogram and spectrogram are temporally aligned to provide a better comparative visualization for the user. Along with the facilities provided by <italic>SleepCycles, SSAVE</italic> provides additional flexibilities to the user, e.g., choosing of EEG channels for the spectrogram, choosing appropriate sleep annotations for the five sleep stages, applying frequency and epoch filters to the input data.</p>
<p><italic>SSAVE</italic> applies general rules to the epoch-specific sleep stage annotations to identify sleep periods. These rules may fail to unambiguously delineate sleep periods for some subjects, however. Nevertheless, <italic>SSAVE</italic> will attempt to maintain fidelity to the rules in determining NREMP and REMP. In certain cases, where the identification of sleep periods is ambiguous, such as when multiple split options exist for a long NREMP, <italic>SSAVE</italic> will let the user choose.</p>
<p>Because sleep is structured, changes in or disruptions in that structure reflect underlying physiological changes. Thus, identification of sleep periods provides valuable information about health and development. For example, for healthy individuals, a REMP is typically absent or very short early in sleep, but REMP duration increases gradually as the sleep progresses (Aserinsky and Kleitman, <xref ref-type="bibr" rid="B2">1953</xref>, <xref ref-type="bibr" rid="B3">1955</xref>). In contrast, patients with REM behavior disorders often have a REMP early in sleep (H&#x000F6;gl et al., <xref ref-type="bibr" rid="B11">2018</xref>). The duration of NREMPs is longer in earlier cycles, however, and gradually decreases later in sleep (Feinberg and Floyd, <xref ref-type="bibr" rid="B6">1979</xref>). The sleep periods identified by <italic>SSAVE</italic> with their accompanying visualization can help clinicians distinguish a subject with a disease from a healthy one visually.</p>
<p><italic>SSAVE</italic> provides a unified interface for the identification and visualization of sleep stages and sleep periods throughout a subject&#x00027;s entire recorded sleep period. The multitaper spectrogram associated with the hypnogram will help identify frequency-related features associated with different sleep stages including power in separate frequency bands (e.g., alpha, beta, gamma, delta, theta etc.), sleep spindles, and k-complexes. The multitaper method that we have implemented is the most widely accepted approach for generating spectrograms to date; it generates a spectrogram where the desired frequency components are isolated with high resolution (Prerau et al., <xref ref-type="bibr" rid="B24">2017</xref>).</p>
<p>In summary, we developed a user-friendly software tool, <italic>SSAVE</italic>, for identification and characterization of NREMP and REMP using either PSG EEG data with embedded sleep-stage annotations or with the annotation data alone. For PSG EEG data, <italic>SSAVE</italic> generates a spectrogram for visualization in addition to a hypnogram. We also provide a web version of the tool along with the desktop version to allow occasional use of the tool without requiring installation. We also kept the functionality of the tool separate from its user interface, thereby allowing users integrate the functionality as a Python package. We also improved the rules for sleep-period identification. We envision that <italic>SSAVE</italic> will facilitate the exploration and utilization of the rich electrophysiology data available from overnight PSG studies for better understanding of sleep architecture and brain function.</p>
</sec>
<sec sec-type="data-availability" id="s5">
<title>Data availability statement</title>
<p>The original contributions presented in the study are included in the article/<xref ref-type="supplementary-material" rid="SM1">Supplementary material</xref>, further inquiries can be directed to the corresponding authors.</p>
</sec>
<sec sec-type="author-contributions" id="s6">
<title>Author contributions</title>
<p>Conceptualization: AT, LL, and ZF. Research and implementation: AT, YL, DY, and DU. Writing: AT, LL, ZF, and DU with help from all authors. All authors contributed to the article and approved the submitted version.</p>
</sec>
</body>
<back>
<sec sec-type="funding-information" id="s7">
<title>Funding</title>
<p>This research was supported by the Intramural Research Program of the National Institutes of Health, National Institute of Environmental Health Sciences (ZIA ES101765).</p>
</sec>
<ack><p>We are grateful to the NIEHS Office of Scientific Computing for computing support and also to Frank Day for help with the website hosting. We thank Nishanth Anandanadarajah for input and discussions.</p>
</ack>
<sec sec-type="COI-statement" id="conf1">
<title>Conflict of interest</title>
<p>The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.</p>
</sec>
<sec sec-type="disclaimer" id="s8">
<title>Publisher&#x00027;s note</title>
<p>All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.</p>
</sec>
<sec sec-type="supplementary-material" id="s9">
<title>Supplementary material</title>
<p>The Supplementary Material for this article can be found online at: <ext-link ext-link-type="uri" xlink:href="https://www.frontiersin.org/articles/10.3389/frsle.2023.1102391/full#supplementary-material">https://www.frontiersin.org/articles/10.3389/frsle.2023.1102391/full#supplementary-material</ext-link></p>
<supplementary-material xlink:href="Data_Sheet_1.docx" id="SM1" mimetype="application/vnd.openxmlformats-officedocument.wordprocessingml.document" xmlns:xlink="http://www.w3.org/1999/xlink"/>
</sec>
<ref-list>
<title>References</title>
<ref id="B1">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Adamantidis</surname> <given-names>A. R.</given-names></name> <name><surname>Gutierrez Herrera</surname> <given-names>C.</given-names></name> <name><surname>Gent</surname> <given-names>T. C.</given-names></name></person-group> (<year>2019</year>). <article-title>Oscillating circuitries in the sleeping brain</article-title>. <source>Nat. Rev. Neurosci.</source> <volume>20</volume>, <fpage>746</fpage>&#x02013;<lpage>762</lpage>. <pub-id pub-id-type="doi">10.1038/s41583-019-0223-4</pub-id><pub-id pub-id-type="pmid">31616106</pub-id></citation></ref>
<ref id="B2">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Aserinsky</surname> <given-names>E.</given-names></name> <name><surname>Kleitman</surname> <given-names>N.</given-names></name></person-group> (<year>1953</year>). <article-title>Regularly occurring periods of eye motility, and concomitant phenomena, during sleep</article-title>. <source>Science</source> <volume>118</volume>, <fpage>273</fpage>&#x02013;<lpage>274</lpage>. <pub-id pub-id-type="doi">10.1126/science.118.3062.273</pub-id><pub-id pub-id-type="pmid">14627774</pub-id></citation></ref>
<ref id="B3">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Aserinsky</surname> <given-names>E.</given-names></name> <name><surname>Kleitman</surname> <given-names>N.</given-names></name></person-group> (<year>1955</year>). <article-title>Two types of ocular motility occurring in sleep</article-title>. <source>J. Appl. Physiol.</source> <volume>8</volume>, <fpage>1</fpage>&#x02013;<lpage>10</lpage>. <pub-id pub-id-type="doi">10.1152/jappl.1955.8.1.1</pub-id><pub-id pub-id-type="pmid">13242483</pub-id></citation></ref>
<ref id="B4">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Berry</surname> <given-names>R. B.</given-names></name> <name><surname>Brooks</surname> <given-names>R.</given-names></name> <name><surname>Gamaldo</surname> <given-names>C. E.</given-names></name> <name><surname>Harding</surname> <given-names>S. M.</given-names></name> <name><surname>Lloyd</surname> <given-names>R. M.</given-names></name> <name><surname>Quan</surname> <given-names>S. F.</given-names></name> <etal/></person-group> (<year>2017</year>) <article-title>AASM scoring manual updates for 2017 (Version 2.4).</article-title> <source>J. Clin. Sleep. Med</source>. <volume>13</volume>, <fpage>665</fpage>&#x02013;<lpage>666</lpage>. <pub-id pub-id-type="doi">10.5664/jcsm.6576</pub-id>.<pub-id pub-id-type="pmid">28416048</pub-id></citation></ref>
<ref id="B5">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Blume</surname> <given-names>C.</given-names></name> <name><surname>Cajochen</surname> <given-names>C.</given-names></name></person-group> (<year>2021</year>). <article-title>&#x02018;SleepCycles&#x00027; package for R - A free software tool for the detection of sleep cycles from sleep staging</article-title>. <source>MethodsX</source> <volume>8</volume>, <fpage>101318</fpage>. <pub-id pub-id-type="doi">10.1016/j.mex.2021.101318</pub-id><pub-id pub-id-type="pmid">34434837</pub-id></citation></ref>
<ref id="B6">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Feinberg</surname> <given-names>I.</given-names></name> <name><surname>Floyd</surname> <given-names>T.</given-names></name></person-group> (<year>1979</year>). <article-title>Systematic trends across the night in human sleep cycles</article-title>. <source>Psychophysiology</source> <volume>16</volume>, <fpage>283</fpage>&#x02013;<lpage>291</lpage>. <pub-id pub-id-type="doi">10.1111/j.1469-8986.1979.tb02991.x</pub-id><pub-id pub-id-type="pmid">220659</pub-id></citation></ref>
<ref id="B7">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Franks</surname> <given-names>N. P.</given-names></name> <name><surname>Wisden</surname> <given-names>W.</given-names></name></person-group> (<year>2021</year>). <article-title>The inescapable drive to sleep: overlapping mechanisms of sleep and sedation</article-title>. <source>Science</source> <volume>374</volume>, <fpage>556</fpage>&#x02013;<lpage>559</lpage>. <pub-id pub-id-type="doi">10.1126/science.abi8372</pub-id><pub-id pub-id-type="pmid">34709918</pub-id></citation></ref>
<ref id="B8">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Galland</surname> <given-names>B. C.</given-names></name> <name><surname>Taylor</surname> <given-names>B. J.</given-names></name> <name><surname>Elder</surname> <given-names>D. E.</given-names></name> <name><surname>Herbison</surname> <given-names>P.</given-names></name></person-group> (<year>2012</year>). <article-title>Normal sleep patterns in infants and children: a systematic review of observational studies</article-title>. <source>Sleep Med. Rev.</source> <volume>16</volume>, <fpage>213</fpage>&#x02013;<lpage>222</lpage>. <pub-id pub-id-type="doi">10.1016/j.smrv.2011.06.001</pub-id><pub-id pub-id-type="pmid">21784676</pub-id></citation></ref>
<ref id="B9">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Goh</surname> <given-names>G. H.</given-names></name> <name><surname>Maloney</surname> <given-names>S. K.</given-names></name> <name><surname>Mark</surname> <given-names>P. J.</given-names></name> <name><surname>Blache</surname> <given-names>D.</given-names></name></person-group> (<year>2019</year>). <article-title>Episodic ultradian events&#x02014;ultradian rhythms</article-title>. <source>Biology</source> <volume>8</volume>, <fpage>15</fpage>. <pub-id pub-id-type="doi">10.3390/biology8010015</pub-id><pub-id pub-id-type="pmid">30875767</pub-id></citation></ref>
<ref id="B10">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Hartmann</surname> <given-names>E.</given-names></name></person-group> (<year>1968</year>). <article-title>The 90-minute sleep-dream cycle</article-title>. <source>Arch. Gen. Psychiatry</source> <volume>18</volume>, <fpage>280</fpage>&#x02013;<lpage>286</lpage>. <pub-id pub-id-type="doi">10.1001/archpsyc.1968.01740030024004</pub-id><pub-id pub-id-type="pmid">5638533</pub-id></citation></ref>
<ref id="B11">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>H&#x000F6;gl</surname> <given-names>B.</given-names></name> <name><surname>Stefani</surname> <given-names>A.</given-names></name> <name><surname>Videnovic</surname> <given-names>A.</given-names></name></person-group> (<year>2018</year>). <article-title>Idiopathic REM sleep behaviour disorder and neurodegeneration&#x02014;an update</article-title>. <source>Nat. Rev. Neurol.</source> <volume>14</volume>, <fpage>40</fpage>&#x02013;<lpage>55</lpage>. <pub-id pub-id-type="doi">10.1038/nrneurol.2017.157</pub-id><pub-id pub-id-type="pmid">29170501</pub-id></citation></ref>
<ref id="B12">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Iber</surname> <given-names>C.</given-names></name> <name><surname>Ancoli-Israel</surname> <given-names>S.</given-names></name> <name><surname>Chesson</surname> <given-names>A.</given-names></name> <name><surname>Quan</surname> <given-names>S.</given-names></name></person-group> (<year>2007</year>). <source>The AASM Manual for the Scoring of Sleep and Associated Events: Rules, Terminology and Technical Specifications, 1st Edn</source>. <publisher-loc>Westchester, IL</publisher-loc>: <publisher-name>American Academy of Sleep Medicine</publisher-name>.</citation>
</ref>
<ref id="B13">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Ju</surname> <given-names>Y. E. S.</given-names></name> <name><surname>Lucey</surname> <given-names>B. P.</given-names></name> <name><surname>Holtzman</surname> <given-names>D. M.</given-names></name></person-group> (<year>2014</year>). <article-title>Sleep and Alzheimer disease pathology&#x02014;a bidirectional relationship</article-title>. <source>Nat. Rev. Neurol.</source> <volume>10</volume>, <fpage>115</fpage>&#x02013;<lpage>119</lpage>. <pub-id pub-id-type="doi">10.1038/nrneurol.2013.269</pub-id><pub-id pub-id-type="pmid">24366271</pub-id></citation></ref>
<ref id="B14">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Knoop</surname> <given-names>M. S.</given-names></name> <name><surname>de Groot</surname> <given-names>E. R.</given-names></name> <name><surname>Dudink</surname> <given-names>J.</given-names></name></person-group> (<year>2021</year>). <article-title>Current ideas about the roles of rapid eye movement and non&#x02013;rapid eye movement sleep in brain development</article-title>. <source>Acta Paediatr.</source> <volume>110</volume>, <fpage>36</fpage>&#x02013;<lpage>44</lpage>. <pub-id pub-id-type="doi">10.1111/apa.15485</pub-id><pub-id pub-id-type="pmid">32673435</pub-id></citation></ref>
<ref id="B15">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Krause</surname> <given-names>A. J.</given-names></name> <name><surname>Simon</surname> <given-names>E. B.</given-names></name> <name><surname>Mander</surname> <given-names>B. A.</given-names></name> <name><surname>Greer</surname> <given-names>S. M.</given-names></name> <name><surname>Saletin</surname> <given-names>J. M.</given-names></name> <name><surname>Goldstein-Piekarski</surname> <given-names>A. N.</given-names></name> <etal/></person-group>. (<year>2017</year>). <article-title>The sleep-deprived human brain</article-title>. <source>Nat. Rev. Neurosci.</source> <volume>18</volume>, <fpage>404</fpage>&#x02013;<lpage>418</lpage>. <pub-id pub-id-type="doi">10.1038/nrn.2017.55</pub-id><pub-id pub-id-type="pmid">28515433</pub-id></citation></ref>
<ref id="B16">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Kryger</surname> <given-names>M. H.</given-names></name> <name><surname>Roth</surname> <given-names>T.</given-names></name> <name><surname>Dement</surname> <given-names>W. C.</given-names></name></person-group> (<year>2017</year>). <source>Principles and Practice of Sleep Medicine.</source> <publisher-loc>Philadelphia, PA</publisher-loc>: <publisher-name>Elsevier</publisher-name>.</citation>
</ref>
<ref id="B17">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Le Bon</surname> <given-names>O.</given-names></name> <name><surname>Staner</surname> <given-names>L.</given-names></name> <name><surname>Rivelli</surname> <given-names>S. K.</given-names></name> <name><surname>Hoffmann</surname> <given-names>G.</given-names></name> <name><surname>Pelc</surname> <given-names>I.</given-names></name> <name><surname>Linkowski</surname> <given-names>P.</given-names></name></person-group> (<year>2002</year>). <article-title>Correlations using the NREM-REM sleep cycle frequency support distinct regulation mechanisms for REM and NREM sleep</article-title>. <source>J. Appl. Physiol.</source> <volume>93</volume>, <fpage>141</fpage>&#x02013;<lpage>146</lpage>. <pub-id pub-id-type="doi">10.1152/japplphysiol.00917.2001</pub-id><pub-id pub-id-type="pmid">12070197</pub-id></citation></ref>
<ref id="B18">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Mander</surname> <given-names>B. A.</given-names></name> <name><surname>Winer</surname> <given-names>J. R.</given-names></name> <name><surname>Walker</surname> <given-names>M. P.</given-names></name></person-group> (<year>2017</year>). <article-title>Sleep and human aging</article-title>. <source>Neuron</source> <volume>94</volume>, <fpage>19</fpage>&#x02013;<lpage>36</lpage>. <pub-id pub-id-type="doi">10.1016/j.neuron.2017.02.004</pub-id><pub-id pub-id-type="pmid">28384471</pub-id></citation></ref>
<ref id="B19">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>McCarley</surname> <given-names>R. W.</given-names></name></person-group> (<year>2007</year>). <article-title>Neurobiology of REM and NREM sleep</article-title>. <source>Sleep Med.</source> <volume>8</volume>, <fpage>302</fpage>&#x02013;<lpage>330</lpage>. <pub-id pub-id-type="doi">10.1016/j.sleep.2007.03.005</pub-id><pub-id pub-id-type="pmid">17468046</pub-id></citation></ref>
<ref id="B20">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Merica</surname> <given-names>H.</given-names></name> <name><surname>Gaillard</surname> <given-names>J.-M.</given-names></name></person-group> (<year>1986</year>). <article-title>Internal structure of sleep cycles in a healthy population</article-title>. <source>Sleep</source> <volume>9</volume>, <fpage>502</fpage>&#x02013;<lpage>513</lpage>. <pub-id pub-id-type="doi">10.1093/sleep/9.4.502</pub-id><pub-id pub-id-type="pmid">3809864</pub-id></citation></ref>
<ref id="B21">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Moser</surname> <given-names>D.</given-names></name> <name><surname>Anderer</surname> <given-names>P.</given-names></name> <name><surname>Gruber</surname> <given-names>G.</given-names></name> <name><surname>Parapatics</surname> <given-names>S.</given-names></name> <name><surname>Loretz</surname> <given-names>E.</given-names></name> <name><surname>Boeck</surname> <given-names>M.</given-names></name> <etal/></person-group>. (<year>2009</year>). <article-title>Sleep classification according to AASM and Rechtschaffen and Kales: effects on sleep scoring parameters</article-title>. <source>Sleep</source> <volume>32</volume>, <fpage>139</fpage>&#x02013;<lpage>149</lpage>. <pub-id pub-id-type="doi">10.1093/sleep/32.2.139</pub-id><pub-id pub-id-type="pmid">19912509</pub-id></citation></ref>
<ref id="B22">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Ohayon</surname> <given-names>M. M.</given-names></name> <name><surname>Carskadon</surname> <given-names>M. A.</given-names></name> <name><surname>Guilleminault</surname> <given-names>C.</given-names></name> <name><surname>Vitiello</surname> <given-names>M. V.</given-names></name></person-group> (<year>2004</year>). <article-title>Meta-analysis of quantitative sleep parameters from childhood to old age in healthy individuals: developing normative sleep values across the human lifespan</article-title>. <source>Sleep</source> <volume>27</volume>, <fpage>1255</fpage>&#x02013;<lpage>1273</lpage>. <pub-id pub-id-type="doi">10.1093/sleep/27.7.1255</pub-id><pub-id pub-id-type="pmid">15586779</pub-id></citation></ref>
<ref id="B23">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Paller</surname> <given-names>K. A.</given-names></name> <name><surname>Creery</surname> <given-names>J. D.</given-names></name> <name><surname>Schechtman</surname> <given-names>E.</given-names></name></person-group> (<year>2021</year>). <article-title>Memory and sleep: how sleep cognition can change the waking mind for the better</article-title>. <source>Ann. Rev. Psychol.</source> <volume>72</volume>, <fpage>123</fpage>&#x02013;<lpage>150</lpage>. <pub-id pub-id-type="doi">10.1146/annurev-psych-010419-050815</pub-id><pub-id pub-id-type="pmid">32946325</pub-id></citation></ref>
<ref id="B24">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Prerau</surname> <given-names>M. J.</given-names></name> <name><surname>Brown</surname> <given-names>R. E.</given-names></name> <name><surname>Bianchi</surname> <given-names>M. T.</given-names></name> <name><surname>Ellenbogen</surname> <given-names>J. M.</given-names></name> <name><surname>Purdon</surname> <given-names>P. L.</given-names></name></person-group> (<year>2017</year>). <article-title>Sleep neurophysiological dynamics through the lens of multitaper spectral analysis</article-title>. <source>Physiology</source> <volume>32</volume>, <fpage>60</fpage>&#x02013;<lpage>92</lpage>. <pub-id pub-id-type="doi">10.1152/physiol.00062.2015</pub-id><pub-id pub-id-type="pmid">27927806</pub-id></citation></ref>
<ref id="B25">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Redline</surname> <given-names>S.</given-names></name> <name><surname>Kirchner</surname> <given-names>H. L.</given-names></name> <name><surname>Quan</surname> <given-names>S. F.</given-names></name> <name><surname>Gottlieb</surname> <given-names>D. J.</given-names></name> <name><surname>Kapur</surname> <given-names>V.</given-names></name> <name><surname>Newman</surname> <given-names>A.</given-names></name></person-group> (<year>2004</year>). <article-title>The effects of age, sex, ethnicity, and sleep-disordered breathing on sleep architecture</article-title>. <source>Arch. Intern. Med.</source> <volume>164</volume>, <fpage>406</fpage>&#x02013;<lpage>418</lpage>. <pub-id pub-id-type="doi">10.1001/archinte.164.4.406</pub-id><pub-id pub-id-type="pmid">14980992</pub-id></citation></ref>
<ref id="B26">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Wei</surname> <given-names>Y.</given-names></name> <name><surname>Colombo</surname> <given-names>M. A.</given-names></name> <name><surname>Ramautar</surname> <given-names>J. R.</given-names></name> <name><surname>Blanken</surname> <given-names>T. F.</given-names></name> <name><surname>Van Der Werf</surname> <given-names>Y. D.</given-names></name> <name><surname>Spiegelhalder</surname> <given-names>K.</given-names></name> <etal/></person-group>. (<year>2017</year>). <article-title>Sleep stage transition dynamics reveal specific stage 2 vulnerability in insomnia</article-title>. <source>Sleep</source>. 40, zsx117. <pub-id pub-id-type="doi">10.1093/sleep/zsx117</pub-id><pub-id pub-id-type="pmid">28934523</pub-id></citation></ref>
<ref id="B27">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Wulff</surname> <given-names>K.</given-names></name> <name><surname>Gatti</surname> <given-names>S.</given-names></name> <name><surname>Wettstein</surname> <given-names>J. G.</given-names></name> <name><surname>Foster</surname> <given-names>R. G.</given-names></name></person-group> (<year>2010</year>). <article-title>Sleep and circadian rhythm disruption in psychiatric and neurodegenerative disease</article-title>. <source>Nat. Rev. Neurosci.</source> <volume>11</volume>, <fpage>589</fpage>&#x02013;<lpage>599</lpage>. <pub-id pub-id-type="doi">10.1038/nrn2868</pub-id><pub-id pub-id-type="pmid">20631712</pub-id></citation></ref>
</ref-list> 
</back>
</article> 