Original ArticleMATPLM1, A MATLAB script for scoring of periodic limb movements: preliminary validation with visual scoring
Introduction
Periodic limb movements in sleep (PLMS) occur as a motor sign of the restless leg syndrome (RLS), also known as Willis–Ekbom disease (WED) [1], but they also occur in other conditions [2] and tend to become more prominent with age [3]. These events have been most precisely defined in the World Associations of Sleep Medicine (WASM) criteria [4]. They are measured from uncalibrated electromyographic (EMG) recordings from surface electrodes on bilateral anterior tibialis muscles. The events from each leg are combined following rules specified in the WASM criteria. These events are commonly identified by human visual scoring. The scorer moves through a night's recording of sleep of the patient observing at 30–120-s epochs, marking each leg movement event (LM) that meets the criteria for a PLMS. This is often assisted by a scoring program (RemLogic) that is part of the systems used to collect the physiological data from sleep. These programs mark potential PLMS, but most are not validated; they do not use the WASM/International Restless Legs Syndrome Study Group (IRLSSG) standard scoring criteria, and generally they need considerable visual correction. The WASM standard requires careful and detailed measurements of the EMG for each potential periodic leg movement (PLM). It provides an explicit definition of the EMG signal for a PLM rather than relying on the judgment of a visual scorer. The tedious nature of measuring PLMS by the WASM criteria, however, produces situations likely to lead to scoring errors. For example, scoring fatigue may occur when care has to be taken to measure hundreds of moves, leading to events being missed. Conversely, when they are rare, false expectations can lead to failure to measure possible events. Moreover, the current visual scoring process focuses on the absolute number of events, and it does not closely assess start and stop times of events and thus usually does not provide a good measure of the durations and inter-movement intervals (IMIs) between the events. Recent studies have noted that the measurement of PLMS should include consideration of these other features that are not reliably produced by the usual visual scoring, particularly for IMIs and the periodicity index [5].
In this paper, we demonstrate the ability to score PLMS from the EMG component of patients' polysomnogram (PSG) using a program (MATPLM1) on Matrix Laboratory (MATLAB), and to validate its accuracy for the detection of events in comparison with the traditional visual scoring. The validation focuses on the detection of PLMS events independent of related factors such as electroencephalographic (EEG) arousal or respiratory events. Future versions of MATPLM1 will add script to mark the PLMS occurring with significant events. This validation study not only determines at the macro-level agreement for the total number of PLMS during a night recording, but also evaluates at the micro-level the basis for difference from a stratified random selection of specific PLM covering the full night's recording. This MATLAB program provides a general application for use on any EMG with sleep-stage scored data from sleep laboratories that can be converted to European Data Format (EDF). It also provides the periodicity index and descriptive statistics with arrays for PLM durations, amplitudes, sleep stages, time, and IMI for each PLMS. The script allows adjusting significant parameters, for example, sampling rate, filter densities, and minimum IMI, and it can be used for batch processing of a large set of data.
Section snippets
MATPLM1 scoring algorithm
The MATPLM1 program reads the sampling rate from the EDF file. It applies the MATLAB implementation of a Butterworth filter with a low pass set at 225 Hz and a high pass set at 20 Hz to the EMG data, and then it rectifies the signal. The filter settings are parameters in the program set for the rectified signal and sampling rate for the data used in this study. They can be easily adjusted as appropriate. A separate text array specifies the sleep stage for each 30-s epoch of the night's sleep
Threshold comparisons
Independently, two scorers visually measured resting EMGs from 10 patients, and they had an inter-scorer reliability of r2 = 0.90 and 90% differences less than or equal to ±2 µv. The MATPLM1 auto-threshold had an agreement with the average of the scorers of r2 = 0.83 and 90% differences less than or equal to ±1 µv. The auto-thresholds compared to visually determined thresholds had an average lower resting EMG of 0.5 µV, well within the range of the inter-scorer agreement.
Micro-analysis result
A total of 694 events
Discussion
There are two major findings from this study. First, the MATPLM1 produces reliable and accurate scoring of PLMS that matches well with expert scoring. Second, the standard visual scoring of PLMS by technician tends to significantly underscore PLMS. Visual scoring errors were particularly large for RLS patients who had a large number of PLMS events. This seems hardly surprising. Scoring fatigue has to be a problem when visually checking hundreds of these small events over the entire night's
Summary
These results validate MATPLM1 as accurate for scoring PLMS following the WASM criteria. The usual sleep technician scoring, by contrast, often fails to correctly identify PLMS based on the WASM criteria, particularly when there are a large number of events to be measured as possible PLMS. The results thus demonstrate that a validated automatic scoring such as MATPLM1 should be preferred to a technician visual scoring. MATPLM1 is available as a MATLAB script that can be applied to data in EDF.
Conflict of interest
The ICMJE Uniform Disclosure Form for Potential Conflicts of Interest associated with this article can be viewed by clickingon the following link: http://dx.doi.org/10.1016/j.sleep.2015.03.008.
References (17)
- et al.
Restless legs syndrome/Willis-Ekbom disease diagnostic criteria: updated International Restless Legs Syndrome Study Group (IRLSSG) consensus criteria–history, rationale, description, and significance
Sleep Med
(2014) - et al.
Periodic leg movements are not more prevalent in insomnia or hypersomnia but are specifically associated with sleep disorders involving a dopaminergic impairment
Sleep Med
(2000) - et al.
The official World Association of Sleep Medicine (WASM) standards for recording and scoring periodic leg movements in sleep (PLMS) and wakefulness (PLMW) developed in collaboration with a task force from the International Restless Legs Syndrome Study Group (IRLSSG)
Sleep Med
(2006) The time structure of leg movement activity during sleep: the theory behind the practice
Sleep Med
(2012)- et al.
PLM detection by actigraphy compared to polysomnography: a validation and comparison of two actigraphs
Sleep Med
(2009) - et al.
The validity of the PAM-RL device for evaluating periodic limb movements in sleep and an investigation on night-to-night variability of periodic limb movements during sleep in patients with restless legs syndrome or periodic limb movement disorder using this system
Sleep Med
(2014) - et al.
The PAM-RL ambulatory device for detection of periodic leg movements: a validation study
Sleep Med
(2005) - et al.
The Pittsburgh Sleep Quality Index: a new instrument for psychiatric practice and research
Psychiatry Res
(1989)
Cited by (18)
Periodic Leg Movements During Sleep
2021, Sleep Medicine ClinicsReinventing polysomnography in the age of precision medicine
2020, Sleep Medicine ReviewsCitation Excerpt :And, while leg movements are a common finding in patients with sleep disordered breathing, leg movements are not always causally linked to respiratory events [102]. To address this, the validated automatic scoring program MATPLM1 [103] was used to identify candidate leg movements according to standards put forth by the World Association of Sleep Medicine [104,105]. If the recommended rules for algorithms are implemented, a high sensitivity and specificity for diagnosing periodic limb movements during sleep can be reached.
Design of a deep learning model for automatic scoring of periodic and non-periodic leg movements during sleep validated against multiple human experts
2020, Sleep MedicineCitation Excerpt :Several methods designed to automatically score limb movements have been proposed. These include methods designed by Tauchmann and Pollmacher [8], Wetter et al. [6], Ferri et al. [9], Moore et al. [10], and Huang et al., [11]. In addition, Alvarez-Estevez et al. [12], implemented a method for detection and analysis of periodicity of limb movements that handles artifact presence and compares the results to some of the previous methods.
Restless legs syndrome and periodic limb movements after lacunar stroke
2017, Sleep Medicine