009-sleep

Sleep monitoring dataset

Sleep monitoring includes sleep staging, body positioning, respiratory events, heart rate, oxygen saturation and snoring, measured concurrently over three nights.

Obstructive sleep apnea (OSA) is a sleep disorder in which a person’s breathing is interrupted during sleep due to obstruction of the upper airway as a result of relaxation of the throat muscles. This obstruction can lead to pauses in breathing for short periods of time, which can cause loud snoring, reduction in the blood oxygen levels, stress response, awakening and fragmented sleep.

A home sleep apnea test (HSAT) is a non-invasive test used to diagnose sleep apnea. During an HSAT, a patient wears a portable device overnight to monitor their breathing, heart rate, oxygen levels, snoring, and other sleep patterns. The device records this data and it is then analyzed by clinically-validated algorithms that compute apnea-related indices. The data can also be used to study sleep architecture and other aspects of sleep, such as heart rate variability (HRV) and arrhythmia.

The device used for sleep monitoring in the Human Phenotype Project is the FDA-approved WatchPAT-300 by Itamar Medical. This device contains 5 sensors: An actigraph worn on the wrist; a pulse oximeter and a Peripheral Arterial Tone (PAT) probe worn on the finger; and a microphone and accelerometer worn on the chest for respiratory effort, snoring and body position measurement.

The device’s algorithms provide 3 main indices for diagnosis of OSA: Apnea/Hypopnea Index (AHI), Respiratory Disturbance Index (RDI), Oxygen Desaturation Index (ODI). The device’s algoithms also provide indices for diagnosis of Atrial Fibrillation (not FDA-approved yet): Premature beats per minute, Atrial fibrillation longest event.

The WatchPAT device is given to participants during the visit to the clinical testing center who then record 3 nights of sleep at home during the following two weeks (Figure 4). The recorded tested nights should reflect the usual sleeping regimen / typical bedtime (for example, not after exceeding alcohol consumption).

Data availability:

The information is stored in 2 main statistics parquet files: sleep.parquet, hrv.parquet; In multiple events parquets and in multiple time series parquets / EDF files containing sensor channels for each night of logging.

from pheno_utils import PhenoLoader
pl = PhenoLoader('sleep')
pl
PhenoLoader for sleep with
473 fields
3 tables: ['sleep', 'hrv', 'age_sex']

Data dictionary

pl.dict
field_string description_string folder_id feature_set field_type strata data_coding array pandas_dtype units ... stability sexed debut completed transformation list_of_tags min_plausible_value max_plausible_value dependency parent_dataframe
tabular_field_name
collection_timestamp Collection timestamp Collection timestamp 9 sleep,sleep_raw Datetime Primary NaN Multiple datetime64[ns, Asia/Jerusalem] Time ... Accruing Both sexes 2020-01-15 NaN NaN Sleep Monitoring NaN NaN NaN NaN
collection_date Collection date Collection date 9 sleep,sleep_raw Date Primary NaN Multiple datetime64[ns] Date ... Accruing Both sexes 2020-01-15 NaN NaN Sleep Monitoring NaN NaN NaN NaN
night Night Night 9 sleep,sleep_raw Integer Primary NaN Multiple int NaN ... Accruing Both sexes 2020-01-15 NaN NaN Sleep Monitoring NaN NaN NaN NaN
warnings Warnings Analysis warnings 9 sleep,sleep_raw Categorical (multiple) Primary 009_04 Multiple object Text ... Accruing Both sexes 2020-01-15 NaN NaN Sleep Monitoring NaN NaN NaN NaN
timezone Timezone Timezone 9 sleep,sleep_raw Categorical (single) Auxiliary 001_03 Multiple category Text ... Accruing Both sexes 2020-01-15 NaN NaN Sleep Monitoring NaN NaN NaN NaN
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
REM REM REM 9 events_time_series rows: event NaN NaN NaN string Text ... Accruing NaN NaN NaN NaN Sleep Monitoring NaN NaN NaN events_time_series
REM Period REM Period REM Period 9 events_time_series rows: event NaN NaN NaN string Text ... Accruing NaN NaN NaN NaN Sleep Monitoring NaN NaN NaN events_time_series
Resp. Event Resp. Event Resp. Event 9 events_time_series rows: event NaN NaN NaN string Text ... Accruing NaN NaN NaN NaN Sleep Monitoring NaN NaN NaN events_time_series
Sleep Sleep Sleep 9 events_time_series rows: event NaN NaN NaN string Text ... Accruing NaN NaN NaN NaN Sleep Monitoring NaN NaN NaN events_time_series
Wake Wak Wak 9 events_time_series rows: event NaN NaN NaN string Text ... Accruing NaN NaN NaN NaN Sleep Monitoring NaN NaN NaN events_time_series

506 rows × 24 columns

Plot histogram and ecdf for ahi at baseline visit

from pheno_utils.basic_plots import hist_ecdf_plots

col = "ahi"
df = pl[[col] + ["age", "sex", "collection_date"]].loc[:,:,"00_00_visit",0,:]

# plot histogram and ecdf
hist_ecdf_plots(df.dropna(subset=[col,"sex", "age"]), col, gender_col="sex")

# stats
display(df[col].describe().to_frame().T)

count mean std min 25% 50% 75% max
ahi 5562.0 10.593943 10.356211 0.0 3.2825 7.35 14.4625 89.74