Related Experiment Video
Updated: Feb 14, 2026

Sample Preparation and Transfer Protocol for In-Vacuum Long-Wavelength Crystallography on Beamline I23 at Diamond Light Source
Published on: April 23, 2021
dlmoR: An Open-Source R Package for the Dim-Light Melatonin Onset (DLMO) Hockey-Stick Method
Salma M Thalji1,2, Manuel Spitschan1,2,3
1Translational Sensory and Circadian Neuroscience, Max Planck Institute for Biological Cybernetics, Tübingen, Germany.
This study introduces dlmoR, an R package for calculating dim-light melatonin onset (DLMO), a key circadian rhythm marker. The new tool accurately replicates existing methods and enhances analysis with new features, revealing limitations in current DLMO estimation techniques.
Area of Science:
- Chronobiology and Sleep Research
- Computational Biology and Bioinformatics
- Biostatistics and Data Analysis
Background:
- The dim-light melatonin onset (DLMO) is a critical biomarker for human circadian timing.
- Existing methods for DLMO calculation, such as the hockey-stick method, have limitations.
- There is a need for robust, open-source tools for accurate DLMO estimation.
Purpose of the Study:
- To introduce dlmoR, an open-source R implementation of the hockey-stick method for DLMO calculation.
- To validate dlmoR against existing methods and assess its performance on diverse datasets.
- To explore the sensitivity of the hockey-stick algorithm to various data and parameter variations.
Main Methods:
- Developed dlmoR as a clean-room implementation of the hockey-stick algorithm in R.
- Validated dlmoR against a reference binary executable using 112 melatonin time series datasets.
- Performed sensitivity analyses by systematically altering sampling schedules, thresholds, data completeness, and noise.
Main Results:
- dlmoR demonstrated high agreement with the reference implementation (circular correlations > 0.96).
- Paired t-tests showed no significant systematic differences or bias between dlmoR and the reference method.
- Sensitivity analyses revealed that moderate data perturbations yielded stable DLMO estimates, while significant alterations led to substantial delays or failed estimations.
Conclusions:
- dlmoR provides a reliable, reproducible, and enhanced tool for DLMO estimation.
- The hockey-stick algorithm exhibits fundamental limitations in handling data variations and identifying the melatonin rise.
- The findings highlight the necessity for developing novel, uncertainty-aware approaches for DLMO estimation.
Related Concept Videos
DNA Packaging
Atomic Absorption Spectroscopy: Radiation and Light Sources
Two common narrow-range 'line' sources used in AAS are hollow-cathode lamps (HCLs) and...
Chromatin Packaging
Chromatin Packaging
The chromatin
In combination with specialized DNA binding protein called Histones, the DNA double helix forms a compact DNA: protein complex called chromatin. The chromatin itself is further compacted into higher-order...
Chromatin Packaging
Methods of Documentation I: Source-Oriented Records
In an SOR, each discipline involved in patient care maintains a separate medical record section. This record-keeping method enables easy tracking of patient progress and ensures healthcare staff have access to up-to-date information.
Key Attributes include the following:

