Elsevier

Sleep Medicine

Volume 16, Issue 12, December 2015, Pages 1541-1549
Sleep Medicine

Original Article
MATPLM1, A MATLAB script for scoring of periodic limb movements: preliminary validation with visual scoring

https://doi.org/10.1016/j.sleep.2015.03.008Get rights and content

Highlights

  • MATPLM1, a Matrix Laboratory (MATLAB) script, detects periodic limb movements in sleep (PLMS) from both legs based on World Associations of Sleep Medicine (WASM) scoring criteria.

  • MATPLM1 is accurate compared to detailed expert visual scoring of PLMS.

  • The usual visual scoring by trained technicians significantly underscores PLMS.

Abstract

Background and Purpose

A Matrix Laboratory (MATLAB) script (MATPLM1) was developed to rigorously apply World Associations of Sleep Medicine (WASM) scoring criteria for periodic limb movements in sleep (PLMS) from bilateral electromyographic (EMG) leg recordings. This study compares MATPLM1 with both standard technician and expert detailed visual PLMS scoring.

Methods and Subjects

Validation was based on a ‘macro’ level by agreement for PLMS/h during a night recording and on a ‘micro’ level by agreement for the detection of each PLMS from a stratified random sample for each subject. Data available for these analyses were from 15 restless leg syndrome (RLS) (age: 61.5 ± 8.5, 60% female) and nine control subjects (age: 61.4 ± 7.1, 67% female) participating in another study.

Results

In the ‘micro’ analysis, MATPLM1 and the visual detection of PLMS events agreed 87.7% for technician scoring and 94.4% for expert scoring. The technician and MATPLM1 scoring disagreements were checked for 36 randomly selected events, 97% involved clear technician-scoring error. In the ‘macro’ analysis, MATPLM1 rates of PMLS/h correlated highly with visual scoring by the technician (r2 = 0.97) and the expert scorer (r2 = 0.99), but the technician scoring was consistently less than MATPLM1: median (quartiles) difference: 10 (5, 23). There was little disagreement with expert scorer [median (quartile) difference: −0.3 (−2.4, 0.3)].

Conclusions

The MATPLM1 produces reliable scoring of PLMS that matches expert scoring. The standard visual scoring without careful measuring of events tends to significantly underscore PLMS. These preliminary results support the use of MATPLM1 as a preferred method of scoring PLMS for EMG recordings that are of a good quality and without significant sleep-disordered breathing events.

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.

. ICMJE Form for Disclosure of Potential Conflicts of Interest form.

References (17)

There are more references available in the full text version of this article.

Cited by (18)

  • Periodic Leg Movements During Sleep

    2021, Sleep Medicine Clinics
  • Reinventing polysomnography in the age of precision medicine

    2020, Sleep Medicine Reviews
    Citation 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 Medicine
    Citation 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.

View all citing articles on Scopus
View full text