Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2016 Mar 15.
Published in final edited form as: J Neurosci Methods. 2014 Dec 27;0:127–140. doi: 10.1016/j.jneumeth.2014.12.016

SWDreader: A Wavelet-Based Algorithm Using Spectral Phase to Characterize Spike-Wave Morphological Variation in Genetic Models of Absence Epilepsy

CD Richard 1,2, A Tanenbaum 3,4, B Audit 5, A Arneodo 5, A Khalil 1,2,4, WN Frankel 1,2,6
PMCID: PMC4331221  NIHMSID: NIHMS652354  PMID: 25549550

Abstract

Background

Spike-wave discharges (SWD) found in neuroelectrical recordings are pathognomonic to absence epilepsy. The characteristic spike-wave morphology of the spike-wave complex (SWC) constituents of SWDs can be mathematically described by a subset of possible spectral power and phase values. Morlet wavelet transform (MWT) generates time-frequency representations well-suited to identifying this SWC-associated subset.

New method

MWT decompositions of SWDs reveal spectral power concentrated at harmonic frequencies. The phase relationships underlying SWC morphology were identified by calculating the differences between phase values at SWD fundamental frequency and the 2nd, 3rd and 4th harmonics. The three phase differences were then used as coordinates to generate a density distribution in a {360° × 360° × 360°} phase difference space. Strain-specific density distributions were generated from SWDs of mice carrying the Gria4, Gabrg2 or Scn8a mutations to determine whether SWC morphological variants reliably mapped to the same regions of the distribution, and if distribution values could be used to detect SWD.

Comparison with existing methods

To the best of our knowledge, this algorithm is the first to employ spectral phase to quantify SWC morphology, making it possible to computationally distinguish SWC subtypes and detect SWDs.

Results/conclusions

Proof-of-concept testing of the SWDreader algorithm shows: (1) a major pattern of variation in SWC morphology maps to one axis of the phase difference distribution, (2) variability between the strain-specific distributions reflects differences in the proportion of SWC subtypes generated during SWD, and (3) regularities in the spectral power and phase profiles of SWCs can be used to detect waveforms possessing SWC-like morphology.

Keywords: Spike-wave discharge, spike-wave complex, phase differences, seizure detection algorithm, harmonic analysis, fundamental frequency, morphology, Morlet wavelet transform, mouse mutant, absence epilepsy

1. Introduction

Absence epilepsy is a generalized seizure disorder that is characterized by recurrent bouts of abrupt behavioral arrest with concomitant loss of awareness. The spike-wave discharge (SWD) is an electroencephalographic (EEG) or electrocorticographic (ECoG) entity associated with absence seizures, whose morphology is distinguished by trains of successive spike-wave complexes (SWC) comprised of alternating spike and wave components, and whose presence in neuroelectrical recordings forms the base of heuristics used in manual annotation.

The importance of cortical and thalamic networks to the etiology of absence epilepsy is well established (Avoli 2012). Excitatory cortical pyramidal (CT) and thalamocortical relay cells (TC), along with inhibitory reticular thalamic neurons (RT) comprise the principle actors in these circuits (Blumenfeld 2005). TC cells form reciprocal excitatory connections with CT neurons, and both CT and TC afferents target RT cells. Since RT cells selectively project to TC cells, it has been proposed that the CT-TN-TC circuit provides a mechanism for the cortex to exert feed-forward inhibitory control over TC cells (Timofeev and Steriade 2004; Beenhakker and Huguenard 2009).

1.1. Neurophysiological correlates of SWC morphology

Recordings from cortical and thalamic subterritories participating in the generation of SWDs have revealed differential activity patterns correlating with the temporal manifestation of the two most conspicuous morphological features of SWC, the “spike” and “wave” components of the SWC (Bazhenov et al. 2008).

The “spike” component has been associated with activity in cortical and thalamic nuclei. Extracellular unit recordings from anaesthetized WAG/Rij rats, a rodent model of absence epilepsy, showed depolarizing events were phase locked to “spikes” in surface EEG at cortical layers III and IV, and thalamic nuclei including ventrolateral (VL), ventroposteriolateral (VPL), ventroposteriomedial (VPM), and RT (Inoue et al. 1993). Unit activity in most of these regions preceded the “spike” apex. The earliest peak latencies were found in VPL and VPM (median latencies −12 and −11.5 ms to “spike” apex), followed by MDL and VL (−8 and −8.8 ms), with median latencies of middle (III, IV) and deep (V, VI) layer cortex at −2 ms. Where peak activity in these cortical and thalamic nuclei preceded the “spike”, bursting in the RT occurred across both the rising and decaying phases of the “spike”, although median peak activity in RT took place 2–15 ms after maximum amplitude of the “spike”. Intracellular recordings of RT neurons in neurolept anaesthetized GAERS rats, another rodent model of absence epilepsy, were also found to exhibit high frequency bursts concurrent with the “spike” component (Slaght et al. 2002).

The “wave” component, in contrast, is marked by silence in the same cortical and thalamic nuclei active during the “spike”. While early studies suggested that the “wave”-related hyperpolarization is mediated by GABAergic inhibition, recent studies indicate that post-”spike” increases in [Na+]i and [Ca2+]i promotes Na+- and Ca2+-activated K+ currents that suppress depolarizing potentials, and creates conditions for disfacilitation (Timofeev et al. 2002; Timofeev et al. 2004). Not all thalamic regions are quiescent during the “wave” however. Extracellular unit and intracellular recordings of the centromedial-paracentral thalamic region (CL-PC) correlated with the “wave” component in neuroleptic anaesthetized WAG/Rij rats (Inoue et al. 1993). In a later study in which activity in CL and PC subterritories was carefully distinguished, PC bursting was limited to the “wave” component, with maximal CL bursting locked to decaying phase of “spike” component (Gorji et al. 2011).

Despite advances in our understanding of the pathophysiological correlates of the most conspicuous morphological components of SWCs, the “spike” and “wave”, the genetic and physiological factors contributing to variability in SWC morphology remain largely unknown. The morphological heterogeneity of SWCs are commonly described using a small set of terms that capture gross morphological features (Noachtar et al. 1999; Niedermeyer 2005), although more refined parameters of morphological classification have been proposed and investigated (Weir 1965; Sitnikova and van Luijtelaar 2007).

1.2. Spectral factors determining signal morphology

The Morlet wavelet transform (MWT) is a method of space-scale (or time-frequency) analysis capable of decomposing a signal into its different frequency components without loss of information from the signal’s temporal domain. These mathematical tools have proven useful in quantitative EEG/ECoG studies as they can reveal signal features that otherwise remain hidden. For example, while the spectral power of simple periodic waveforms, like most sleep spindles, is concentrated at a single frequency (Drinkenburg et al. 1993; Sitnikova et al. 2009), the frequency domain of complex periodic waveforms, like SWDs, will contain peaks at frequencies that are integer multiples of each other. Several references to SWD-associated harmonics in human and rat ECoG have appeared in the primary literature for at least the past two decades (Drinkenburg et al. 1993; Pinault et al. 2001; Sitnikova and van Luijtelaar 2009; Akman et al. 2010). Less attention has been paid to spectral phase, the mathematical description of the position of the peak and trough in a sinusoidal oscillation, yet it is an essential determinant of signal morphology. One can obtain signals that resemble SWCs to a greater or lesser extent depending on how the phases at each harmonic frequency align with each other (Figure 1).

Figure 1. Effect of harmonic power and phase on signal morphology.

Figure 1

Five signal reconstructions illustrate the independent effects of spectral power and phase on shape using s(t)=h=14(Ahcos(2πhf0t+ϕh)) where f0 = 1/T0 is the fundamental frequency, Ah is the power at harmonic h, hf0 is the harmonic frequency and ϕh is the phase of the harmonic h. (A) Pure spike morphology (A1=1, A2=1, A3=1, A4=1; ϕ1=0°, ϕ2=0°, ϕ3=0°, ϕ4=0°) (B) Pure wave morphology (A1=1, A2=1, A3=1, A4=1; ϕ1=0°, ϕ2=180°, ϕ3=0°, ϕ4=180°) (C) Comparisons are relative to representative spike-wave complex (SWC) depicted in panel C.2 (A1=600, A2=800, A3=550, A4=240; ϕ1=0°, ϕ2=45°, ϕ3=90°, ϕ4=135°). (C.1) Signal reconstruction with harmonic power identical to the representative SWC, but by changing phase relationships the morphology deviates considerably from spike-wave shape (ϕ1=0°, ϕ2=18°, ϕ3=196°, ϕ4=174°). (C.3) Signal reconstruction has identical phase relationships as representative SWC, but different power at the four harmonic frequencies (A1=110, A2=190, A3=1120, A4=570).

Assuming that only a subset of all possible phase relationships between harmonic frequencies can be used to construct a signal that recapitulates any of the variants of SWC morphology, we propose that a distribution that quantifies these phase relationships can be generated in which SWC with different morphological characteristics reliably map to different regions of the distribution space.

1.3. Goals and rationale

