Giter Site home page Giter Site logo

raphaelvallat / vallat2023_coupling_glucose Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 25 KB

Python code to reproduce the results and figures of Vallat et al. 2023, "Coordinated human sleeping brainwaves map peripheral body glucose homeostasis." Cell Reports Medicine.

Jupyter Notebook 91.92% R 7.13% Python 0.96%

vallat2023_coupling_glucose's Introduction

Vallat, Shah and Walker (2023).

This repository contains Python code to reproduce the results and figures of:

  • Vallat, Shah and Walker(2023). Coordinated human sleeping brainwaves map peripheral body glucose homeostasis. Cell Reports Medicine.

Data and Code Availability: The CFS dataset can be obtained, with the appropriate permissions, and for non-commercial use, at https://sleepdata.org/datasets/cfs. The MESA dataset can be obtained, with the appropriate permissions, through the BioLINCC repository at: https://biolincc.nhlbi.nih.gov/studies/mesa/. In addition to the public access repository, interested investigators may also access the data through the MESA Coordinating Center at the University of Washington. Use of the data via this mechanism is overseen by standard MESA policies and procedures, which assure that participant consent is honored. Additional information can be found at: https://www.mesa-nhlbi.org/.

Lead Contact: Further information and requests for resources should be directed to the lead contact, Dr. Raphael Vallat ([email protected])


Code structure

01_coupling_*

Calculate the SO-spindles (sigma) coupling from the PSG recording.

01_extract_HRV.ipynb

Calculate overnight HRV metrics from the PSG recording.

01_extract_sleepstats.ipynb

Calculates the sleep statistics from the hypnogram.

01_extract_spectral_power.ipynb

Calculates the EEG spectral power from the PSG recording.

02_data_correlation_*

These notebooks combine the different data streams into a single dataframe. Specifically, the following steps are applied:

  1. Concatenate the demographics & health, coupling, spectral power and HRV data
  2. Remove participants <15 yrs old (not applicable in MESA)
  3. Preprocessing: outlier removal and data transformation
  4. Calculate the HOMA variables
  5. Calculate and plot the correlation between coupling and glucose, adjusted for age (partial correlation)
  6. Export df_concat_R_1sec_[CFS/MESA].csv, the main spreadsheet that will be used for subsequent analyses

03_regression_*

Main statistical analysis pipeline, written in R.

Table_Demographics.ipynb

Generate tables for CFS and MESA datasets with descriptive statistics.


Figures

The Python/R code to generate the figures of the paper can be found in:

  • Figure 1A: Fig_ERGCPAC.ipynb
  • Figure 1B: 02_data_correlation_CFS.ipynb
  • Figure 1C-D: Fig_SO-coupling.ipynb
  • Figure 2: 02_data_correlation_CFS.ipynb
  • Figure 3: 03_regression_MESA.R
  • Figure 4: 02_data_correlation_CFS.ipynb
  • Figure 5: Fig_TopSleepAdjusted.ipynb

vallat2023_coupling_glucose's People

Contributors

raphaelvallat avatar

Stargazers

 avatar Michael Valiadis avatar Gustavo Juantorena avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.