Temporal drift of sleep-wake representations in hypothalamic neuronal ensembles.
The 2 matches · all tie a paragraph to a whole file, not to given lines: weak matches, whose lines are not tinted
- [1] § Methods › Calcium traces extraction ↔ Yan Y. 2026 Temporal drift of sleep-wake representations in hypothalamic neuronal ensembles/Code/f_directEnvNorm.m, the whole file · a weak match · score 0.71 · envelope normalization, calcium traces, Gaussian, fitted, intensity, fluorescence
- [2] § Methods › Calcium traces extraction ↔ Yan Y. 2026 Temporal drift of sleep-wake representations in hypothalamic neuronal ensembles/Code/f_directEnvNorm.m, the whole file · a weak match · score 0.62 · fluorescence intensity, raw calcium, frames, traces
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 · 95 lines · 3.7 KB · no license · 2 matches
- function [dataArrayEnv, F0Weight] = f_directEnvNorm(filePath, clusterNum, numWorkers);
- %[dataArrayEnv, F0Weights] = f_directEnvNorm(filePath, clusterNum,numWorkers);
- %
- %This function is designed to align the raw calcium traces stored in the
- %text file with name 'filePath' to zero using an F0 estimated by fitting a number of Gaussian
- %distributions (clusterNum) and normalize them using the envelope
- %normalization. For more infos refer to Lukas.
- %
- %INPUTS (all optional):
- % filePath: The path and name to the file where the raw data is stored.
- % Make sure that each column represents a cell and its rows the different
- % time points.
- % clusterNum: The number of Guassisans the fluorescence intensities should
- % be clustered into to find F0 (default = 3).
- % numWorkers: Number of parallel workers for the estimation of the
- % Gaussians (default = 55).
- %
- %OUTPUTS:
- %dataArrayEnv: The normalized calcium time series.
- %F0Weights: The estimated baseline F0 and the Weight, that is, the
- % percentage of explained data by the distribution.
- %
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %%
- %---------Convenience-------
- addpath(genpath('Z:\Lab_resources\calcium_imaging_toolbox'));
- if ~exist('filePath')|| isempty(filePath) %only tifs specified so far, h5 could easily be implemented
- [FileName,PathName] = uigetfile({'*.txt'},'Select the text file for fluorescence normalization');
- filePath = [PathName FileName];
- end
- if ~exist('clusterNum')|| isempty(clusterNum)
- clusterNum = 3;
- end
- if ~exist('numWorkers')|| isempty(numWorkers)
- numWorkers = 5;
- end
- %%
- %---------Loading data and generating sessionStarts
- tracesRaw = importdata(filePath, '\t'); %load in the data from text file
- % tracesRaw = importdata(filePath, ','); %load in the data from text file
- if isa(tracesRaw, 'struct') %check whether the text file still contains the header information and if so...
- tracesRaw = tracesRaw.data; % ... retrieve the data
- tracesRaw = tracesRaw(:,2:end); %and delete the first column (frame numbering)
- end
- sessionStarts = [0 size(tracesRaw,1)];
- %% Find the F0 and re-zero the traces with the Gaussian fitting (probably optional)
- tracesZeroed = NaN(size(tracesRaw)); %pre-allocation
- F0Weight = NaN(2,length(sessionStarts)-1,size(tracesZeroed,2));
- % pObject = parpool('Castor',numWorkers); %define the pool of workers
- % parfor j=1:size(tracesRaw,2)
- for j=1:size(tracesRaw,2)
- subst = tracesRaw(:,j);
- substi = NaN(2,length(sessionStarts)-1);
- for k=1:length(sessionStarts)-1
- [W,M,V,L] = EM_GM(subst(sessionStarts(k)+1:sessionStarts(k+1)),clusterNum);
- [F0,idx] = min(M);
- substi(:,k) = [F0; W(idx)];
- % F0Weight(1:2,k,j) = [F0; W(idx)];
- % F0Weight(1,k,j) = F0;
- % F0Weight(2,k,j) = W(idx);
- subst(sessionStarts(k)+1:sessionStarts(k+1)) = subst(sessionStarts(k)+1:sessionStarts(k+1))-F0;
- end
- tracesZeroed(:,j) = subst;
- F0Weight(:,:,j) = substi;
- end
- % delete(pObject);
- %% Do envelope normalizations
- dataArrayEnv = NaN(size(tracesZeroed)); % pre-allocate space
- Diff = [];
- y = [];
- env = [];
- for i=1:size(tracesZeroed,2)
- Diff(:,i) = diff(tracesZeroed(:,i));
- y = hilbert(Diff(:,i));
- env(:,i) = abs(y);
- for j=1:length(sessionStarts)-1
- dataArrayEnv(sessionStarts(j)+1:sessionStarts(j+1),i) = tracesZeroed(sessionStarts(j)+1:sessionStarts(j+1),i)/(median(env(sessionStarts(j)+1:sessionStarts(j+1)-1,i)));
- end
- clear y;
- %sNorm(:,i) = tracesRaw(:,i)/std(Diff(:,i)); %alternatively normalize to
- %the standard deviation of the distribution of Diff.
- end
- F0Weight = squeeze(F0Weight);
- end
f_directEnvNorm.m at commit 50030a7, no license · at the source
Overview
- Zentrum für Experimentelle Neurologie, Department of Neurology, Inselspital University Hospital Bern, University of Bern, Bern, Switzerland
- Department of Biomedical Research, University of Bern, Bern, Switzerland
- Present Address: Department of Neuroscience, Yale School of Medicine, Yale University, New Haven, CT USA
Abstract
Correlative and causal evidence implicates distinct genetically-defined and evolutionary-conserved hypothalamic neurons in regulating wakefulness, non-rapid eye movement (NREM), and rapid eye movement (REM) sleep. The prevailing view is that these circuits govern sleep-wake states by recruiting stable, invariant neuronal substrates, yet, this remains unknown. Here, we show that inhibitory, excitatory, hypocretins/
Reproduced under the paper's license (CC BY), from the paper cited above.
Repositories
Its files are read in the Code ↔ Paper reader above, with 2 matches between paragraphs and lines of code.
ZENLabCode
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
- 27 September 2026: the link answers (HTTP 200)
Zenodo 20747987
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
- 27 September 2026: the link answers (HTTP 200)
4 files
- Yan Y. 2026 Temporal drift of sleep-wake representations in hypothalamic neuronal ensembles/
Code/ , MATLAB, 105 linesCount_stable_cells.m - Yan Y. 2026 Temporal drift of sleep-wake representations in hypothalamic neuronal ensembles/
Code/ , MATLAB, 89 linesCount_state_changs.m - Yan Y. 2026 Temporal drift of sleep-wake representations in hypothalamic neuronal ensembles/
Code/ , MATLAB, 95 linesf_directEnvNorm.m - README.md, Text, 10 lines
zenlabcode/calciumimaging
50030a73adad21a951c535b6df4ec13becb02622, 3 March 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
4 files
- Yan Y. 2026 Temporal drift of sleep-wake representations in hypothalamic neuronal ensembles/
Code/ , MATLAB, 105 linesCount_stable_cells.m - Yan Y. 2026 Temporal drift of sleep-wake representations in hypothalamic neuronal ensembles/
Code/ , MATLAB, 89 linesCount_state_changs.m - Yan Y. 2026 Temporal drift of sleep-wake representations in hypothalamic neuronal ensembles/
Code/ , MATLAB, 95 lines, 2 matchesf_directEnvNorm.m - README.md, Text, 10 lines
Code availability
All the MATLAB scripts used for data processing and statistical analysis, together with a representative sample dataset, are publicly available at the GitHub repository: https://
Reproduced under the paper's license (CC BY), from the paper cited above.
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:
- 3 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 6 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
Datasets cited
- figshare:31441240, at figshare; found in DataCite
Data availability
Source data are provided with this paper. The processed datasets used for neuron activity longitudinal tracking have been deposited in Figshare under an open-access license CC BY 4.0. 10.6084/
Reproduced under the paper's license (CC BY), from the paper cited above.
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, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 5 authors, 2 keywords, 15 MeSH terms, 1 funder, 74 references.
Cite
This paper
Yan, Y., Calcini, N., Rusterholz, T., Gutierrez, C., & Adamantidis, A. (2026). Temporal drift of sleep-wake representations in hypothalamic neuronal ensembles. Nature communications, 17(1), 9137. https://
BibTeX
@article{yan2026temporal
author = {Yan, Yudong and Calcini, Niccolò and Rusterholz, Thomas and Gutierrez, Carolina and Adamantidis, Antoine},
title = {{Temporal drift of sleep-wake representations in hypothalamic neuronal ensembles}},
journal = {Nature communications},
year = {2026},
month = jul,
volume = {17},
number = {1},
pages = {9137},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/
url = {https://
pmid = {42649166},
pmcid = {PMC13519010}
}
RIS
TY - JOUR
AU - Yan, Yudong
AU - Calcini, Niccolò
AU - Rusterholz, Thomas
AU - Gutierrez, Carolina
AU - Adamantidis, Antoine
TI - Temporal drift of sleep-wake representations in hypothalamic neuronal ensembles
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/
VL - 17
IS - 1
SP - 9137
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "Temporal drift of sleep-wake representations in hypothalamic neuronal ensembles",
"container-title": "Nature communications",
"author": [
{
"family": "Yan",
"given": "Yudong"
},
{
"family": "Calcini",
"given": "Niccolò"
},
{
"family": "Rusterholz",
"given": "Thomas"
},
{
"family": "Gutierrez",
"given": "Carolina"
},
{
"family": "Adamantidis",
"given": "Antoine"
}
],
"container-title-short":
"volume": "17",
"issue": "1",
"page": "9137",
"DOI": "10.1038/
"PMID": "42649166",
"PMCID": "PMC13519010",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
28
]
]
}
}
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.115897 [code]
- Experience and behavior modulate piriform cortex odor representation in freely moving mice.Journal: iScienceIn common: Signal Processing Toolbox, systems, mouse, 5 references
- [2] doi:10.1371/journal.pcbi.1014297 [code]
- Statistics of cortical representational drift can enable robust readout.Journal: PLoS computational biologyIn common: systems, 6 references
- [3] doi:10.1038/s44323-026-00105-0
- Tilia Tomentosa promotes sleep, preserving sleep structure.Journal: Npj biological timing and sleepIn common: mouse, 3 references
- [4] doi:10.1016/j.isci.2026.116477
- Slow intrinsic oscillations in the ventrolateral preoptic nucleus.Journal: iScienceIn common: 3 references
- [5] doi:10.1523/eneuro.0344-25.2026 [code]
- Long-Term Variability in Visual Processing versus Perceptual Stability.Journal: eNeuroIn common: 3 references
- [6] doi:10.1016/j.ohx.2026.e00797 [code]
- Development of an automated REM sleep deprivation device for mice in neuroscience research.Journal: HardwareXIn common: mouse, 2 references
- [7] doi:10.1016/j.nbscr.2026.100149 [code]
- Molecular correlates of sleep deprivation in the mouse brain identified by meta-analysis of microarray data.Journal: Neurobiology of sleep and circadian rhythmsIn common: mouse, 2 references
- [8] doi:10.7554/elife.106992
- Cortical layer 6b mediates state-dependent changes in brain activity and effects of orexin on waking and sleep.Journal: eLifeIn common: mouse, 2 references
- [9] doi:10.1016/j.celrep.2026.117646 [code]
- Medial entorhinal-hippocampal desynchronization parallels the emergence of memory impairment in a mouse model of Alzheimer's disease pathology.Journal: Cell reportsIn common: Signal Processing Toolbox, systems, mouse, 1 reference
- [10] doi:10.1038/s41593-026-02231-1 [code]
- The prefrontal cortex controls memory organization in the hippocampus.Journal: Nature neuroscienceIn common: Signal Processing Toolbox, systems, mouse, 1 reference
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.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 3 repositories of the authors' code, each at its verified commit and with its license, 6 scripts, and 2 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:194d7d00d5d324fc…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
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.