Given the importance of SWC morphology as a biological phenotype, an algorithm capable of automatically and objectively distinguishing different SWC morphological subtypes would be of potential value to the epilepsy research community. We propose that at least two conditions must be satisfied to demonstrate proof-of-concept: a viable algorithm (1) should be capable of distinguishing SWC with varying morphological features, and (2) should be able to accurately detect SWD by identifying temporal regions of ECoG recordings that fall within the parameter values found to be characteristic of SWC morphology.

Here we describe the SWDreader algorithm, and the results from two in silico experiments to test these conditions using ECoG recordings from three mouse strains with previously identified gene mutations predisposing them to SWD seizures - the Gria4spkw1 glutamate receptor mutation, the Gabrg2R43Q GABAA receptor mutation, and the Scn8a8J voltage-gated sodium channel mutation.

2. Materials and methods

2.1. Subjects

Four mouse strains generated and raised at The Jackson Laboratory were used in the development and performance testing of the SWDreader algorithm, predominantly on the C3HeB/FeJ (FeJ) strain to minimize genetic background effects. FeJ.HeJ-Gria4spkw1, (n=10) was an incipient congenic strain generated in crosses between C3H/HeJ (HeJ) with its naturally-occurring Gria4spwk1 mutation (Beyer et al. 2008), backcrossed four generations onto the closely-related FeJ substrain and then intercrossed. These incipient congenic mice are all Gria4spwk1/spkw1 homozygous genotype on a predominantly FeJ background, with a small amount (approximately 6%) residual HeJ alleles. Three fully congenic strains were also studied: FeJ-Gria4spkw1/spkw1 (Frankel et al. 2014) (n=5), FeJ-Gabrg2tmSpet/+ (also known as FeJ-Gabrg2R43Q/+) (n=6) carrying a targeted mutation homologous to the GABAA γ2 subunit R43Q variant identified in a GEFS+ family (Wallace et al. 2001; Tan et al. 2007; Frankel et al. 2014), and FeJ-Scn8a8J/+ (n=8) carrying the chemically-induced V929F mutation in the Nav1.6 voltage-gated sodium channel gene (Papale et al. 2009; Oliva et al. 2014).

2.2. ECoG

ECoG data used for the current study were described previously (Oliva et al. 2014; Tyler et al. 2014; Frankel et al. 2014). The 4 recording electrodes were set on the cortical surface, 2mm lateral to midline on both sides of the skull, at 1mm anterior to Bregma, Left-Front (LF) and Right-Front (RF), and two 2mm posterior, Left Back (LB) and Right Back (RB). Three channels directly output by the Stellate Harmonie software, RB-RF, RB-LF, RB-LB (with RB as the reference electrode) were used to derive the LB-LF, LF-RF and LB-RF channels to generate a bipolar montage of 6 ECoG channels. All mice were allowed to rest for at least 48 hours prior to their first ECoG recording session. ECoG data were gathered for each mouse in two recording sessions, 2 hours a piece, taking place on two separate days. Recording sessions for all mice were conducted early to midway through the sleep period (lights on) using Stellate Harmonie hardware and software (Natus Medical Inc.) during which mice had freedom of movement within their recording cage. All recordings were digitized at a sampling rate of 200 Hz, and filtered using Harmonie Stellate software settings to attenuate frequencies < 0.3 Hz and >50Hz prior to exporting ECoG data for analysis with LastWave. Recording sessions in which ECoG data were extensively degraded by large quantities of recording artifacts (e.g. from loose electrode connections and/or excessive signal deflections from gross body movements) were excluded from analysis. Replicate 1 ECoG recordings from the FeJ.HeJ-Gria4spkw1/spkw1 mice were used to generate the phase difference distribution employed by SWDreader (see Section 2.6.1).

2.3. SWDreader algorithm

SWDreader was written in the open source signal processing command language, LastWave (Bacry 1997). LastWave has been employed in the analyses of a variety of biological data (Arneodo et al. 2002; Audit et al. 2002; Nicolay et al. 2007; Arneodo et al. 2011; Audit et al. 2013; Gerasimova et al. 2013; Gerasimova et al. 2014). We used a release version of LastWave that implements a fast convolution library based on FFTW (http://www.fftw.org/) to compute the Morlet wavelet transform (available at http://perso.ens-lyon.fr/benjamin.audit/LastWave). The source code for SWDreader is available at https://github.com/lifepupil and distributed under the GNU General Public License. Data used in this study can be found at https://osf.io/ under SWDreader. Names of SWDreader functions and commands used in respective analyses are denoted by courier font.

2.4. ECoG data processing

In order for the SWDreader algorithm to perform SWC morphological characterization or SWD seizure detection, multiple file types containing the results from various analyses must be created. The main file preproc_v2 contains user-customizable parameters and calls specialized functions needed to generate these files. SWDreader’s data processing step is executed by typing source preproc_v2 at the LastWave command line. An overview of the processing stages in the SWDreader algorithm is depicted in flowchart form (Figure 2).

Figure 2. Flowchart outlining ECoG processing steps performed by SWDreader.

Figure 2

(see Section 2.4 for details)

2.4.1. Generation of ECoG phase and power scalograms with Morlet wavelet transform

ECoG signals from each of the six recording channels were decomposed using the Morlet wavelet transform into two time-frequency representations, or scalograms, of the signal’s spectral power and spectral phase (scalogramGen2). The wavelet transform consists in expanding signals in terms of wavelets which are constructed from a single function, the “analyzing wavelet” ψ, by means of translations and dilations. The WT of a real-valued function S is defined as:

Tψ[S](t0,a)=+S(t)ψ(tt0a)dt,

where t0 and a (> 0) are the time and scale parameters respectively. The complex Morlet analyzing wavelet is constructed as a modulated Gaussian window:

ψM(t)=12πe12(tσM)2e2iπt.

Hence, TψM [S] (t0, a) is the Fourier transform at frequency 1a of the signal S windowed by a Gaussian window centered on t0 and with standard deviation aσM. The coupling between the window size and the frequency of detection allows robust estimation of local "instantaneous" frequency at all scales (Mallat 1999). Here we used σM = 3 (larger than the usual choice σM = 0.849) in order to have a better frequency resolution.

The two resulting scalograms are time-series of the decomposed ECoG signal’s power spectra (power scalograms, Figure 3A.2, 3B.2) and corresponding phases angles (phase scalogram, Figure 4B) across a set of sixty (60) frequencies distributed between 1.67 Hz and 100 Hz. The set of frequencies represented in these scalograms were calculated using LastWave parameters for the smallest wavelet scale (amin = 2), number of octaves (noct = 6), and number of voices per octave (nvoice = 10) where:

frequency=sample rateamin×2(oct1+(voxnvoice))

with range of values for oct (1 ≤ oct ≤ 6) and vox (1 ≤ vox ≤ 10) defining the 60 respective frequencies (Hz).

Figure 3. Identification of putative harmonic frequencies and harmonicity magnitude.

Figure 3

(A) Results of analysis for a representative ECoG trace. All four panels are aligned to the same time scale. (A.1) ECoG trace from the RF-RB channel of the FeJ.HeJ-Gria4spkw1 mouse 29725. Trace containing five SWDs within a ~2.5 minute window of recording drawn midway through the 2 hour session. (A.2) Time-frequency profile of spectral power (power scalogram) generated by MWT for ECoG trace. Lighter regions indicate higher power. Harmonics plainly visible as roughly horizontal bands. (A.3) Fundamental frequency estimates resulting from harmonic filter cross-covariance method. Boxes bound temporal regions identified as SWDs in manual annotation. (A.4) Harmonicity magnitudes as reflected in the maximum cross-covariance, max(XCOV), across time. Horizontal line represents the mean harmonicity for entire two hours, and is used as a threshold to identify the initial set of PSRs. (B.1) Close up of a ~2 second section near the start of the SWD marked by gray box in A.1. (B.2) Power scalogram associated with ECoG section. (C.1) Instantaneous power spectrum from time point in power scalogram marked by the red arrow in B.2. Putative harmonics are identified in each time point by performing a cross-covariance operation between instantaneous power spectrum and (C.2) a harmonic filter. (C.3) Results of cross-covariance. The fundamental frequency of putative harmonics, regardless of whether or not harmonics are present, is determined by the frequency at which the max(XCOV) is calculated. Since cross-covariance values are greater at frequencies where the harmonic filter is aligned with local peaks positioned at harmonic frequencies in the spectrum, the magnitude of max(XCOV) is used as a measure of the harmonicity for that time point.

Figure 4. Generation of phase difference distribution.

Figure 4

The three left panels share same range of time points. (A) Section of ECoG containing part of a SWD (same one depicted in Figure 2B.1) from RF-RB channel of a FeJ.HeJ-Gria4spkw1 mouse. (B) Time-frequency profile of MWT phase for ECoG section. At each time point, phase values are extracted from the corresponding four putative harmonic frequencies (white lines) identified in the cross-covariance step. Dark-to-light edges in phase scalogram correspond to 359° to 0° boundaries between adjacent periods. (C) Phase differences between the fundamental frequency (1st harmonic) and the 2nd1:2), 3rd1:3), and 4th1:4) harmonics. (D) Phase difference trajectory of partial SWD depicted in ECoG section through 3-D phase difference space. Trajectory is color coded to match ECoG trace in panel (A). Phase difference coordinates {ϕ1:2 ϕ1:3 ϕ1:4} of the SWD trajectory start at {72°, 133°, 166°} and continue through coordinates of each successive time point to terminate at {84°, 155°, 204°}.

