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.
Abstract:
The dim-light melatonin onset (DLMO) is a commonly used circadian marker indicating the start time of evening melatonin synthesis in humans. Several quantitative techniques have been developed to determine DLMO from melatonin time series, including fixed- or variable-threshold techniques and the hockey-stick method developed by Danilenko et al (2014). Here, we introduce dlmoR, an open-source (MIT License) implementation of the hockey-stick method written in R. Our clean-room implementation follows the original algorithm description, supported by iterative validation against the existing binary executable. We benchmarked dlmoR on 112 melatonin time series data sets from two independent studies and found high agreement with the reference implementation: mean discrepancies were min for the Heinrichs and Spitschan (2025) data set and min for the Blume et al. (2024) data set, with circular correlation coefficients of 0.964 and 0.986, respectively. Paired t-tests () indicated no systematic difference or bias between methods. Beyond reproducing the hockey-stick algorithm, dlmoR adds capabilities absent from the original executable, including interactive visual diagnostics and bootstrapped confidence intervals, offering qualitative and quantitative views of estimation uncertainty. It supports programmatic, reproducible analysis of melatonin profiles, including batch processing and parameter manipulation. Leveraging this flexibility, we evaluated the sensitivity of the hockey-stick algorithm to controlled changes in sampling schedules, threshold levels, data completeness, and noise. Moderate changes, such as small timing jitter, limited data loss, or modest threshold shifts, kept estimates stable within ±10 min, whereas pronounced alterations to sampling schedules, large multi-point deletions, or substantial threshold changes delayed estimates by over 40 min or prevented estimation. This analysis reveals fundamental limitations in the algorithm's internal mechanics, particularly in how it identifies the onset window and models the melatonin rise, and underscores the need for new uncertainty-aware approaches to 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:

