Sleep and Biological Rhythms 2008; 6: 163–171
doi:10.1111/j.1479-8425.2008.00355.x
ORIGINAL ARTICLE
Algorithm for sleep scoring in experimental animals based on fast Fourier transform power spectrum analysis of the electroencephalogram Sayaka KOHTOH,1 Yujiro TAGUCHI,1 Naomi MATSUMOTO,2 Masashi WADA,2 Zhi-Li HUANG2 and Yoshihiro URADE1 1
Department of Medical Systems, Kissei Comtec Co., Ltd, Nagano, and 2Department of Molecular Behavioral Biology, Osaka Bioscience Institute, Osaka, Japan
Abstract We developed a simple computer-based, sleep scoring algorithm that categorizes three vigilance states of rats and mice as wakefulness, rapid eye movement (REM) sleep and non-rapid eye movement (NREM) sleep, based on fast Fourier transform analyses of an electroencephalogram (EEG) classified in the frequency bands of d (0.75–4 Hz) and q (6–10 Hz), and other parameters such as electromyogram (EMG) integral and animal movement. This algorithm is composed of four steps. Step 1, active wakefulness, is specified when activity is detected by monitoring the animal with an infrared locomotion sensor. Step 2, NREM, is decided by an EEG d power greater than the threshold. Step 3, REM, is specified by a higher EEG q/(d + q) ratio and a lower EMG integral than the threshold values and Step 4, an undefined epoch, is classified as a state of quiet wakefulness. This algorithm was found to be in >90% agreement with the waveform recognition procedure and decreased processing time to 40 min for 24-h recording data from eight animals. New software, SleepSign ver. 3, was designed to calculate automatically the three threshold values based on percentage of time spent in each sleep stage thus far reported in rodents. Key words: electroencephalogram, fast Fourier transform, locomotion, sleep scoring, waveform recognition.
INTRODUCTION The Rechtschaffen and Kales1 method has been used as the global standard for scoring sleep stages in humans, in which waveform recognition is used to specify the frequency of the electroencephalogram (EEG). Waveform recognition method was modified by Fujimori et al.2 and others3–11 for scoring sleep stages with a Correspondence: Dr Yoshihiro Urade, Department of Molecular Behavioral Biology, Osaka Bioscience Institute, 6-2-4 Furuedai Suita-shi, Osaka 565-0874, Japan. Email:
[email protected] Accepted for publication 10 May 2008.
© 2008 The Authors Journal compilation © 2008 Japanese Society of Sleep Research
computer. Our SleepSign ver. 2 software (Kissei Comtec, Nagano, Japan) was programmed to score the sleep stages in rats and mice based on their EEG and electromyogram (EMG), by diverting from the waveform recognition. The software resulted in about 85% agreement with visual scoring.12,13 However, there are several technical problems in the waveform recognition method in scoring sleep stages with a computer. Users have to enter a number of values into the software, such as peak detection and amplitude values, frequency bands and half wave counts. Because the position and the depth of the electrodes are different in individual surgeries, the amplitude of the EEG and EMG differs significantly among analyses. It is also
163
S Kohtoh et al.
necessary to determine the values by analyzing individual differences in the waveform amplitude. The movement of the animals during their waking state causes artificial changes in the waveform, leading to a misidentification of the stage. It therefore takes about 0.5 h to score 6 h of data recorded from one animal using the SleepSign ver. 2 software.12 Consequently, much more efficient and time-saving software should be developed for use by basic sleep researchers. In this study we developed a simple new algorithm for scoring the sleep stages in rodents by using fast Fourier transform (FFT) power spectral analysis and demonstrated that this new method markedly reduces the time and trouble in calculating associated with waveform recognition.
METHODS Animals Adult male Wistar rats and C57BL/6J mice were used in this study. The animals were housed in an insulated and soundproof recording room that was maintained at an ambient temperature of 22 ⫾ 0.5°C with a relative humidity of 60 ⫾ 2% and that was on an automatically controlled in cycles of 12-h light/12-h dark (lights on at 08.00 hours, illumination intensity ~100 lux). The animals had free access to food and water. The experimental protocols were approved by the Animal Care Committee of Osaka Bioscience Institute. Every effort was made to minimize the number of animals used and any pain and discomfort experienced by the subjects, as previously reported.14
Polygraphic recordings Rats under pentobarbital anesthesia (50 mg/kg, i.p.) were implanted with electrodes for polysomnographic recordings of EEG, EMG, electrocardiogram (ECG), and brain temperature and the mice were implanted with electrodes for EEG and EMG. For the rats, the implant consisted of two stainless steel wires (1 mm in diameter) that were inserted through the skull to the cerebral cortex (the first wire: anteroposterior (AP), +2 mm; left– right (LR), -2 mm; the second: AP, +0 mm; LR, 3–4 mm, the third: AP, -2 mm; LR, -2 mm, AP from bregma, LR from lambda) according to the stereotaxic coordinates of Paxinos and Watson15,16 and served as EEG and brain temperature electrodes. For the mice, the implant consisted of two stainless steel screws (1 mm in diameter) that were inserted through the skull of the
164
cortex (AP, +1 mm; LR -1.5 mm from bregma or lambda) according to the atlas of Franklin and Paxinos17 and served as EEG electrodes. Two insulated stainless steel, Teflon-coated wires were bilaterally placed into both trapezius muscles to serve as EMG electrodes.18 The bipolar ECG electrode was implanted under the skin at the manubrium of the sternum and xiphoid process. All electrodes were attached to a microconnector and fixed to the skull with dental cement. The locomotion sensor on the animal cage detected the movement of animals by infrared rays. The signal recordings were carried out by means of a slip ring designed so that movements of the animals were not restricted. After a 10-day recovery period the animals were housed individually in transparent barrels and habituated to the recording cable for 3–4 days before polygraphic recording began. For the study of spontaneous sleep–wakefulness cycles, each animal was recorded for 24 h beginning at 08.00 h, the onset of the light period. The data were recorded for 1, 2 or 4 days for the rats and for 6 h or 1 day for the mice. The signals were amplified and filtered (EEG and brain temperature, 0.5–30 Hz; EMG and ECG, 10–100 Hz; locomotion not filtered) and then digitized at a sampling rate of 128 Hz and recorded by using SleepSign ver. 2 recording software, as described previously.19–21
Waveform recognition scoring Waveform recognition, otherwise known as the histogram method2 or pattern recognition,3 is used to specify the peak of a waveform when two or more waves overlap. The EEG and EMG signals were automatically scored off line, based on waveform recognition in 10-sec epochs as sleep–wake stages by SleepSign ver. 222 according to standard criteria.19–21 Defined sleep–wake stages were examined visually and corrected if necessary.
Signal analysis and scoring Data were also analyzed in 10-sec epochs by the new software SleepSign ver. 3 (Kissei Comtec, Nagano, Japan). The signals were subjected to simple analysis in the time domain. The EEG signal was separated into five regions per epoch (10 sec). Each region was FFT calculated by using 256 datum points (2 sec) and the Hanning window, before the five spectra were averaged. The spectrum has the resolution of 0.5 Hz. It was then
© 2008 The Authors Journal compilation © 2008 Japanese Society of Sleep Research
Algorithm for animal sleep scoring
Wakefulness
REM
NREM
rat b)
EEG θ/(δ+θ) ratio (%)
a)
EEG δ power (µV2)
EMG integral (µV/sec)
mouse c)
EEG θ/(δ+θ) ratio (%)
d)
EEG δ power (µV2)
EMG integral (µV/sec)
Figure 1 Distribution of electroencephalogram (EEG) q/(d + q) ratio, EEG d power, and electromyogram (EMG) integral in wakefulness, Non-rapid eye movement (NREM), and rapid eye movement (REM) epochs. The data were separately plotted as wakefulness (green), NREM sleep (blue), and REM sleep (red). The EEG q/(d + q) ratio (%) and d power (mV2) in all epochs in rat (a) and mouse (c) (n = 13 273 epochs from scoring sleep for 24 hr) were plotted. The vertical dotted black line indicates the threshold of d power for NREM-state determination (18 000 mV2 for this rat and 1000 mV2 for this mouse). The EEG q/(d + q) ratio (%) and EMG integral (mV/sec) in all epochs of rat (b) and mouse (d) were also plotted. Vertical and horizontal dotted black lines indicate the threshold values of the EMG integral and EEG q/(d + q) ratio for REM-state determination (8 mV/sec and 76%, respectively, in this rat and 6 mV/sec and 50%, respectively, in this mouse). These three threshold values were determined to be the point where the separation between states was greatest in each animal.
© 2008 The Authors Journal compilation © 2008 Japanese Society of Sleep Research
165
S Kohtoh et al.
Locomotor
Step: 1 No
Yes Locomotion > 0
EEG
Step: 2 Active wakefulness
Yes
EEG: δ> 173 ~ 2,133 µV2
No
EEG/EMG
Step: 3 NREM sleep
Yes
EEG: θ/(δ+θ) > 50 ~ 73% and EMG: Integral < 0.7 ~ 120µV/sec No
REM sleep
Quiet wakefulness
Figure 2 Flow chart of the decision-making process used by the fast Fourier transform (FFT) algorithm. At each step a value within the range leads to a definitive assignment of a state, while values outside the range are passed on to a successive step for further analysis. A value outside the range in the third step is classified as quiet wakefulness, which allows the recovery of waking epochs with a relatively low electromyogram (EMG) integral. EEG, electroencephalogram; NREM, non-rapid eye movement.
calculated into two frequency bands, i.e., d (0.75–4 Hz) and q (6–10 Hz),6,23,24 and the values for them were used to obtain the ratio of q/(d + q). The number that exceeded the threshold of locomotion signals was counted. After these values had been worked out, wakefulness, NREM and REM stages were specified with our algorithm.
RESULTS Selection of parameters to separate wakefulness, NREM and REM We analyzed various EEG parameters, such as the maximum amplitude of absolute value, integral, d or q power, the d/(d + q) or q/(d + q) ratio, and d + q power; EMG parameters such as the integral, maximum amplitude of absolute value, and coefficient of variation; brain
166
temperature parameters such as the mean and the rate of change; and ECG parameters such as the interval, the power ratio of low frequency (0.04–1.0 Hz)/high frequency (1.0–3.0 Hz),25 the heart rate, coefficient of variation of the inter-beat interval (duration between R spikes), and the peak frequency from 5 to 8 Hz. Among these, EEG d power, the EEG q/(d + q) ratio, and the EMG integral maximized discrimination among the different vigilance states of wakefulness, NREM, and REM in each epoch (Fig. 1). We therefore selected these three parameters to separate wakefulness, NREM, and REM in our new algorithm.
Algorithm based on FFT analysis Based on the distribution of the above three parameters in each vigilance state and the locomotion count, we designed a new process of the FFT algorithm, as
© 2008 The Authors Journal compilation © 2008 Japanese Society of Sleep Research
Algorithm for animal sleep scoring
Figure 3 Typical waveform and fast Fourier transform (FFT) spectrum of rat (a) or mouse (b) in states of active wakefulness, quiet wakefulness, rapid eye movement (REM) and non-rapid eye movement (NREM) sleep. In active wakefulness, the electroencephalogram (EEG) includes various frequencies. The electromyogram (EMG) and locomotion becomes activated. The active movement of animal results in movement noises in the EEG signal and an artificial FFT peak in a region of <0.5 Hz. In quiet wakefulness the EEG includes various frequencies. The EMG is active but locomotion is inactive. The FFT spectrum is flat. In the REM state the EEG includes the q frequency band. The EMG and locomotion are not completely active. The FFT spectrum contains a peak in the q band. In the NREM state, the EEG includes the d band, but the EMG and locomotion are not active. The FFT spectrum contains a peak in the d band.
© 2008 The Authors Journal compilation © 2008 Japanese Society of Sleep Research
167
S Kohtoh et al.
Figure 4 Time courses of parameters used for our new algorithm and a comparison of a hypnogram using the new algorithm and waveform recognition scoring of a rat (above) and a mouse (below) during a light (left) and a dark (right) phase. The state was specified with a locomotion count (a) for active wakefulness (green), and the electroencephalogram EEG d power (b) was used to define the non-rapid eye movement (NREM) state (blue). The rapid eye movement (REM) state (red) was classified with EEG q/(d + q) ratio (c) and EMG integral (d). The undefined epoch was classified as a quiet wakefulness state (green). The hypnogram displays stage changes obtained with our algorithm (e) and waveform recognition scoring (f). EMG, electromyogram; FFT, fast Fourier transform; N, NREM; R, REM; W, wakefulness. 䉴
summarized in Figure 2. In the first step, the stage of active wakefulness23 was defined if locomotion was detected. In the second step, the NREM epochs were classified with the EEG d power greater than the threshold (173 to 2133 mV2, depending on the individual experiment). In the third step, epochs with EEG q/(d + q) ratio above the threshold (50 to 73%, depending on the individual experiment) and an EMG integral below the threshold (0.7 to 120 mV/sec, depending on the individual experiment) were scored as REM sleep. In the last step, the remainder was classified as quiet wakefulness.23
Reliability of new scoring method based on our FFT algorithm Typical waveform and FFT spectrum among the different states are shown in Figure 3. In addition, typical time courses of the parameters used for our new algorithm and hypnogram during light and dark phases are shown in Figure 4. The novel FFT algorithm method provided almost the same hypnogram as obtained by the waveform recognition scoring. The percentage agreement between the new scoring method and the previous method was 90.9 ⫾ 4.0% for the rats (n = 75 801 epochs of 10 rats) and 90.0 ⫾ 3.2% for mice (n = 131 066 epochs of 23 mice), for overall epochs clearly scored, and 93.4 ⫾ 5.6% (n = 45 529 epochs of the rats) and 91.6 ⫾ 4.8% (n = 76 572 epochs of the mice) for wakeful epochs. It was 85.0 ⫾ 3.7% (n = 25 553 epochs of the rats) and 91.7 ⫾ 6.7% (n = 48 487 epochs of the mice) for NREM epochs and 82.5 ⫾ 2.4% (n = 4719 epochs of the rats) and 65.0 ⫾ 19.0% (n = 5635 epochs of the mice) for REM epochs. These values were within the deviations of scoring among visual scorers.23,24 The processing time to score the sleep–wake state in the pooled 24-hr data from eight rats decreased to one-sixth, i.e., to 40 min, by the FFT method from the 240 min required by the waveform recognition method.
168
DISCUSSION Several scoring methods based on the power spectrum have previously been reported.23,24 In those methods the scoring comprised six parameters and 13 steps and the stage transition was corrected automatically after scoring. On the other hand, the following three points are unique to our algorithm: 1 Wakefulness is judged clearly by locomotion activity. 2 Our method used only two parameters, the d and q band, and contained four steps. 3 The stage after scoring is not corrected automatically. Thus, our algorithm is simple and useful for researchers. We finally selected three parameters, i.e., EEG d power, the EEG q/(d + q) ratio, and the EMG integral, for our new algorithm. Other EEG and EMG parameters showed little difference between sleep stages. For example, the EEG q band often contained a mechanical noise such that EEG d + q power was not useful for identifying the NREM state. Brain temperature and ECG parameters often changed more slowly than the stage changed. In our algorithm, the active wakefulness state was identified by locomotion activity to be 54% of this state when specified by the waveform recognition scoring. During active wakefulness, the EEG contained movement noise, which caused misidentification of this stage as being the NREM stage. Thus, we used locomotion counting to identify active wakefulness. Video recordings revealed that rats in the state of quiet wakefulness without locomotion activity remained in one place, drinking, feeding or grooming their head. The time for processing the 24 h sleep scoring data from eight rats decreased to 40 min with filtered data and to 3 min with data that had not been filtered by our new FFT algorithm, from the 240 min needed by the waveform recognition algorithm. Because the filtering of EEG and EMG signals takes a long time to calculate, this filtering procedure must be modified in the next version of our software.
© 2008 The Authors Journal compilation © 2008 Japanese Society of Sleep Research
Algorithm for animal sleep scoring
a)
Locomotion activity (count)
rat Light phase
Dark phase
10
0
0 100
0 300
e)
FFT algorithm
0 W R NR
f)
Waveform recognition algorithm
d)
EEG θ/(δ+θ) ratio (%)
c)
EMG integral (µV/sec)
b)
EEG δ power (µV 2)
3000
W R NR
12.00
14.00
16.00
02.00
24.00
04.00
Time (24-hour clock)
a)
Locomotion activity (count)
mouse dark phase
Light phase 10
0
e)
f)
EEG θ/(δ+θ) ratio (%) EMG integral (µV/sec)
d)
FFT algorithm
c)
Waveform recognition algorithm
b)
EEG δ power (µV2)
2000
0 100
0 10
0 W R NR W R NR
14.00
16.00
18.00
22.00
24.00
02.00
Time (24-hour clock)
© 2008 The Authors Journal compilation © 2008 Japanese Society of Sleep Research
169
S Kohtoh et al.
The percentages of NREM and REM sleep stages have been reported to be constant in rats and mice, being about 60% for NREM and about 8% for REM.26–28 Based on these values, the threshold of the three parameters for sleep scoring are automatically calculated in this new version of the software, SleepSign ver. 3. Because we applied the international standard for human sleep scoring to animal sleep scoring, we consider our new FFT algorithm to be applicable for human sleep scoring.
9
10
11
ACKNOWLEDGMENTS We are grateful to Dr N. Eguchi (Waseda-Olympus Bioscience Research Institute, Singapore) and Dr T. Mochizuki (Beth Israel Deaconess Medical Center and Harvard Medical School, Boston, USA) for valuable discussions. This work was supported in part by a grant (to Y.U.) from the program, Promotion of Basic Research Activities for Innovative Biosciences of the Bio-oriented Technology Research Advancement Institution of Japan.
12
13
REFERENCES 1 Rechtschaffen A, Kales A. A Manual of Standardized Terminology, Techniques and Scoring System for Sleep Stages of Human Subjects. Public Health Service: Washington DC, 1968. 2 Fujimori B, Yokota T, Ishibashi Y, Takei T. Analysis of the electroencephalogram of children by histogram method. Electroencephalogr. Clin. Neurophysiol. 1958; 10: 241– 52. 3 Martin WB, Johnson LC, Viglione SS, Naitoh P, Joseph RD, Moses JD. Pattern recognition of EEG-EOG as a technique for all-night sleep stage scoring. Electroencephalogr. Clin. Neurophysiol. 1972; 32: 417–27. 4 Kuwahara H, Higashi H, Mizuki Y, Matsunari S, Tanaka M, Inanaga K. Automatic real-time analysis of human sleep stages by an interval histogram method. Electroencephalogr. Clin. Neurophysiol. 1988; 70: 220–9. 5 Mamelak A, Quattrochi JJ, Hobson JA. A microcomputer-based system for automated EEG collection and scoring of behavioral state in cats. Brain Res. Bull. 1988; 21: 843–9. 6 Goeller CJ, Sinton CM. A microcomputer-based sleep stage analyzer. Comput. Methods Programs Biomed. 1989; 29: 31–6. 7 Geering BA, Achermann P, Eggimann F, Borbély AA. Period-amplitude analysis and power spectral analysis: a comparison based on all-night sleep EEG recordings. J. Sleep. Res. 1993; 2: 121–9. 8 Uchida S, Matsuura M, Ogata S, Yamamoto T, Aikawa N. Computerization of Fujimori’s method of waveform recognition. A review and methodological considerations
170
14
15 16
17 18
19
20
21
22
for its application to all-night sleep EEG. J. Neurosci. Methods 1996; 64: 1–12. Drinnan MJ, Murray A, White JE, Smithson AJ, Griffiths CJ, Gibson GJ. Automated recognition of EEG changes accompanying arousal in respiratory sleep disorders. Sleep 1996; 19: 296–303. Turnbull JP, Loparo KA, Johnson MW, Scher MS. Automated detection of tracé alternant during sleep in healthy full-term neonates using discrete wavelet transform. Clin. Neurophysiol. 2001; 112: 1893–900. Virkkala J, Hasan J, Värri A, Himanen SL, Müller K. Automatic sleep stage classification using two-channel electro-oculography. J. Neurosci. Methods 2007; 166: 109–15. Gallegos RA, Huitron-RS Sanchez AM, Criado JR, Wills DN, Henriksen SJ. Automatic vigilance state classification of rats and mice using commercial sleep software. In: Roth T. ed. Sleep, 2002, Proceedings of the 16th Annual Meeting of Associated Professional Sleep Societies, Vol. 25. APSS: Seattle, WA, 2002; A509. Balogh B, Molnar E, Jakus R et al. Effects of a single dose of 3,4-methylenedioxymethamphetamine on circadian patterns, motor activity and sleep in drug-naive rats and rats previously exposed to MDMA. Psychopharmacology (Berl) 2004; 173: 296–309. Gerashchenko D, Matsumura H. Continuous recordings of brain regional circulation during sleep/wake state transitions in rats. Am. J. Physiol. 1996; 270: 855–63. Paxinos G, Watson C. The Rat Brain in Stereotaxic Coordinates. Academic Press: San Diego, CA, 1986. Gerashchenko D, Okano Y, Urade Y, Inoué S, Hayaishi O. Strong rebound of wakefulness follows prostaglandin D2- or adenosine A2a receptor agonist-induced sleep. J. Sleep Res. 2000; 9: 81–7. Franklin KBJ, Paxinos G. The Mouse Brain in Stereotaxic Coordinates. Academic Press: San Diego CA, 1997. Huang ZL, Mochizuki T, Qu WM et al. Altered sleep– wake characteristics and lack of arousal response to H3 receptor antagonist in histamine H1 receptor knockout mice. Proc. Natl. Acad. Sci. USA. 2006; 103: 4687–92. Huang ZL, Qu WM, Li WD et al. Arousal effect of orexin A depends on activation of the histaminergic system. Proc. Natl. Acad. Sci. USA. 2001; 98: 9965–70. Mizoguchi A, Eguchi N, Kimura K et al. Dominant localization of prostaglandin D receptors on arachnoid trabecular cells in mouse basal forebrain and their involvement in the regulation of non-rapid eye movement sleep. Proc. Natl. Acad. Sci. USA. 2001; 98: 11674–9. Huang ZL, Qu WM, Eguchi N et al. Adenosine A2A, but not A1, receptors mediate the arousal effect of caffeine. Nat. Neurosci. 2005; 8: 858–9. Taguchi Y, Hando S, Sakata M, Eguchi N, Urade Y. Accuracy evaluation of sleep–wake stage analysis with SleepSign Ver2.0. In: Okawa M, ed. Sleep Biol. Rhythms. 2003, Vol. 2. International Workshop on Recent Progress
© 2008 The Authors Journal compilation © 2008 Japanese Society of Sleep Research
Algorithm for animal sleep scoring
in Sleep Research: Osaka, 2004; Sleep Biol. Rhythms 2004; 2 (Suppl 1): S58. 23 Neckelmann D, Olsen OE, Fagerland S, Ursin R. The reliability and functional validity of visual and semiautomatic sleep/wake scoring in the Møll–Wistar rat. Sleep 1994; 17: 120–31. 24 Louis RP, Lee J, Stephenson R. Design and validation of a computer-based sleep-scoring algorithm. J. Neurosci. Methods 2004; 133: 71–80. 25 Inagaki H, Kuwahara M, Tsubone H. Changes in autonomic control of heart associated with classical
© 2008 The Authors Journal compilation © 2008 Japanese Society of Sleep Research
appetitive conditioning in rats. Exp. Anim. 2005; 54: 61–9. 26 Jouvet-Mounior D, Astic L, Lacote D. Ontogenesis of the states of sleep in rat, cat, and guinea pig during the first postnatal month. Dev. Psychobiol. 1970; 2: 216–39. 27 Zeplin T, Rechtschaffen A. Mammalian sleep, longevity and energy metabolism. Brain Behav. Evol. 1974; 10: 425–70. 28 Meddis R. The Sleep Instinct. Routledge & Keegan Paul: London, 1977.
171