2.4.2. Detection of harmonics and fundamental frequency estimation

Putative harmonics were detected (harmonicRefs3) for all time points in the power scalogram by iteratively performing cross-covariance of each instantaneous power spectrum (Figure 3C.1) with a harmonic filter (Figure 3C.2). The harmonic filter was comprised of four peaks set at harmonic frequencies f0, 2f0, 3f0, 4f0 expressed as functions of log-frequency (log(f0), log(2)+log(f0), log(3)+log(f0) and log(4)+log(f0)) so that peaks would align with the first four harmonics regardless of the fundamental frequency. Cross-covariance was calculated for frequencies between 4.1 Hz (oct = 5; vox = 6) to 10.2 Hz (oct = 4; vox = 3) to cover the lower and upper-boundaries of SWD fundamental frequencies reported for the tested mouse strains. The magnitude of cross-covariance was used as a measure of strength of the harmonics, or “harmonicity”. Since the frequency at which the instantaneous power spectrum is most correlated with the harmonic filter should have the highest value in cross-covariance results (Figure 3C.3), the frequency at maximum cross-covariance, max(xcov(t)), was taken as the best estimate of the fundamental frequency of the putative harmonics for that time point t. The frequency filtering applied to ECoG data should have no effect on the functioning of the algorithm given that the highest frequency used by the algorithm, i.e. 40.8 Hz at the 4th harmonic if the fundamental frequency estimate is 10.2 Hz, and the lowest (4.1 Hz) are well within the 0.3 Hz to 50 Hz boundaries.

2.4.3. Harmonic frequency phase extraction and calculation of phase differences

The instantaneous phase values Φ1(t), Φ2(t), Φ3(t) and Φ4(t), at the four putative harmonic frequencies were extracted (harmonicVals2) at each time point t in the phase scalogram (Figure 4B) using the estimated fundamental frequency calculated in the previous step. The four resulting time-series signals, Φ1, Φ2, Φ3 and Φ4, were used to calculate phase differences (pd_s) using the method outlined by Tass et al. 1998 to detect Φn:m phase locking between two signals oscillating at non-identical frequencies, n and m. Briefly, three time-series phase differences signals, Φ1:2, Φ1:3, and Φ1:4 were calculated by subtracting the phase of the fundamental frequency (n=1), from that of the second (m=2), third (m=3), and fourth (m=4) harmonic frequency (Figure 4C).

2.4.4. Generation of 3-dimensional phase difference distributions

In order to empirically characterize the phase relationships underlying spike-wave morphology, phase differences from the manually identified SWDs were used to generate a distribution (pd3d_v3) in a 3-dimensional phase difference space for each strain (Figure 4D). Axis values of the phase difference space were integers ranging from 0° to 359° with each of the 1° × 1° × 1° cubes {z1:2, y1:3, x1:4} representing one of the 3603 = 46,656,000 possible coordinates. Density values at all coordinates are initially set to zero. The phase difference distribution is generated by incrementing the coordinate value at {Φ1:2(t), Φ1:3(t), Φ1:4(t)} by +1 for each time point t within all annotated SWD regions. SWDs from all 6 ECoG channels were used to populate the phase difference distribution. Coordinates reported in this paper follow the {Φ1:2, Φ1:3, Φ1:4} convention.

2.5. SWC morphological characterization

The ability of the SWDreader algorithm to distinguish SWC with different morphological characteristics was assessed in three ways: (1) a test of the region-specific mapping of SWC morphological subtypes to the phase difference distribution, (2) a test of whether the SWC morphology-to-distribution region mapping is strain-independent, and (3) a test of the proportional relationship between the density of a region within a distribution and the number of SWCs represented within that region.

2.5.1. Identifying regions of maximum trajectory density

Maximum density regions were identified for each of the three mouse strain phase difference distributions (pddensity). Local density was assessed for each {Φ1:2, Φ1:3, Φ1:4} coordinate with a non-zero density value within the distribution by identifying all neighboring coordinates falling within ±10° of that coordinate. Density values within the 21° × 21° × 21° cubic region centered on that coordinate were summed, and if the local density was greater than the prevailing maximum density, it was updated with the new density sum and coordinate. Iteration of this operation continued until all non-zero coordinates were assessed.

2.5.2. Strain- and coordinate region-specific SWC extraction and quantification

Region-specific mapping of SWC morphology was assessed at 5 identically-sized cubic regions of the phase difference space: the three strain-specific maximum density regions, the predicted “pure spike” morphology region centered on the coordinate {0°, 0°, 0°} (Figure 1A), and the predicted “pure wave” morphology region surround the coordinate {180°, 0°, 180°} (Figure 1B) using the swcst2 function. Temporal boundaries of SWDs confirmed by manual annotation of each recording session were used to identify and extract SWCs. In a given ECoG channel, individual SWCs within a SWD were parsed using the phase of the fundamental frequency (Φ1) with 1 SWC/cycle and the 359°-to-0° transition to mark the boundary between cycles. SWC duration was recorded, and the start and end times of each parsed SWC were used to search the three time-series phase differences signals, Φ1:2, Φ1:3, and Φ1:4 describing the phase difference trajectories for that ECoG channel. Depending on which of the 5 cubic regions was being searched, SWCs with trajectories passing through the search region were extracted from the ECoG channels in which they appeared. This set of operations was repeated on all 6 ECoG channels of a recording session. Each of the 5 cubic regions was analyzed by strain, the number of SWCs at each region, and the total number of SWCs for the strain was determined to calculate strain- and region-specific SWC percentages (SWCmetrics). Once a region-specific search was completed for the strain, the most common SWC duration was identified. The 200 Hz sample rate produced durations measured in 5 ms intervals. SWCs with the most common duration were extracted from ECoG and averaged to permit frequency-specific comparisons of morphology.

2.6. SWD seizure detection

If our algorithm is capable of quantifying the morphological characteristics of SWC then the spectral features associated with SWC should be useable for automated seizure detection to confirm proof-of-concept.

2.6.1. Score calculation for Possible Seizure Regions

Automated detection by the SWDreader algorithm (sf19b) is accomplished by assigning scores to possible seizure regions (PSR) based on their harmonicity, as measured by the maximum cross-covariance, and the phase relationships between its harmonics (phaseWeigh3D), determined by the occurrence “density” value found at the coordinates {Φ1:2, Φ1:3, Φ1:4} in the phase difference space of the distribution, Drep1. The Drep1 phase difference distribution was derived from one of the replicate recording sessions (replicate 1) of the FeJ.HeJ-Gria4spkw1/spkw1 mice (n=10). The Drep1 density distribution was imported (Imagesequence2stack.ijm) into ImageJ (Preibisch et al. 2012; Schneider et al. 2012) and smoothed using a 3D Gaussian blur with σ = 5 (Figure 5A). All density values in the Drep1 phase difference distribution were normalized by dividing all values by the distribution’s maximum value and multiplying by 100 to achieve a min-max value range from 0 to 100.

Figure 5. Phase difference distributions.

Figure 5

ECoG recordings from one of the two sessions of each FeJ.HeJ-Gria4spkw1 mouse were selected at random to generate a frequency distribution for use in SWDreader scoring. (A) The distribution represents occurrence counts for all phase differences falling within manually annotated SWDs of FeJ.HeJ-Gria4spkw1 (replicate 1) from all 6 ECoG channels. The resulting distribution formed a flattened scalene ellipsoid, approximately 6π from end to end, wrapping around at three orthogonal cube faces. The highest counts appearing along its major axis (values increase from black-to-white). ImageJ software was used to apply a 3D Gaussian blur (σ=5°) to raw distribution to fill any empty spaces adjacent to high value coordinates. Distribution viewed from the left, top and right faces of cube shown in the three top panels. (B) Phase difference distributions by strain. Density values represented along rainbow color spectrum with highest values at red end and lowest values at blue end of spectrum. Cube orientations are identical to facilitate comparison. Coordinates {ϕ1:2 ϕ1:3 ϕ1:4} where maximum density values were found differed by strain. FeJ.HeJ-Gria4spkw1 (replicate 1) {130°, 257°, 13°}; FeJ-Gria4spkw1 {31°, 67°, 106°}; FeJ-Gabrg2tmSpet {163°, 294°, 66°}; FeJ-Scn8a8J {134°, 255°, 3°}.

In the first step of this process, temporal regions of high harmonicity, represented by local maxima in the max(xcov) time-series, are identified using the average of all max(xcov) values for an ECoG channel as a cut-off threshold (numdur2). Temporal regions with values greater than the average form the initial set of PSRs (Figure 3A.4).

PSRs are then parsed into putative SWCs (numdur2) based on the 359°-to-0° period boundaries in the phase of fundamental frequency (Φ1). The algorithm calculates a score for each time point t in a putative SWC by taking the product of max(xcov(t)) and the density value at the coordinates {Φ1:2, Φ1:3, Φ1:4} in the phase difference space specified by Φ1:2(t), Φ1:3(t) and Φ1:4(t):

