DPSleep: Open-Source Longitudinal Sleep Analysis From Accelerometer Data (Preprint)
UNSTRUCTURED Wearable devices are now widely available to collect continuous objective behavioral data from individuals and to measure sleep. Here we introduce an open-source pipeline for the deep phenotyping of sleep, "DPSleep", that uses algorithms to detect missing data, calculate activity levels, and finally estimate the major Sleep Episode onset and offset. The pipeline allows for manual quality control adjustment and correction for time zone changes. We illustrate the utility of the pipeline with data from participants studied for more than 200 days. Actigraphy-based measures of sleep duration are associated with self-report rating of sleep quality. Simultaneous measures of smartphone use and GPS data support the sleep timing inferences and reveal how phone measures of sleep can differ from actigraphy data. We discuss the uses of DPSleep in relation to other available sleep estimation approaches and provide example use cases that include multi-dimensional, deep dynamic longitudinal phenotyping associated with mental illness.