Sleep Architecture Research Summary

download Sleep Architecture Research Summary

of 42

Transcript of Sleep Architecture Research Summary

  • 7/30/2019 Sleep Architecture Research Summary

    1/42

    Method

    The analysis was done using MATLAB and a plug-in EEGLAB, which is openedby typing eeglab into the command window. All functions not explicitlymentioned to be EEGLAB functions were developed for the analyses; theirparameters and variables returned are described at the end.

    Preprocessing:

    EEGLAB has the tools for importing the sleep recordings into a MATLAB datastructure with a field containing an array for the sleep recording and other fieldscontaining relevant information, such as the channel locations in sphericalcoordinates.

    The raw data was referenced to the average of all channels besides Cz, Fpz, Pz,and Event using avgRefData.

    The k-complexes were tagged manually using a feature of EEGLAB that allowsthe user to scroll through the recordings and right click to name and save thesample point at an event. The ideal k-complex looks like a vertex wave (2-5 Hz)followed almost immediately by a spindle (12-18 Hz). A discernable k-complexneeded to appear on at least one channel for the event to be tagged, and the tagwould then be made near the start of the vertex wave. This was the most time-consuming and tenuous part of the analyses. The rule for finding a k-complexwhile scrolling through the EEG recording was to first see a spindle and thencheck for the presence of a vertex wave preceding it. Epileptic dischargessometimes preceded spindles and looked similar to vertex waves, but the

    difference was noticeable by looking at the event in a more expanded window.Also, k-complexes often occurred with little time in between, a problem because,if two were tagged right next to each other, then the baseline for computingpowers as Z-scores on the second k-complex would be contaminated, as wouldthe results of the bootstrapping method. In this case only the first k-complex wastagged. The possibility of developing an algorithm that manually tags k-complexes was discussed but never implemented.

    The Pipeline:

    A master script runAnalyses used the following functions in order.

    getKComplexData first uses an algorithm that changes the start of the

    manually tagged k-complexes. The channel with the greatest distance betweenits maximum and minimum amplitude in the range 1 second before the manualtag to 1 second after the tag; the new tag is the halfway point between the maxand min on that channel. The second part of the function puts all the k-complexes, their sample points from 3 seconds before the tag to 5 seconds after,in an array.

  • 7/30/2019 Sleep Architecture Research Summary

    2/42

    maxKComplexAmplitudeRank first returns, for each k-complex and each

    channel, the maximum amplitude in the range from 0.3 seconds before the tag to0.3 seconds after. Those amplitudes are then normalized so that, if they are!!,!!, ,!! across the ! channels, and if! = max{!!,!!, ,!!} and

    ! = !!,!!, ,!! , then the new, normalized value for channel ! is !! =!!!!

    !!!..

    maxKComplexAmplitudeRankClustering first calculates the Euclidean

    distance between pairs of k-complexes as theyve been ranked. That is, if

    !! = (!!,!,!!,!

    ,

    ,!!,!) and !! = (!!,!

    ,!!,!

    ,

    ,!!,!) are the vectors for the rankings

    for two different k-complexes, then the distance between them is given by the

    norm! !! , !! = !! !! . If there are ! k-complexes, then there are ! !!!!

    total

    distances ! !!,!! ,! !!,!! ,! !!, !! , ,! !!!!,!! . Those values are used to

    partition the ! k-complexes into 5 clusters using a hierarchal clustering algorithmthat minimizes the distances between clusters, where the distance between twoclusters !! and !! is defined by the UPGMA (Unweighted Pair Group Method with

    Arithmetic Mean),

    1

    !! |!!|!(

    !!!!!!

    !,!).

    The MATLAB function linkage returns an (! 1)3 array that is a record ofthe hierarchal clustering. Columns 1 and 2 are the indices of the clusterscombined and column 3 is the UPGMA between them. The rows are thesuccessive steps in combining clusters until finally the last row represents thecombining of the previous two total clusters into one cluster. The MATLAB

  • 7/30/2019 Sleep Architecture Research Summary

    3/42

  • 7/30/2019 Sleep Architecture Research Summary

    4/42

    kComplexClustDataWavletTFAnalysisfirst computes, for each k-complex,

    the power values at each sample point in time and at each frequency from 1 to30 Hz, using wavelet transformation. Then it computes the Z-score map by usingas a baseline the sample points in the 2-second duration ending 0.5 secondsbefore the tag. A 4-dimensional array with dimensions!"#$!"#$!"#$%&'!!""#$ stores all the information. The time-frequencypower maps, in Z-values, are displayed using MATLABs colored contour plotthat interprets heights as the Z- (and !-axis) values with respect to the time-frequency (!!) plane. The color scale is set for the range ! [2,20] with ! 2corresponding to dark blue and ! 20to dark red.kComplexClustBackAvg creates for each cluster a smoothed signal using

    kComplexBootstrapping performs bootstrapping on the power values at eachtime and frequency for all the k-complexes on a given channel. The chosennumber of bootstrap samples to run was 100 and the chosen p-value was 0.01.There are 4 arrays returned by the function. The first contains the mean powersat a given time and frequency with frequencies ranging from 1 to 30 Hz. Thesecond and third have the same dimensions as the first and give the powers atthe upper and lower percentiles (1% and 99%), respectively. The fourth also hasthe same dimensions, and its values are 0 or 1, indicating whether or not thelower percentile exceeds the mean on the baseline interval chosen to be to bethe time ! [2.5,0.5] where ! = 0 would be the start of the k-complex.

    More specifically, the trials are [Jamin, finish this paragraph].

    clusterHeadPlots first takes 3 regions of interest in the k-complex event, the!"#$ sec !"#$(!") regions 0.5,0.5 [1,9], 0, 1.5 11, 14 , and0, 1.5 [14, 22], where !"#$ = 0 is the tag of the event, and over those regions,

    for each cluster, the average Z-values are calculated over all the k-complexescontained in that cluster. These values are passed into EEGLABs functiontopoplot, which displays a topographic map in 2-D looking down at the top ofthe head, and which uses an algorithm to interpolate the color values in between

    coordinates on the map. The scale of the color map has dark blue being thelowest of the average power values over the 21 channels and dark red thehighest.

  • 7/30/2019 Sleep Architecture Research Summary

    5/42

    Results

    Only the clusters that contained at least 5 k-complexes similar enough so thatdistinct blobs had formed in our 3 time-frequency regions of interests were

    considered. For example, cluster pictured below contained only 1 k-complex andso it was disregarded.

    The figures and their observations are given in the next pages.

  • 7/30/2019 Sleep Architecture Research Summary

    6/42

    location complexes

    tagged

    cluster 1 cluster 2 cluster 3 cluster 4 cluster 5

    A 89 1 44 32 10 2 Cluster 2: spindle activity in the 15-20 Hz rangvisible on front of head, barely visible on back;

    Clusters 3 and 4: similar to Cluster 2.

    B 67 1 33 15 7 11 Cluster 2: nothing stands out. Cluster 3: k-com

    visible in the center-right region (C4, F4, T4, Chardly visible elsewhere (look especially at thedifference between C3 and C4, and between F

    F4). Cluster 4: k-complex visible on Pz, hardlyanywhere else. Cluster 5: Similar to cluster 2.

    C 100 6 13 3 86 2 Cluster 1: Little power from vertex wave; little b

    Hz activity 3 seconds after tag. Cluster 2: k-complexes weak on O1, O2 and P7; homogenoelsewhere; little bit of ~5 Hz activity 3 seconds

    tag. Cluster 3: Similar to Cluster 2; on channeF3, F7, Fp1 and T7, power in the 15-30 Hz regseconds after tag. Cluster 4: nothing stands ou

    D 152 1 105 10 7 26 Clusters 2, 3, 4 and 5: nothing stands out.

    E 52 2 43 1 1 5 Clusters 2 and 5: nothing stands out.

    F 181 3 136 8 33 1 Cluster 2: ~7 Hz activity persisting from tag allway through the time window. Cluster 4: ~7 Hzactivity persisting on F8 after the tag, but hardly

    G 46 5 34 1 3 3 Cluster 2: nothing stands out.

    H 82 1 75 1 4 1 Cluster 2: vertex wave on O2 but not O1.

    I 436 100 163 6 37 130 Cluster 1: right side of the head bias: k-comple

    more visible on C4 verses C3, O2 versus O1, Fversus FT9, etc.; 18-25 Hz activity at tag; 25-30activity 1 second after tag. Cluster 2: 18-25 Hz

    at tag; 25-30 Hz activity 1 second after tag. Clunothing stands out. Cluster 5: similar to Cluste

    J 566 1 4 171 379 11 Cluster 3: ~30 Hz activity 1 second after the taCluster 4: similar to Cluster 2.

    K 137 1 11 120 1 4 Cluster 2: k-complex on C4 but not C3. Cluste

    ~25 Hz activity visible at the tag on F4, Fz, Pz, Fp2.

    L 167 79 29 48 1 10 Clusters 1 and 2: nothing stands out. Cluster

    looking at FT9 versus FT10, F7 versus F8, andversus T8, two r.o.i.s on left side of head (FT9,T7) for spindles, one at the tag and another at

    second after the tag, but only one r.o.i. on the rsides channels (FT10, F8, T8).

    M 235 194 32 1 7 1 Cluster 1: 25-30 Hz activity 1 second after tag

    and Cz; 25-30 Hz activity at tag on F7 but not FCluster 2: nothing stands out.

    N 106 27 6 4 65 4 Cluster 1: nothing stands out. Cluster 4: more

    on vertex wave on FT10 versus FT9 and on P8P7.

  • 7/30/2019 Sleep Architecture Research Summary

    7/42

    Subject A

  • 7/30/2019 Sleep Architecture Research Summary

    8/42

  • 7/30/2019 Sleep Architecture Research Summary

    9/42

  • 7/30/2019 Sleep Architecture Research Summary

    10/42

    Subject B

  • 7/30/2019 Sleep Architecture Research Summary

    11/42

  • 7/30/2019 Sleep Architecture Research Summary

    12/42

  • 7/30/2019 Sleep Architecture Research Summary

    13/42

  • 7/30/2019 Sleep Architecture Research Summary

    14/42

    Subject C

  • 7/30/2019 Sleep Architecture Research Summary

    15/42

  • 7/30/2019 Sleep Architecture Research Summary

    16/42

  • 7/30/2019 Sleep Architecture Research Summary

    17/42

  • 7/30/2019 Sleep Architecture Research Summary

    18/42

    Subject D

  • 7/30/2019 Sleep Architecture Research Summary

    19/42

  • 7/30/2019 Sleep Architecture Research Summary

    20/42

  • 7/30/2019 Sleep Architecture Research Summary

    21/42

    Subject E

  • 7/30/2019 Sleep Architecture Research Summary

    22/42

    Subject F

  • 7/30/2019 Sleep Architecture Research Summary

    23/42

  • 7/30/2019 Sleep Architecture Research Summary

    24/42

    Subject G

  • 7/30/2019 Sleep Architecture Research Summary

    25/42

  • 7/30/2019 Sleep Architecture Research Summary

    26/42

  • 7/30/2019 Sleep Architecture Research Summary

    27/42

  • 7/30/2019 Sleep Architecture Research Summary

    28/42

    Subject I

  • 7/30/2019 Sleep Architecture Research Summary

    29/42

  • 7/30/2019 Sleep Architecture Research Summary

    30/42

  • 7/30/2019 Sleep Architecture Research Summary

    31/42

    Subject J

  • 7/30/2019 Sleep Architecture Research Summary

    32/42

  • 7/30/2019 Sleep Architecture Research Summary

    33/42

    Subject K

  • 7/30/2019 Sleep Architecture Research Summary

    34/42

  • 7/30/2019 Sleep Architecture Research Summary

    35/42

    Subject L

  • 7/30/2019 Sleep Architecture Research Summary

    36/42

  • 7/30/2019 Sleep Architecture Research Summary

    37/42

  • 7/30/2019 Sleep Architecture Research Summary

    38/42

    Subject M

  • 7/30/2019 Sleep Architecture Research Summary

    39/42

  • 7/30/2019 Sleep Architecture Research Summary

    40/42

    Cluster N

  • 7/30/2019 Sleep Architecture Research Summary

    41/42

  • 7/30/2019 Sleep Architecture Research Summary

    42/42