score(t)=max(xcov(t))·Drep1{Φ1:2,Φ1:3,Φ1:4}.

The putative SWC score is set to the time point with the highest score once all of its time points are scored. This process is executed iteratively for all putative SWCs in each PSR identified in the ECoG channel.

2.6.2. Recording session consensus

The final set of PSRs for the recording session is determined by superimposing PSRs from all six ECoG channels onto a single 2 hour timeline. Any PSR in the final set that is less than 0.5 seconds in duration is discarded unless it has at least one neighboring PSRs within 0.5 seconds (durationFilter2). If any of the remaining PSRs have neighbors within 0.5 seconds, they are joined to form a new PSR (joinPSRs2).

2.6.3. SWD determination

Once the final set of PSRs has been obtained, the putative SWC with the highest score within each PSR is identified; if the maximum PSR score is greater than or equal to the score threshold, then that PSR is determined to be a SWD, otherwise it is rejected as a false positive.

2.6.4. Score threshold analysis

Threshold curves of the percentage of correct SWD calls, or true positive rate (TPR) and incorrect SWD calls, or false positive counts (FP) were generated by retesting the same ECoG channel at a set of forty score thresholds incrementing in steps of 100 from 100 to 4000 (compare2). PSRs in an ECoG channel with scores at or above the test threshold were compared to manual annotation for classification as a correct or incorrect SWD call. Final counts of all PSRs falling within a known SWD, and all PSRs falling outside known SWDs were recorded for each score threshold in a given ECoG channel. Threshold curve averages of correct and incorrect SWD calls for the FeJ-Gria4spkw1/spkw1, FeJ-Gabrg2R43Q/+ and FeJ-Scn8a8J/+ strains were calculated from individual mouse performance averages of their two replicate recording sessions.

2.6.5. Performance criteria

Assessment of SWDreader depended on whether performance could achieve or surpass what we deemed the absolute minimal requirements of viability for use in our own lab: (1) that the percentage of correctly detected SWDs was at least 90%, and (2) that 10 or less incorrect SWD calls were made. Two score thresholds were identified for both the individual ECoG recording sessions and threshold curves averaged for each mouse strain, one at which the percentage of correct SWD detections crossed the 90% threshold (thresholdTPR≥90%), and the other where the total number of incorrect SWD calls, or false positives (FP), were at or just below 10 (thresholdFR≤10).

Overall performance was a function of the relative positions of these two score thresholds. Satisfaction of both criteria required that thresholdFR≤10 was at or below thresholdTPR≥90% with the range of criteria-satisfying score thresholds increasing proportional to the difference between these two thresholds. The number of incorrect SWD calls at thresholdTPR≥90% and the percentage of annotated SWDs found at thresholdFR≤10 were calculated for each session, along with strain averages and standard deviation (±SD), in order to assess performance of the two criteria independently.

3. Results

3.1. Strain-specific phase difference distributions

Density values for all strains were non-randomly distributed, forming a flattened scalene ellipsoid projecting through the same region of the phase difference space with the highest density values falling along the semi-major axis “core” (Figure 5). The fragmentary appearance of the ellipsoid distribution is a consequence of plotting circular phase values into a Euclidean space. Four main segments form the body of the ellipsoid as it wraps around the 3-dimensional phase difference space through three major regions (Figure 5A–B): (1) at all 8 corners of the cube with the most prominent edge of the distribution crossing over at {0°, 0°, 0°} to stretch into a thin tail projecting from {359°, 359°, 359°}, (2) at the ovoid region surrounding {130°, 260°, 359°} that wraps to {140°, 270°, 0°} on the opposite side of the cube, and (3) from roughly {180°, 359°, 170°} at the bottom of the cube to the top at {190°, 0°, 180°}.

Strain-specific distributions were distinguished by regional differences in density (Figure 5C). The region of maximum density in the FeJ-Gria4spkw1/spkw1 distribution was centered on {31°, 67°, 106°}, with the highest density concentrated in the ellipsoid segment bounded by the 1st and 2nd wrapping edges. Center coordinates for the maximum density regions of the FeJ-Scn8a8J/+ distribution, {134°, 255°, 3°}, FeJ.HeJ-Gria4spkw1/spkw1 replicate 1, {130°, 257°, 13°}, and replicate 2 distributions, {135°, 256°, 7°}, were all adjacent to the 2nd wrapping edge. High density regions for these three strains were distributed across the first and second ellipsoid segments. The region of maximum density in the FeJ-Gabrg2R43Q/+ distribution was in the middle of the ellipsoid segment bounded by the 2nd and 3rd wrapping edges, centered at {163°, 294°, 66°}. Of the four strain-specific distributions, the high density regions FeJ-Gabrg2R43Q/+ were the most widely distributed, spread across three of the four ellipsoid segments.

3.2. Strain- and region-specific SWC morphological characteristics

The position and boundaries of five cubic regions used for region-specific SWC extractions – the three strain-specific regions of maximum density and the two regions predicted to map to the “pure spike” and “pure wave” morphology, respectively – are depicted in phase difference space with a reference distribution (Figure 6A). References to SWCs being represented at a cubic region are used to describe SWCs whose phase difference trajectories (Figure 4D) pass through that cubic region.

Figure 6. SWC morphological variants extracted from different regions of phase difference distribution.

Figure 6

Manually annotated (real) SWCs with trajectories passing through maximum density regions (±10° around coordinates of strain maxima) of each respective strain’s phase difference distribution. Shorter durations represent higher frequencies (Hz), and longer durations represent lower frequencies. (A) Phase distribution space with replicate 1 distribution (in gray) used as reference. Cubic regions for “pure spike”, “pure wave” and maximum density are color-matched to data shown in panels B–D. (B) Traces of extracted SWCs based on the regions their trajectories passed through “pure spike” region {0°±10°, 0°±10°, 0°±10°} and “pure wave” region {180°±10°, 0°±10°, 180°±10°}, (C) the strain-specific maximum density regions for FeJ-Gria4spkw1/spkw1 {31°±10°, 67°±10°, 106°±10°}, FeJ-Scn8a8J/+ {134°±10°, 255°±10°, 3°±10°}, and FeJ-Gabrg2R43Q/+ {163°±10°, 294°±10°, 66°±10°}. (D) Strain-specific SWC percentages at each cubic region.

3.2.1. SWC morphology-to-distribution mapping

The “pure spike” and “pure wave” represent morphological extremes mapped to the distal ends of the phase difference distribution. SWCs with trajectories passing through the region of phase difference space ±10° around {0°, 0°, 0°} had morphological characteristics consistent with the “pure spike” morphology predicted to map to this region (purple cubes, Figure 6B). The morphological characteristics of SWCs with phase difference trajectories passing through the region centered on {180°, 0°, 180°} at the opposite end of the distribution conformed to the predicted “pure wave” morphology (blue cubes, Figure 6B).

The three strain-specific regions of maximum density fell along the semi-major axis at intermediate positions between the distal ends of the phase difference distribution (Figure 6A). SWC morphology assumed transitional forms between “pure spike” and “pure wave” depending on the position along the semi-major axis. SWCs represented at the maximum density region of the FeJ-Gria4spkw1/spkw1 (red cube), the closest of the three strains to the “pure spike” region, bore the strongest resemblance to “pure spike” morphology (Figure 6C). The maximum density region for the FeJ-Gabrg2R43Q/+ strain (green cube) was closest to the “pure wave” region surrounding {180°, 0°, 180°}. SWCs with trajectories passing through that region were predominantly composed of SWCs with slow wave and diminutive spikes. SWCs represented at the region of maximum density for the FeJ-Scn8a8J/+ strain (yellow cubes), positioned between the regional maxima of the two other strains, were closest of the three strains to the canonical spike-wave morphology.

3.2.2. SWC morphological mapping independent of strain and fundamental frequency

SWCs with comparable morphology were represented at cubic regions regardless of the strain generating them (Figure 6B–C), in line with our contention that SWC with shared morphological features map to the phase difference distribution in a region-specific manner. The most visually striking evidence for this claim can be seen in the consistency of average SWC morphology at the “pure spike” and “pure wave” regions across strains (Figure 6B). The same effect was found at all cubic regions - the morphological characteristics of SWCs represented at a given region of the distribution were consistent regardless of the strain that generated them (Figure 6C). The morphology-to-distribution mapping also appears to be frequency (Hz) agnostic as region-specific SWCs with varying fundamental frequencies, as reflected in strain-specific differences in SWC duration, still possessed the same morphological characteristics. The most common SWC durations for the FeJ-Scn8a8J/+ strain (150 ms, 6.7 Hz) and FeJ-Gria4spkw1/spkw1 strain (135 ms, 7.4 Hz) were the same at all five cubic regions. The most common SWC durations for the FeJ-Gabrg2R43Q/+ strain were identical to the FeJ-Gria4spkw1/spkw1 strain except at the “pure wave” region (145 ms, 6.9 Hz).

3.2.3. Regional differences in density proportional to SWC counts

