OSCR

Does twitch-spindle coupling differ between N2 and N3 sleep in 6-month-olds?

Code ↔ Paper

2 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 2 matches
  1. [1] § Methods › Data analysis › E‌EG signals ↔ fun_Spindle_Stats.m, lines 1–70 · score 0.90 · 12–14 Hz, median amplitude, filtered EEG, 11–15 Hz, detection, expanded
  2. [2] § Methods › Data analysis › Sleep spindles ↔ fun_Spindle_Stats.m, lines 1–70 · score 0.61 · spindles detected, sleep spindle frequency, Hilbert, signal, amplitude, waveform

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

MATLAB · 160 lines · 7 KB · no license · 2 matches

  1. function Output = fun_Spindle_Stats(EEGValues,EEGTimes,EEGArtifact_yn, Fs, MinLength, LT, UT)
  2. % Output = Spindle_Stats(EEGValues,EEGTimes,EEGArtifact_yn, Fs, MinLength, LT, UT)
  3. %
  4. % Script that takes an EEG signal and calculates several sleep spindle
  5. % related numbers.
  6. %
  7. % Dependencies:
  8. % SpindleFilter.m Filters EEG to spindle frequency
  9. % Logical_Consecutive.m Determines the length of sleep spindles
  10. % Matlab Signal Processing Toolbox
  11. %
  12. % Inputs:
  13. % EEGValues 1xn Vector The value of the EEG waveform
  14. % EEGTimes 1xn vector The time of each EEG datapoint
  15. % Fs Number The sampling rate of the EEG waveform
  16. % MinLength Number The minimum length for a sleep spindle
  17. % in seconds
  18. % LT Number The lower amplitude threshold for detection
  19. % (ex 2x median amplitude LT=2)
  20. % UT Number The upper amplitude threshold for detection
  21. % (ex: toddlers McClain in 6x, adults 9x)
  22. %
  23. % Outputs:
  24. % Output A structure with the following fields:
  25. % .Values The filtered EEG waveform
  26. % .Times The Times of the filtered EEG waveform
  27. % .Amplitude The amplitude of the resulting waveform
  28. % .Phase The phase of the resulting waveform
  29. % .Threshold The threshold used on the Amplitude to determine a
  30. % sleep spindle.
  31. % .SpindleLogical A logical that reports whether each data point is during
  32. % a sleep spindle
  33. % .SpindleIndex The same as SpindleLogical, except instead of all
  34. % spindles being 1, they are an integer of what number
  35. % sleep spindle it is. Helps for indexing particular
  36. % sleep spindles.
  37. %
  38. % Given K sleep spindles detected
  39. %
  40. % .SB.StartTime 1xK vector The start time of the sleep spindle.
  41. % .SB.EndTime 1xK vector The end time of the sleep spindle.
  42. % .SB.Duration 1xK vector The duration of the sleep spindle.
  43. % .SB.Amp 1xK cell The amplitude of the sleep spindle at each
  44. % datapoint.
  45. % .SB.Phase 1xK cell The phase of the sleep spindle at each
  46. % datapoint.
  47. % .SB.medAmp 1xK vector The median amplitude of the sleep spindle.
  48. % .SB.maxAmp 1xK vector The maximum amplitude of the sleep spindle.
  49. % .SB.sumPhase 1xK vector The sum of all phase changes for the spindle
  50. % burst.
  51. % .SB.nCycles 1xK vector The number of cycles for each sleep spindle.
  52. %
  53. % Initally used in:
  54. % % Sokoloff G, Dooley JC, Glanz RM, Yen RY, Hickerson MM, Evans L, Laughlin
  55. % HM, Apfelbaum KS, and Blumberg MS (2021). Twitches emerge postnatally
  56. % during quiet sleep in human infants and are synchronized with sleep
  57. % spindles. Current Biology. https://doi.org/10.1016/j.cub.2021.05.038
  58. %
  59. % Last updated 6/16/2024 by Taylor Christiansen added custom ampltiude and
  60. % spindle length inputs and expanded frequency from 12-14 to 11-15 Hz
  61. %
  62. % Used in Christiansen et al., 2026
  63. [fValues,fTimes] = SpindleFilter(EEGValues,EEGTimes,Fs); % Filter the signal
  64. fValuesAmp = abs(hilbert(fValues)); % Amplitude
  65. fValuesPhase = angle(hilbert(fValues)); % Phase
  66. dPhase = diff(unwrap(fValuesPhase)); % difference in phase
  67. dPhase = [0 dPhase]; % Pad the vector
  68. %% Only include signal not during noise to calculate the median Amplitude
  69. for t = 1:length(fTimes) %loop through EEG data row
  70. Amp = fValuesAmp (t); % Amplitude at time t
  71. Art = EEGArtifact_yn (t); % Art y or n at time t
  72. if Art == 1 ; %if the amplitude is during artifact period
  73. fValuesAmp_clean(t) = NaN;
  74. else
  75. fValuesAmp_clean(t) = Amp;
  76. end
  77. end
  78. medAmp = nanmedian(fValuesAmp_clean);
  79. LowerThreshold = medAmp*LT; % Change to change threshold
  80. UpperThreshold = medAmp*UT;
  81. fValuesAmpLogical = fValuesAmp_clean > LowerThreshold;
  82. ThreshDuration = Logical_Consecutive(fValuesAmpLogical);
  83. MinDuration = round(Fs*MinLength);
  84. DurationLogical = ThreshDuration.ConsecutiveOutput < MinDuration;
  85. fValuesAmpLogical(DurationLogical & fValuesAmpLogical) = 0;
  86. ThreshDuration = Logical_Consecutive(fValuesAmpLogical);
  87. DurationLogical = ThreshDuration.ConsecutiveOutput < MinDuration;
  88. fValuesAmpLogical(DurationLogical & ~fValuesAmpLogical) = 1;
  89. ThreshDuration = Logical_Consecutive(fValuesAmpLogical);
  90. dfValuesAmpLogical = diff(fValuesAmpLogical);
  91. SSI_raw = find(dfValuesAmpLogical == 1); % Spindle Start Index
  92. SEI_raw = find(dfValuesAmpLogical == -1); % Spindle End Index
  93. nSpindles_raw = min([length(SEI_raw); length(SSI_raw)]);
  94. SSI = []; %initalize
  95. SEI = [];
  96. %Loop Through existing spindles
  97. for iSpindle = 1:nSpindles_raw
  98. Amp_loop = [];
  99. Amp_loop = fValuesAmp(SSI_raw(iSpindle):SEI_raw(iSpindle));
  100. st = SSI_raw (iSpindle);
  101. en = SEI_raw (iSpindle);
  102. % Check if any value in the event crosses the Upper Threshold
  103. if any(Amp_loop > UpperThreshold) % if at any point the amplitude of spindle crosses the UpperThreshold save it
  104. % If it does, include the entire event
  105. SSI = [SSI st];
  106. SEI = [SEI en];
  107. end
  108. end
  109. nSpindles = [];
  110. nSpindles = min([length(SEI); length(SSI)]);
  111. Output.Values = fValues;
  112. Output.Times = fTimes;
  113. Output.Amplitude = fValuesAmp_clean;
  114. Output.Phase = fValuesPhase;
  115. Output.LowerThreshold = LowerThreshold;
  116. Output.UpperThreshold = UpperThreshold;
  117. Output.SpindleLogical = fValuesAmpLogical;
  118. Output.SpindleIndex = zeros(size(fValuesAmpLogical));
  119. if nSpindles > 0
  120. Output.nSpindles = nSpindles;
  121. else
  122. Output.nSpindles = 0;
  123. end
  124. % Save the information for the identified sleep spindles
  125. for iSpindle = 1:nSpindles
  126. Output.SpindleIndex(SSI(iSpindle):SEI(iSpindle)) = iSpindle; % Create string for easy sleep spindle indexing
  127. Output.SB.StartTime(iSpindle) = SSI(iSpindle)/Fs; % Get sleep spindle start time (in seconds)
  128. Output.SB.EndTime(iSpindle) = SEI(iSpindle)/Fs; % Get sleep spindle end time (in seconds)
  129. Output.SB.Duration(iSpindle) = Output.SB.EndTime(iSpindle) - Output.SB.StartTime(iSpindle); % Get sleep spindle duration
  130. Output.SB.Amp{iSpindle} = fValuesAmp(SSI(iSpindle):SEI(iSpindle)); % Get sleep spindle amplitude throughout
  131. Output.SB.Phase{iSpindle} = fValuesPhase(SSI(iSpindle):SEI(iSpindle)); % Get sleep spindle phase throughout
  132. Output.SB.medAmp(iSpindle) = median(fValuesAmp(SSI(iSpindle):SEI(iSpindle))); % Get sleep spindle median amplitude
  133. Output.SB.maxAmp(iSpindle) = max(fValuesAmp(SSI(iSpindle):SEI(iSpindle))); % Get sleep spindle max amplitude
  134. Output.SB.sumPhase(iSpindle) = sum(dPhase(SSI(iSpindle):SEI(iSpindle))); % Get the phase duration of the sleep spindle
  135. Output.SB.nCycles(iSpindle) = Output.SB.sumPhase(iSpindle) / (2*pi); % Get the number of cycles of the sleep spindle
  136. Output.SB.frequencies(iSpindle)= Output.SB.nCycles(iSpindle)/Output.SB.Duration(iSpindle); %use the number of cycles and the duration of the spindle to calculate frequency
  137. end
  138. end

