raphaelvallat/yasa

Question about detected spindles - help needed

Closed this issue · 2 comments

Hi there,

I applied spindle detection to my n2 and n3 sleep stages (using these parameters: sp_multi_clean = yasa.spindles_detect(data_filtered, sf, ch_names=channels_of_interest, hypno=hypno_with_art, include=(2, 3), multi_only=False, remove_outliers=True, freq_broad=(0.4, 18), thresh={"rel_pow": 0.1, "corr": 0.65, "rms": 1.5})
) and it detected 1617 spindles on 7 channels altogether, which seems to be fine. But then I also computed the phase angles using the SO-spindle code (specified as : sw = sw_detect(data_of_interest, sf, ch_names=channels_of_interest, hypno=hypno_with_art, include=(2, 3), freq_sw=(0.4, 1.5),
dur_neg=(0.4, 1.5), dur_pos=(0.1, 1), amp_neg=(40, 200),
amp_pos=(10, 150), amp_ptp=(75, 350), coupling=True, coupling_params=dict(freq_sp=(12, 16), time=2, p=None),
remove_outliers=False, verbose=False)).

And there my output on the same data got me 11540 SWs with coupled spindles, with the same 7 channels. I am very new to sleep research (this is my master's project) and maybe this is just a big a misinterpretation from my part, but shouldn't actually those coupled spindles detected from the SO-spindle coupling also show up in the spindle detection outcome? Because then even just for one channel there are over 2000 slow-waves with what seems to be coupled with spindles, right?

Note: my edf files are already bandpass filtered once before even the spindle detection with a 0.4-18 Hz bandpass, which cannot be undone, due to the nature of the data. When looking at my SO-spindle coupling summary, technically it all aligns with the outcome values shown in the notebook, and I can also say that about the spindle detection outcome. I am just not sure about what to make of the SO-spindle coupling outcomes, given the amount of previously detected spindles. I would really appreciate any help on understanding this situation.

Best,
Bettina

Hi @bettina77,

Despite the misleading name, the SO-spindle coupling is actually not calculated by taking co-occurring slow waves and spindles. Instead, as a true phase-amplitude coupling metric, it is calculated by looking at the coupling between the phase of a low-frequency slow-oscillations (i.e. detected slow-waves), and the amplitude in the higher-frequency range, i.e. the sigma band, which is the frequency band typically associated with spindles.

I would encourage you to read the Methods section of my 2023 Cell Reports paper, which states:

The proportion of SOs that are coupled with the spindle-related sigma band therefore represents a simple metric of the coupling quantity. Noteworthy, another approach that has been used to estimate the quantity of SO events that are coupled is to apply an automatic spindle detection on the signal and then find spindles that occur within a certain range of the negative peak of the SO. However, the ndPAC approach has the advantage of being data-driven and as such does not rely on arbitrary thresholds for the spindle detection and events co-occurrence.

To be exact, we should use the term "slow oscillations—sigma coupling" instead of "slow oscillation—spindle coupling", which does not imply co-occurrence between a slow-waves and spindle. I should note that most papers on coupling use the latter term for simplicity (I'm guilty of that as well), when they in fact almost always measure the former.

Hope this helps,
Thanks
Raphael

Hi Raphael,

I see, then my issue was really just a misinterpretation that spindles must also occur where there is an indication for a sigma peak (which would have been suspiciously many spindles on the other hand). I understand that this is wrong, thank you so much for the quick and helpful clarification!

Best,
Bettina