The percentage of SWCs represented at each cubic region varied by strain with the strain’s highest SWC percentages found at its maximum density region (Figure 6D). The FeJ-Gria4spkw1/spkw1 phase difference distribution represents the trajectories of 202,962 SWCs parsed out of 1135 SWDs. Regional SWC percentages for the FeJ-Gria4spkw1/spkw1 strain were greatest in cubic regions falling within the ellipsoid segment bounded by the 1st and 2nd wrapping edges (“pure spike” region, 2523 SWCs (1.24 %); FeJ-Gria4spkw1/spkw1 maximum density region, 8130 SWCs (4.01 %); FeJ-Scn8a8J/+ maximum density region, 2833 SWCs (1.4 %); FeJ-Gabrg2R43Q/+ maximum density region, 2523 SWCs (1.24 %); “pure wave” region, 1680 SWCs (0.83 %)).

A total of 49,098 SWCs from 311 SWDs were represented in FeJ-Gabrg2R43Q/+ phase difference distribution. Cubic regions within the ellipsoid segment bounded by the 2nd and 3rd wrapping edges contained the greatest SWC percentages (“pure spike” region, 196 SWCs (0.4 %); FeJ-Gria4spkw1/spkw1 maximum density region, 418 SWCs (0.85%); FeJ-Scn8a8J/+ maximum density region, 1180 SWCs (2.4 %); FeJ-Gabrg2R43Q/+ maximum density region, 1391 SWCs (2.83%); “pure wave” region, 240 SWCs (0.49%)).

The phase difference distribution of the FeJ-Scn8a8J/+ strain represented 384,542 SWCs from 2444 SWDs. In contrast to the arrangement of SWC percentages across the FeJ-Gria4spkw1/spkw1 phase difference distributions shifted towards the “pure spike” region, and the FeJ-Gabrg2R43Q/+ SWC percentages shifted towards the “pure wave” region, SWC percentages of the FeJ-Scn8a8J/+ strain were centered on the region adjacent to the 2nd wrapping edge (pure spike region, 2050 SWCs (0.53 %); FeJ-Gria4spkw1/spkw1 maximum density region, 4452 SWCs (1.16 %); FeJ-Scn8a8J/+ maximum density region, 10,155 SWCs (2.64 %); FeJ-Gabrg2R43Q/+ maximum density region, 7106 SWCs (1.85 %); “pure wave” region, 946 SWCs (0.25 %)).

3.3. Performance testing of SWDreader seizure detection

3.3.1. Contribution of phase difference distribution to PSR scores

The distribution of density values in phase difference space represents one of the two factors determining what score the SWDreader algorithm assigns to a possible seizure region (PSR). This factor in PSR scoring was determined by the FeJ.HeJ-Gria4spkw1/spkw1 replicate 1 phase difference distribution (see Section 2.6.1).

Densities in the phase difference distribution used to score SWD (replicate 1) were greatest at the maximum density regions of the FeJ.HeJ-Gria4spkw1/spkw1 replicate 1, replicate 2 and FeJ-Scn8a8J/+ strains (replicate 1: max 100, average 69.0; replicate 2: max = 99.9, average = 69.8; FeJ-Scn8a8J/+: max 99.0, average 72.0). These three closely neighboring regions were all in the general vicinity of the 2nd wrapping edge of the phase difference distribution (see Section 3.1). Average and maximum density values were marginally lower at the maximum density region of the FeJ-Gabrg2R43Q/+ strain (max = 79.6, average = 47.7). Density values were lowest in the maximum density region of the FeJ-Gria4spkw1/spkw1 strain (max = 17.1, average = 11.9).

3.3.2. Correct and incorrect SWD calls by strain

3.3.2.1. FeJ.HeJ-Gria4spkw1/spkw1 mice (incipient congenic)

Our first test of SWDreader performance was on the same mice used for generating the phase difference distribution, but from an independent set of ECoG recordings made on different days (replicate 2), reasoning that with the same mutation and underlying physiology, the SWC should be very similar if not identical. The results revealed an average thresholdFP≤10 falling between scores of 2000 and 2100, and average thresholdTPR≥90% between 2300 and 2400 (Figure 7A). The average percentage of correct SWD calls at thresholdFP≤10 ranged from 94.2% (±9.4%) and 95.0% (±8.7%). Averages for the number of incorrect SWD calls at thresholdTPR≥90% fell between 6.3±4.7 and 7.0±4.6. Three score threshold fell between the vertical threshold lines (Figure 7A) indicating that there was a range of possible thresholds at which both criteria, i.e., detection of at least 90% of annotated SWDs with no more than 10 incorrect calls, would be satisfied.

Figure 7. Threshold curves of SWDreader seizure detection performance by strain.

Figure 7

Strain averages for the number of correct SWD and incorrect SWD detections (±S.D.) at 40 score thresholds are plotted above. Thresholds where performance criterion were met are marked with unfilled circles (score at which 90% of SWDs were detected, thresholdTPR≥90%) and filled circles (score at which 10 or less incorrect detections were made, thresholdFP≤10). (A) FeJ.HeJ-Gria4spkw1 mice (replicate 2), at thresholdFP≤10 (2000–2100), percentage of correct SWD detections: 94.2% (±9.4%) – 95.0% (±8.7%), number of incorrect SWD detections: 9.5±6.0 −11.6±6.9; at thresholdTPR≥90% (2300–2400), percentage of correct SWD detections: 89.2%(±11.9%) – 91.5% (±9.8%), number of incorrect SWD detections: 6.3±4.7 – 7.0±4.6 (B) FeJ-Gria4spkw1/spkw1 mice, at thresholdFP≤10 (2600–2700), percentage of correct SWD detections: 87.0% (±17.1%) – 88.1% (±15.4%), number of incorrect SWD detections: 9.1±4.8 −10.5±5.6; at threshold TPR≥90% (2400–2500), percentage of correct SWD detections: 89.1% (±14.4%) – 91.1% (±13.2%), number of incorrect SWD detections: 12.0±5.4 – 14.1±5.6 (C) FeJ-Gabrg2R43Q/+ mice, at thresholdFP≤10 (1500–1600), percentage of correct SWD detections: 98.8% (±1.5%) – 99.2% (±1.2%), number of incorrect SWD detections: 9.9±4.8 – 11.6±6.0; at thresholdTPR≥90% (3400–3500), percentage of correct SWD detections: 89.4% (±12.1%) −90.3% (±11.5%), number of incorrect SWD detections: 0.7±0.7 – 0.8±0.6 (D) FeJ-Scn8a8J/+ mice, at thresholdFP≤10 (2500–2600), percentage of correct SWD detections: 93.7% (±5.6%) −94.6% (±5.0%), number of incorrect SWD detections: 9.3±3.8 – 10.4±4.1; at thresholdTPR≥90% (3000 – 3100), percentage of correct SWD detections: 88.8% (±12.1%) −90.3% (±11.5%), number of incorrect SWD detections: 5.6±3.2 – 6.3±3.3.

3.3.2.2. FeJ-Gria4spkw1/spkw1 mice (fully congenic)

The next set of ECoG recordings for performance testing was the same Gria4 mutant genotype as above, but fully backcrossed to the C3HeB/FeJ inbred strain. Average performance at thresholdFP≤10 and thresholdTPR≥90%, indicated that no single score threshold could find at least 90% of SWD and keep incorrect calls below 10 (Figure 7B). The percentage of correct SWD calls at thresholdFP≤10 (2600–2700) averaged between 87.0% (±17.1%) and 88.1% (±15.4%). At thresholdTPR≥90% (2400–2500) between 12.0±5.4 and 14.1±5.6 of incorrect calls were made.

3.3.2.3. FeJ-Gabrg2R43Q/+ mice

These mice generally have a much lower SWD incidence than Gria4spkw1 mice. Average values for thresholdFP≤10 and thresholdTPR≥90% were 1500–1600 and 3400–3500, respectively. Average correct SWD call percentage at thresholdFP≤10 ranged from 98.8% (±1.5%) to 99.2% (±1.2%). On average, there was less than one (0.7±0.7 – 0.8±0.6) incorrect call at thresholdTPR≥90% (Figure 7C). Threshold curve averages for this strain showed that at any of the 16 score thresholds between thresholdFP≤10 and thresholdTPR≥90% would provide detection results satisfying both performance criteria.

3.3.2.4. FeJ-Scn8a8J/+ mice

A range of thresholds was also found in this strain where both performance criteria would be met. At thresholdFP≤10 (2500–2600), 93.7% (±5.6%) to 94.6% (±5.0%) of annotated SWDs were detected. (Figure 7D). Average incorrect SWD calls at thresholdTPR≥90% (3000–3100) were at or below criterion (5.6±3.2 and 6.3±3.3).

3.3.3. Performance by recording session

Performance across all recording sessions showed that 42 of the 48 sessions (87.5%) had thresholds satisfying both criteria (Table 1). Of the 6 recording sessions where both criteria were not satisfied, 3 were from the FeJ-Gria4spkw1 strain, 2 came from FeJ-Scn8a8J, and 1 from FeJ.HeJ-Gria4spkw1. Over 80% of annotated SWDs were detected at thresholdFP≤10 in all but one of these sessions (FxFf3a); between 10 and 21 incorrect calls were made at thresholdTPR≥90% in the 7 sessions.