fun_Spindle_Stats.m at commit 0bcc813, no license · at the source

Overview

Authors: Taylor G Christiansen1, Greta Sokoloff1,2, Hailey C Long1, Olivia K Kopp1, Lydia K Karr1, Mark S Blumberg1,2
  1. Department of Psychological and Brain Sciences, University of Iowa, Psychological and Brain Sciences Building, 340 Iowa Avenue, Iowa City, IA 52242, United States
  2. Iowa Neuroscience Institute, University of Iowa, Iowa City, IA 52242, United States
Institutions: University of Iowa (United States)
Journal: Sleep, volume 49, issue 4, article zsaf410
Dates: received 23 July 2025; accepted 17 December 2025; published online 23 December 2025; in print April 2026
Type: Research article · Language: English
License: CC BY-NC
Identifiers: DOI 10.1093/sleep/zsaf410 · PMID 41432252 · PMCID PMC13089613 · OpenAlex W7117155390
Open access: hybrid, a free copy (OpenAlex)
Status: code verified
Categories: EEG (modality), human (organism), developmental (subfield)
Methods: Spectral & time-frequency, Preprocessing, Statistics, Single-unit activity, calcium imaging
Keywords: infancy, development, sleep spindles, myoclonic twitches, delta oscillations, sensorimotor system
MeSH: Sleep Stages*, Delta Rhythm, Electroencephalography, Female, Humans, Infant, Male, Polysomnography, Sleep, REM (* major topic)
Topic: Sleep and Wakefulness Research (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: NICHD NIH HHS (R01 HD104616)
Citations: cited by 2 papers (Europe PMC); 62 references in the paper

Abstract

Twitches are discrete movements that characterize rapid eye movement (REM) sleep. However, recent work showed that twitches also occur during non-REM (NREM) sleep in human infants beginning around 3 months of age, a time when sleep spindles and the cortical delta rhythm are also emerging. Further, NREM twitches are coupled with sleep spindles, suggesting a unique contribution to sensorimotor development. Given that NREM sleep is composed of distinct substages, we investigated whether twitching and twitch-spindle coupling are differentially expressed during N2 and N3 sleep. In 6-month-old human infants (n = 21; 7 females), we recorded electroencephalogram, respiration, and video during daytime sleep. We found high-intensity twitching during N2 and REM but not N3 sleep. In contrast, sleep spindles exhibited similar temporal characteristics during N2 and N3. Also, despite differences in the intensity of twitching during N2 and N3, significant twitch-spindle coupling occurred in both stages. Finally, the rate of twitching was inversely related to delta power across NREM periods. These findings suggest that although twitching occurs during REM, N2, and N3 sleep at this age, its expression is compatible with some sleep components (e.g., rapid eye movements, sleep spindles) but not others (e.g., cortical delta), highlighting the continuing need to better understand the dynamic organization of sleep and its individual components in early development.

Reproduced under the paper's license (CC BY-NC), from the paper cited above.

Repository

Its files are read in the Code ↔ Paper reader above, with 2 matches between paragraphs and lines of code.

Blumberg-Lab/Chirstiansen-et-al-2026

License: none: the authors keep all their rights
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: 0bcc8132c37c9c998a2da668ab91ac012eead447, 17 December 2025
Languages: MATLAB (8)
Size: 9 files, 8 scripts
Software Heritage: not archived
Found in: “Deposit of material in a data repository”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
9 files

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 8 scripts, each with its path and the digest of its content;
  • 2 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

No dataset and no data link were found in the paper.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 28 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 6 authors, 6 keywords, 9 MeSH terms, 1 funder, 59 references.

Cite

This paper

Christiansen, T. G., Sokoloff, G., Long, H. C., Kopp, O. K., Karr, L. K., & Blumberg, M. S. (2026). Does twitch-spindle coupling differ between N2 and N3 sleep in 6-month-olds? Sleep, 49(4), zsaf410. https://doi.org/10.1093/sleep/zsaf410

BibTeX

@article{christiansen2026does,
author = {Christiansen, Taylor G and Sokoloff, Greta and Long, Hailey C and Kopp, Olivia K and Karr, Lydia K and Blumberg, Mark S},
title = {{Does twitch-spindle coupling differ between N2 and N3 sleep in 6-month-olds?}},
journal = {Sleep},
year = {2026},
month = apr,
volume = {49},
number = {4},
pages = {zsaf410},
publisher = {Oxford University Press},
issn = {0161-8105},
doi = {10.1093/sleep/zsaf410},
url = {https://doi.org/10.1093/sleep/zsaf410},
pmid = {41432252},
pmcid = {PMC13089613}
}

RIS

TY - JOUR
AU - Christiansen, Taylor G
AU - Sokoloff, Greta
AU - Long, Hailey C
AU - Kopp, Olivia K
AU - Karr, Lydia K
AU - Blumberg, Mark S
TI - Does twitch-spindle coupling differ between N2 and N3 sleep in 6-month-olds?
T2 - Sleep
J2 - Sleep
PY - 2026
DA - 2026/04/01
VL - 49
IS - 4
SP - zsaf410
SN - 0161-8105
PB - Oxford University Press
DO - 10.1093/sleep/zsaf410
UR - https://doi.org/10.1093/sleep/zsaf410
LA - en
ER -

CSL-JSON

{
"id": "10.1093/sleep/zsaf410",
"type": "article-journal",
"title": "Does twitch-spindle coupling differ between N2 and N3 sleep in 6-month-olds?",
"container-title": "Sleep",
"author": [
{
"family": "Christiansen",
"given": "Taylor G"
},
{
"family": "Sokoloff",
"given": "Greta"
},
{
"family": "Long",
"given": "Hailey C"
},
{
"family": "Kopp",
"given": "Olivia K"
},
{
"family": "Karr",
"given": "Lydia K"
},
{
"family": "Blumberg",
"given": "Mark S"
}
],
"container-title-short": "Sleep",
"volume": "49",
"issue": "4",
"page": "zsaf410",
"DOI": "10.1093/sleep/zsaf410",
"PMID": "41432252",
"PMCID": "PMC13089613",
"ISSN": "0161-8105",
"publisher": "Oxford University Press",
"URL": "https://doi.org/10.1093/sleep/zsaf410",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
1
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1016/j.isci.2026.115878 [code]
Twitching in sleeping premature infants provides a sensitive behavioral assay of early motor control.
Journal: iScience
In common: developmental, 8 references, author Mark S. Blumberg
[2] doi:10.1002/hbm.70354
Exploring Deep Magnetoencephalography via Thalamo‐Cortical Sleep Spindles
Journal: n/a
In common: EEG, 6 references
[3] doi:10.1016/j.isci.2026.116601 [code]
Random auditory stimulation during sleep disturbs traveling slow waves and declarative memory.
Journal: iScience
In common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, 4 references
[4] doi:10.1007/s12021-026-09810-4 [code]
Meta-Analysis of Face-Validity Indicators in Automatically Detected Dog Sleep Spindles.
Journal: Neuroinformatics
In common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, EEG, 3 references
[5] doi:10.1093/sleepadvances/zpag069 [code]
Thalamic transcranial electrical stimulation with temporal interference enhances sleep spindle activity during a daytime nap.
Journal: Sleep advances : a journal of the Sleep Research Society
In common: Statistics and Machine Learning Toolbox, EEG, 4 references
[6] doi:10.1038/s41597-026-07356-3 [code]
A dataset of EEG and ECG recordings around the onset of NREM sleep from infancy to adolescence.
Journal: Scientific data
In common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, EEG, 2 references
[7] doi:10.1371/journal.pbio.3003938 [code]
Theta oscillations tag episodic memories for sleep-dependent consolidation.
Journal: PLoS biology
In common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, EEG, 2 references
[8] doi:10.7554/elife.103956 [code]
Human brain-wide activation of sleep rhythms.
Journal: eLife
In common: EEG, 4 references
[9] doi:10.1038/s41467-026-75162-x [code]
Dyscoordination of thalamic reticular spindles is associated with social memory deficits in mice and humans with autism spectrum disorder.
Journal: Nature communications
In common: Statistics and Machine Learning Toolbox, 3 references
[10] doi:10.1016/j.dcn.2026.101727 [code]
Neonatal brain activity across sleep states: Evidence from resting EEG and auditory event-related potentials.
Journal: Developmental cognitive neuroscience
In common: developmental, EEG, 3 references

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.