Table 1.

SWD detection performance results by individual ECoG recording sessions.

STRAIN MOUSE THRESHOLD
FP≤10
THRESHOLD
TPR≥90%
TPR AT THRESHOLD
FP≤10
FP AT THRESHOLD
TPR≥90
# of
real
SWDs
FeJ.HeJ-
Gria4spkw1
(N=10)
29721 1600–1700 1900–2000 97.50% 8 81
29722 2100–2200 3300–3400 98.40% 3 125
29723 1600–1700 2300–2400 100.00% 3–4 31
29724 1300–1400 2600–2700 100.00% 2 19
29725 2900–3000 3200–3300 91.1% – 93.3% 8 90
29726 2000–2100 3000–3100 100.00% 3 54
30172 1700–1800 2200–2300 96.30% 4 82
30173 2200–2300 3300–3400 100.00% 2 14
30174 1600–1700 1400–1500 81.80% 14–16 11
30175 2600–2700 2900–3000 91.80% 8 49
FeJ-
Gabrg2tmSpet
(N=6)
35567 1300–1400 3100–3200 100.00% 1 36
1600–1700 2000–2100 93.00% 4–5 43
35568 1100–1200 >4000 100.00% 1 25
1000–1100 >4000 95.20% 0 21
35569 1700–1800 >4000 100.00% 0 12
1900–2000 >4000 100.00% 1 21
35570 1300–1400 >4000 100.00% 0 23
1400–1500 >4000 100.00% 0 21
35573 1200–1300 3600–3700 100.00% 0 43
1800–1900 2700–2800 100.00% 6 2
35574 1800–1900 >4000 100.00% 1 29
1500–1600 3600–3700 97.1% – 100% 0 35
FeJ-Scn8a8J
(N=8)
35626 1500–1600 1900–2000 95.1% – 97.1% 5 205
1500–1600 2200–2300 94.6% – 96.8% 7 186
35627 2700–2800 2800–2900 91.6% – 93.7% 9 190
2600–2700 2400–2500 84.7% – 85.5% 14–16 131
35628 2200–2300 3600–3700 97.00% 3–4 67
2600–2700 2800–2900 92.4% – 93.2% 9 118
35630 2300–2400 3000–3100 96.7% – 97.3% 4 183
3400–3500 2500–2600 80.3% – 81.1% 14–16 132
35631 2500–2600 3500–3600 97.4% – 97.9% 4–6 192
2900–3000 3200–3300 91.8% – 93.3% 8–9 134
35632 3100–3200 >4000 98% – 99% 5 98
2700–2800 >4000 97.00% 2 166
35813 2100–2200 3900–4000 100.00% 0 169
1700–1800 >4000 98.90% 0 176
35816 2400–2500 3600–3700 98.1% – 98.7% 2–3 157
2700–2800 >4000 97.90% 0 140
FeJ-Gria4spkw1
(N=5)
FxFf1a 2300–2400 >4000 99.00% 4 105
2600–2700 >4000 98.50% 5 194
FxFf2a 3100–3200 >4000 100.00% 7 71
3000–3100 3400–3500 92.50% 7 107
FxFf3a 1500–1600 1300–1400 87.80% 16–21 90
2000–2100 1600–1700 73.9% – 78.9% 17–21 142
FxFm1 2900–3000 3500–3600 95.5% – 96.6% 5–5 88
2600–2700 2900–3000 93.80% 2–3 113
FxFm2 2200–2300 2200–2300 89.3% – 90.9% 10–12 121
3000–3100 2700–2800 81.7% – 85.6% 13–17 104

4. Discussion

The SWDreader algorithm, to the best of our knowledge, is the first to quantify SWC morphology by exploiting spectral phase. The approach relies on the assumptions that spectral power in time-frequency decompositions of SWDs is concentrated at harmonic frequencies (Figure 3A), that only a subset of phase relationships between SWD-associated harmonics will produce SWC-like morphology (Figure 1C), and that this subset of relationships can be empirically identified using the algorithm to generate phase difference distributions (Figure 4). The results of our analysis of the phase difference distributions of three single-gene mutant mouse strains, and SWD detection performance using the phase difference distribution of an independent mutant population, provide evidence confirming our proof-of-concept claim that SWDreader is capable of distinguishing SWC morphological subtypes along a “pure spike”-to-”pure wave” continuum.

4.1. SWC morphology and phase difference distributions

The most significant finding is that SWCs with different morphological characteristics reliably map to specific regions of phase difference space. The phase difference space represents all possible signal shapes that can be generated from the phase relationships between four harmonic frequencies. Phase difference distributions generated from known SWDs were confined to the same general region of phase difference space regardless of strain, a finding consistent with the prediction that the regions occupied by these distributions represented the subset of phase relationships associated with SWC-like signal morphology (Figure 5).

Strain- and region-specific analysis of phase difference distributions showed that SWCs possessing “pure spike” and “pure wave” morphology map to the distal ends of the distribution with morphological intermediates falling along the semi-major axis. Of the four strains, the maximum density region of the FeJ-Gria4spkw1/spkw1 distribution, {39°, 85°, 133°} was closest to the predicted “pure spike” region mapping to the 8 corners of phase difference space (Figure 6A, purple cubes). The “spike” component is the predominant morphological feature of FeJ-Gria4spkw1/spkw1 SWCs with trajectories passing through its maximum density region (Figure 6C) as predicted by these phase relationships (Figure 1A). In stark contrast, slow waves with minimal or non-existent spike components were represented at both the predicted “pure wave” region (Figure 6B, blue cubes) and its closest neighbor at maximum density region for the FeJ-Gabrg2R43Q/+ strain (Figure 6C, green cube). The strongest evidence of the veracity of morphology-distribution mapping came from results showing that SWC morphology was consistent with the region through which its trajectory passing regardless of strain (Figure 6B–C).

4.2. Density values and SWD seizure detection

Phase difference distribution comparisons between strains show that the density values are linked to prevalence of different SWC morphologies, with higher regional densities associated with a greater number of SWCs with trajectories passing through those regions of phase difference space (Figure 4C; Figure 6D). The SWD detection performance results are consistent with this interpretation. One of the consequences of using an empirically derived phase difference distribution is that the density values reflect the SWC prevalence specific to the source strain. Given the role that the phase difference distribution’s density values play in scoring PSRs, it is not surprising that SWDreader performed best in the strains whose high density regions most overlapped with the FeJ.HeJ-Gria4spkw1/spkw1 replicate 1 distribution. Regardless of how density values were distributed, all strain distributions displaced the same region of phase difference space indicating that most if not all SWC morphological variants were present in each of the strains, albeit to greater or lesser extent. While empirically-derived phase difference distributions provide useful information about SWC prevalence, for the purposes of SWD detection it would be better to employ a specialized distribution that assigns equally high density values along the entire length of the phase difference distribution core in order to give the same weight to all possible SWC morphological subtypes.

4.3. Strain-specific differences in SWC morphology

The differences we found in the percentage of SWC morphological variants generated by the three strains represent preliminary evidence suggestive of a genetic effect on SWC morphology. The disparity in SWC morphology was greatest between the spike-predominant SWCs of FeJ-Gria4spkw1/spkw1 mice, and the slow wave SWCs most prevalent in the Gabrg2R43Q/+ strain. The causal links between SWC morphology and these mutations is far from clear. The Gria4spkw1, Scn8a8J and Gabrg2R43Q gene mutations induce functional impairments at different levels of cortical and thalamic circuits. The Gria4 gene encodes one of the four AMPA receptor subunits and has its highest expression in RT neurons. The spkw1 mutation in this gene, which leads to a significantly reduced amount of GRIA4 protein, was identified in SWD seizure-prone C3H/HeJ mouse strain (Frankel et al. 2005; Beyer et al. 2008; Ellens et al. 2009). A recent optogenetic study of Gria4 knockout mice revealed a weakening of the ability of CT neurons to shunt TC-CT excitation by selectively reducing synaptic strength of the CT-RT circuit (Paz et al. 2011). Another SWD-associated gene, Scn8a encodes a voltage-gated sodium channel (Nav1.6) widely expressed throughout the brain, but particularly enriched in hippocampus, cortex and cerebellum, and localized to distal regions of the axon initial segment in both excitatory and inhibitory neurons (Oliva et al. 2012). Mice heterozygous for the mutant Scn8a8J allele, which contains the V929F missense mutation, exhibited SWD in EEG concurrent with behavioral correlates of absence seizures (Papale et al. 2009). Subsequent investigation into the functional consequences of the V929F mutation in whole-cell patch clamp preparations revealed a disruption of channel activation-inactivation kinetics and overall decreases in channel activity consistent with loss-of-function mutation (Oliva et al. 2014). The Gabrg2R43Q mutation was originally identified in an Australian family with high incidence of febrile seizures (Wallace et al. 2001). Subsequent mouse studies revealed evidence of reduced synaptic inhibition in pyramidal neurons of layers II/III (Tan et al. 2007). Given that the goal of our study was to confirm or confute proof-of-concept, we resist any speculation as to how these gene-related mechanisms may or may not contribute to SWC morphology. However, the assorted SWC metrics available in the SWDreader algorithm provide the means to address this and other questions.

4.4. SWC metrics and applications

The results reported in this study represent the core SWC metrics currently available in SWDreader: the ability to (1) detect changes to SWC morphology along the “pure spike”-to-”pure wave” axis, and (2) quantify how these changes manifest in SWC prevalence. These metrics could enrich investigations into the effects of gene mutations, drugs and other experimental manipulations, adding to commonly reported SWD phenotypes like duration and incidence.

While this study compares SWC metrics aggregated by strain, the ability to perform channel-specific analysis is built into the SWDreader source code and could be used to get more detailed measures of variation in SWC morphology by brain region (Midzianovskaia et al. 2001; Westmijse et al. 2009). The SWC parsing function employed by our algorithm makes it possible to get measures of individual SWC and their temporal dynamics within SWDs. In preliminary tests of this swcst2 feature we found that across all three strains the spike-predominant SWCs represented at the FeJ-Gria4spkw1/spkw1 maximum density region were most frequently found at the beginning of SWDs, followed by classical SWC (FeJ-Scn8a8J/+ maximum density region) midway through SWDs, with slow wave SWCs (FeJ-Gabrg2R43Q/+ maximum density region) appearing most frequently near the end of SWDs (data not shown). Although the detection capabilities of our algorithm were based on identification of all SWDs, custom phase difference distributions can be created to detect any morphological pattern that maps to a region of the phase difference space, including specific SWC subtypes. This capability could be of potential value in studies of type II SWD in rat which are distinguished from the classical SWC morphology of SWD type I by their occipital localization and “pure wave” morphology (Luijtelaar and Coenen 1986; Midzianovskaia 1999; Midzianovskaia et al. 2001; Sitnikova and van Luijtelaar 2007).

Conclusions

The dearth of studies on SWD morphological variants underscores the need for and value of an algorithm capable of distinguishing SWC morphological subtypes and quantifying changes in their prevalence under different experimental conditions. The results reported here strongly support the contention that a fully developed version of the SWDreader algorithm would open up new research opportunities into the underlying causes of absence epilepsy.

Acknowledgements

We thank CompuMAINE Lab members Zachary Connerty-Marin and Brian Toner for helpful discussion, and Barbara Beyer and Verity Letts for providing facile access to the data. Monetary support for CDR came from a Maine Economic Improvement Fund (MEIF) fellowship. The data generation was supported by a grant to WNF from the NIH (NS031348).

Abbreviations

SWD

spike-wave discharge

SWC

spike-wave complex

FP

false positive

TPR

true positive rate

MWT

Morlet wavelet transform

xcov

cross-covariance

PSR

possible seizure region

ECoG

electrocorticogram

References

  1. Akman O, Demiralp T, Ates N, Onat FY. Electroencephalographic differences between WAG/Rij and GAERS rat models of absence epilepsy. Epilepsy Research. 2010;89(2–3):185–193. doi: 10.1016/j.eplepsyres.2009.12.005. [DOI] [PubMed] [Google Scholar]
  2. Arneodo A, Audit B, Decoster N, Muzy JF, Vaillant C. The Science of Disasters: Climate Disruptions, Heart Attacks, and Market Crashes. Berlin: Springer; 2002. Wavelet based multifractal formalism: Applications to DNA sequences, satellite images of the cloud structure, and stock market data; pp. 27–96. [Google Scholar]
  3. Arneodo A, Vaillant C, Audit B, Argoul F, d’Aubenton-Carafa Y, Thermes C. Multi-scale coding of genomic information: From DNA sequence to genome structure and function. Physics Reports. 2011;498(2–3):45–188. [Google Scholar]
  4. Audit B, Bacry E, Muzy J-F, Arneodo A. Wavelet-based estimators of scaling behavior. IEEE Transactions on Information Theory. 2002;48(11):2938–2954. [Google Scholar]
  5. Audit B, Baker A, Chen C-L, Rappailles A, Guilbaud G, Julienne H, Goldar A, D’Aubenton-Carafa Y, Hyrien O, Thermes C, Arneodo A. Multiscale analysis of genome-wide replication timing profiles using a wavelet-based signal-processing algorithm. Nature Protocols. 2013;8(1):98–110. doi: 10.1038/nprot.2012.145. [DOI] [PubMed] [Google Scholar]
  6. Avoli M. A brief history on the oscillating roles of thalamus and cortex in absence seizures. Epilepsia. 2012;53(1934):1–11. doi: 10.1111/j.1528-1167.2012.03421.x. [DOI] [PMC free article] [PubMed] [Google Scholar]
  7. Bacry E. LastWave - A signal processing oriented command language [Online] 1997 Available at: http://www.cmap.polytechnique.fr/~bacry/LastWave/index.html.
  8. Bazhenov M, Timofeev I, Fröhlich F, Sejnowski TJ. Cellular and network mechanisms of electrographic seizures. Drug Discovery Today. Disease Models. 2008;5(1):45–57. doi: 10.1016/j.ddmod.2008.07.005. [DOI] [PMC free article] [PubMed] [Google Scholar]
  9. Beenhakker MP, Huguenard JR. Neurons that fire together also conspire together: is normal sleep circuitry hijacked to generate epilepsy? Neuron. 2009;62(5):612–632. doi: 10.1016/j.neuron.2009.05.015. [DOI] [PMC free article] [PubMed] [Google Scholar]
  10. Beyer B, Deleuze C, Letts VA, Mahaffey CL, Boumil RM, Lew TA, Huguenard JR, Frankel WN. Absence seizures in C3H/HeJ and knockout mice caused by mutation of the AMPA receptor subunit Gria4. Human Molecular Genetics. 2008;17(12):1738–1749. doi: 10.1093/hmg/ddn064. [DOI] [PMC free article] [PubMed] [Google Scholar]
  11. Blumenfeld H. Cellular and network mechanisms of spike-wave seizures. Epilepsia. 2005;46(Suppl 9)(3):21–33. doi: 10.1111/j.1528-1167.2005.00311.x. [DOI] [PubMed] [Google Scholar]
  12. Drinkenburg WH, van Luijtelaar EL, van Schaijk WJ, Coenen AM. Aberrant transients in the EEG of epileptic rats: a spectral analytical approach. Physiology & Behavior. 1993;54(4):779–783. doi: 10.1016/0031-9384(93)90092-t. [DOI] [PubMed] [Google Scholar]
  13. Ellens DJ, Hong E, Giblin K, Singleton MJ, Bashyal C, Englot DJ, Mishra AM, Blumenfeld H. Development of spike-wave seizures in C3H/HeJ mice. Epilepsy Research. 2009;85(1):53–59. doi: 10.1016/j.eplepsyres.2009.01.007. [DOI] [PMC free article] [PubMed] [Google Scholar]
  14. Frankel WN, Beyer B, Maxwell CR, Pretel S, Letts VA, Siegel SJ. Development of a new genetic model for absence epilepsy: spike-wave seizures in C3H/He and backcross mice. The Journal of Neuroscience. 2005;25(13):3452–3458. doi: 10.1523/JNEUROSCI.0231-05.2005. [DOI] [PMC free article] [PubMed] [Google Scholar]
  15. Frankel WN, Mahaffey CL, McGarr TC, Beyer BJ, Letts VA. Unraveling Genetic Modifiers in the Gria4 Mouse Model of Absence Epilepsy. PLoS Genetics. 2014;10(7):e1004454. doi: 10.1371/journal.pgen.1004454. [DOI] [PMC free article] [PubMed] [Google Scholar]
  16. Gerasimova E, Audit B, Roux SG, Khalil A, Argoul F, Naimark O, Arneodo A. Multifractal analysis of dynamic infrared imaging of breast cancer. EPL (Europhysics Letters) 2013;104(6):68001. [Google Scholar]
  17. Gerasimova E, Audit B, Roux SG, Khalil A, Gileva O, Argoul F, Naimark O, Arneodo A. Wavelet-based multifractal analysis of dynamic infrared thermograms to assist in early breast cancer diagnosis. Frontiers in Physiology. 2014;5:1–11. doi: 10.3389/fphys.2014.00176. [DOI] [PMC free article] [PubMed] [Google Scholar]
  18. Gorji A, Mittag C, Shahabi P, Seidenbecher T, Pape H-C. Seizure-related activity of intralaminar thalamic neurons in a genetic model of absence epilepsy. Neurobiology of Disease. 2011;43(1):266–274. doi: 10.1016/j.nbd.2011.03.019. [DOI] [PubMed] [Google Scholar]
  19. Inoue M, Duysens J, Vossen JM, Coenen AM. Thalamic multiple-unit activity underlying spike-wave discharges in anesthetized rats. Brain Research. 1993;612(1–2):35–40. doi: 10.1016/0006-8993(93)91641-5. [DOI] [PubMed] [Google Scholar]
  20. Luijtelaar EVan, Coenen A. Two types of electrocortical paroxysms in an inbred strain of rats. Neuroscience Letters. 1986;70:393–397. doi: 10.1016/0304-3940(86)90586-0. [DOI] [PubMed] [Google Scholar]
  21. Mallat SG. A Wavelet Tour of Signal Processing. New York, NY: Academic Press; 1999. [Google Scholar]
  22. Midzianovskaia IS. Two types of “spike-wave” discharges in the electrocorticogram of WAG/Rij rats, the genetic model of absence epilepsy. Zhurnal Vysshei Nervnoi Deiatelnosti Imeni I. P. Pavlova. 1999;49(5):855–859. [PubMed] [Google Scholar]
  23. Midzianovskaia IS, Kuznetsova GD, Coenen a M, Spiridonov a M, van Luijtelaar EL. Electrophysiological and pharmacological characteristics of two types of spike-wave discharges in WAG/Rij rats. Brain Research. 2001;911(1):62–70. doi: 10.1016/s0006-8993(01)02705-6. [DOI] [PubMed] [Google Scholar]
  24. Nicolay S, Brodie of Brodie EB, Touchon M, Audit B, D’Aubenton-Carafa Y, Thermes C, Arneodo A. Bifractality of human DNA strand-asymmetry profiles results from transcription. Physical Review. E, Statistical, Nonlinear, and Soft Matter Physics. 2007;75(3 Pt 1):032902. doi: 10.1103/PhysRevE.75.032902. [DOI] [PubMed] [Google Scholar]
  25. Niedermeyer E. Abnormal EEG Patterns: Epileptic and Paroxysmal. In: Niedermeyer E, Lopes da Silva FH, editors. Electroencephalography: Basic Principles, Clinical Applications, and Related Fields. 5th ed. Philadelphia, PA: Lippincott Williams & Wilkins; 2005. pp. 255–280. [Google Scholar]
  26. Noachtar S, Binnie C, Ebersole J, Mauguière F, Sakamoto A, Westmoreland B. A glossary of terms most commonly used by clinical electroencephalographers and proposal for the report form for the EEG findings. The International Federation of Clinical Neurophysiology. Electroencephalography and Clinical Neurophysiology. Supplement. 1999;52:21–41. [PubMed] [Google Scholar]
  27. Oliva M, Berkovic SF, Petrou S. Sodium channels and the neurobiology of epilepsy. Epilepsia. 2012;53(11):1849–1859. doi: 10.1111/j.1528-1167.2012.03631.x. [DOI] [PubMed] [Google Scholar]
  28. Oliva MK, McGarr TC, Beyer BJ, Gazina E, Kaplan DI, Cordeiro L, Thomas E, Dib-Hajj SD, Waxman SG, Frankel WN, Petrou S. Physiological and genetic analysis of multiple sodium channel variants in a model of genetic absence epilepsy. Neurobiology of Disease. 2014;67C:180–190. doi: 10.1016/j.nbd.2014.03.007. [DOI] [PMC free article] [PubMed] [Google Scholar]
  29. Papale L, Beyer B, Jones JM, Sharkey LM, Tufik S, Epstein M, Letts VA, Meisler MH, Frankel WN, Escayg A. Heterozygous mutations of the voltage-gated sodium channel SCN8A are associated with spike-wave discharges and absence epilepsy in mice. Human Molecular Genetics. 2009;18(9):1633–1641. doi: 10.1093/hmg/ddp081. [DOI] [PMC free article] [PubMed] [Google Scholar]
  30. Paz JT, Bryant AS, Peng K, Fenno L, Yizhar O, Frankel WN, Deisseroth K, Huguenard JR. A new mode of corticothalamic transmission revealed in the Gria4−/−model of absence epilepsy. Nature Neuroscience. 2011;14(9):1167–1173. doi: 10.1038/nn.2896. [DOI] [PMC free article] [PubMed] [Google Scholar]
  31. Pinault D, Vergnes M, Marescaux C. Medium-voltage 5–9-Hz oscillations give rise to spike-and-wave discharges in a genetic model of absence epilepsy: in vivo dual extracellular recording of thalamic relay and reticular neurons. Neuroscience. 2001;105(1):181–201. doi: 10.1016/s0306-4522(01)00182-8. [DOI] [PubMed] [Google Scholar]
  32. Preibisch S, Saalfeld S, Kaynig V, Frise E, Hartenstein V, White DJ, Pietzsch T, Tomancak P, Arganda-Carreras I, Eliceiri K, Schindelin J, Schmid B, Tinevez J-Y, Cardona A, Rueden C, Longair M. Fiji: an open-source platform for biological-image analysis. Nature Methods. 2012;9(7):676–682. doi: 10.1038/nmeth.2019. [DOI] [PMC free article] [PubMed] [Google Scholar]
  33. Schneider CA, Rasband WS, Eliceiri KW. NIH Image to ImageJ: 25 years of image analysis. Nature Methods. 2012;9(7):671–675. doi: 10.1038/nmeth.2089. [DOI] [PMC free article] [PubMed] [Google Scholar]
  34. Sitnikova E, Hramov AE, Koronovsky Aa, van Luijtelaar G. Sleep spindles and spike-wave discharges in EEG: Their generic features, similarities and distinctions disclosed with Fourier transform and continuous wavelet analysis. Journal of Neuroscience Methods. 2009;180(2):304–316. doi: 10.1016/j.jneumeth.2009.04.006. [DOI] [PubMed] [Google Scholar]
  35. Sitnikova E, van Luijtelaar G. Electroencephalographic characterization of spike-wave discharges in cortex and thalamus in WAG/Rij rats. Epilepsia. 2007;48(12):2296–2311. [PubMed] [Google Scholar]
  36. Sitnikova E, van Luijtelaar G. Electroencephalographic precursors of spike-wave discharges in a genetic rat model of absence epilepsy: Power spectrum and coherence EEG analyses. Epilepsy Research. 2009;84(2–3):159–171. doi: 10.1016/j.eplepsyres.2009.01.016. [DOI] [PubMed] [Google Scholar]
  37. Slaght SJ, Leresche N, Deniau J-M, Crunelli V, Charpier S. Activity of thalamic reticular neurons during spontaneous genetically determined spike and wave discharges. The Journal of Neuroscience. 2002;22(6):2323–2334. doi: 10.1523/JNEUROSCI.22-06-02323.2002. [DOI] [PMC free article] [PubMed] [Google Scholar]
  38. Tan HO, Reid CA, Single FN, Davies PJ, Chiu C, Murphy S, Clarke AL, Dibbens L, Krestel H, Mulley JC, Jones MV, Seeburg PH, Sakmann B, Berkovic SF, Sprengel R, Petrou S. Reduced cortical inhibition in a mouse model of familial childhood absence epilepsy; Proceedings of the National Academy of Sciences of the United States of America; 2007. pp. 17536–17541. [DOI] [PMC free article] [PubMed] [Google Scholar]
  39. Tass P, Rosenblum MG, Weule J, Kurths J, Pikovsky A, Volkmann J, Schnitzler A, Freund H-J. Detection of n:m phase locking from noisy data: application to magnetoencephalography. Physical Review Letters. 1998;81(15):3291–3294. [Google Scholar]
  40. Timofeev I, Grenier F, Steriade M. Contribution of intrinsic neuronal factors in the generation of cortically driven electrographic seizures. Journal of Neurophysiology. 2004;92(2):1133–1143. doi: 10.1152/jn.00523.2003. [DOI] [PubMed] [Google Scholar]
  41. Timofeev I, Grenier F, Steriade M. The role of chloride-dependent inhibition and the activity of fast-spiking neurons during cortical spike-wave electrographic seizures. Neuroscience. 2002;114(4):1115–1132. doi: 10.1016/s0306-4522(02)00300-7. [DOI] [PubMed] [Google Scholar]
  42. Timofeev I, Steriade M. Neocortical seizures: initiation, development and cessation. Neuroscience. 2004;123(2):299–336. doi: 10.1016/j.neuroscience.2003.08.051. [DOI] [PubMed] [Google Scholar]
  43. Tyler AL, McGarr TC, Beyer BJ, Frankel WN, Carter GW. A Genetic Interaction Network Model of a Complex Neurological Disease. Genes, Brain, and Behavior. 2014 doi: 10.1111/gbb.12178. [DOI] [PMC free article] [PubMed] [Google Scholar]
  44. Wallace RH, Marini C, Petrou S, Harkin LA, Bowser DN, Panchal RG, Williams DA, Sutherland GR, Mulley JC, Scheffer IE, Berkovic SF. Mutant GABA(A) receptor gamma2-subunit in childhood absence epilepsy and febrile seizures. Nature Genetics. 2001;28(1):49–52. doi: 10.1038/ng0501-49. [DOI] [PubMed] [Google Scholar]
  45. Weir B. The morphology of the spike-wave complex. Electroencephalography and Clinical Neurophysiology. 1965;19(3):284–290. doi: 10.1016/0013-4694(65)90208-7. [DOI] [PubMed] [Google Scholar]
  46. Westmijse I, Ossenblok P, Gunning B, van Luijtelaar G. Onset and propagation of spike and slow wave discharges in human absence epilepsy: A MEG study. Epilepsia. 2009;50(12):2538–2548. doi: 10.1111/j.1528-1167.2009.02162.x. [DOI] [PubMed] [Google Scholar]

RESOURCES