Skip to content

BIAPT/eeg-complexity-propofol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EEG Complexity - Paradoxical Excitation and Propofol Susceptibility

This repository contains the analysis code used for the publication investigating how propofol induces divergent transitions in brain-state dynamics, ranging from direct neural suppression to transient paradoxical excitation. The project uses resting-state EEG and complexity-based metrics to characterize how neural activity changes across sedation depth and how baseline brain dynamics relate to individual susceptibility to propofol.

The workflow centers on distinguishing Type I and Type II complexity measures and mapping their joint dynamics on the Complexity–Entropy Causal Plane (CECP). In particular, the codebase extracts Lempel–Ziv Complexity (LZC) as a Type I complexity measure and Statistical Complexity (SC) as a Type II complexity measure, allowing the analysis of divergent neural trajectories during propofol-induced state transitions.

Authorship note: This repository was written and maintained by Derek Newman and accompanies a manuscript by Derek Newman, Charlotte Maschke, George A. Mashour, and Stefanie Blain-Moraes. Derek Newman and Charlotte Maschke contributed as co-first authors.


The repository supports analyses from two independent cohorts of healthy adults exposed to propofol:

The Chennu dataset includes baseline, mild sedation, moderate sedation, and recovery recordings, while the RecCognition dataset captures escalating propofol infusion from baseline to deep sedation. Across both cohorts, the repository is used to quantify complexity changes, compare responsive and unresponsive trajectories, examine baseline predictors of sedation response, and generate the figures and summaries used in the manuscript.

Project Scope

This repo is used to:

  • preprocess raw EEG recordings into cleaned epoch datasets
  • estimate delay and embedding parameters for complexity analysis
  • extract Type I and Type II complexity features from resting-state EEG
  • compare neural responses across sedation levels and behavioral responsiveness groups
  • assess whether baseline complexity predicts susceptibility to propofol
  • map subject- and group-level trajectories onto the Complexity–Entropy Causal Plane
  • generate figures, summaries, and visualizations for manuscript work

Repository Layout

  • PREPROCESSING/: notebooks for filtering, segmenting, and fixing EEG epoch files
  • DATA/: raw and processed dataset assets, including .fif epoch files (not included here)
  • scripts/: Python modules for parameter selection, complexity extraction, CLI entrypoints, and group topomap plotting
  • ANALYSIS/: figure-generation and exploratory notebooks
  • source/: supporting lookup tables and serialized intermediate files used by the notebooks
  • feature_results/: saved outputs and log files from feature runs (not included here)
TYPE2
├── ANALYSIS
│   ├── Manuscript_figures
│   │   ├── supp. mat.
│   │   ├── Figure_1.tif
│   │   ├── Figure_2.tif
│   │   ├── Figure_3.tif
│   │   └── Figure_4.tif
│   ├── supplementary
│   │   ├── LZC-check
│   │   ├── fig4_subgroups.ipynb
│   │   ├── Parameter_Mean_Inspection.ipynb
│   │   ├── Time_resolved.ipynb
│   │   └── Topomap_Inspection.ipynb
│   ├── F1_GroupComparison_Types_Complexity.ipynb
│   ├── F2_Neural_Bx_Group_Correlation.ipynb
│   ├── F3_Simulations_CECP.ipynb
│   ├── F4_CECP_both_datasets.ipynb
│   ├── Get_parameters.ipynb
│   └── Inspect_data.ipynb
├── PREPROCESSING
│   ├── channel_fix_MDFA.ipynb
│   ├── preprocess_MDFA.ipynb
│   └── segment_MDFA.ipynb
├── scripts
│   ├── group_average_topomaps.py
│   ├── parameter_selection.py
│   ├── type2_features.py
│   └── type_complexity.py
├── source
├── .gitignore
├── README.md
└── requirements.txt

Python Environment

Create and activate a virtual environment, then install dependencies:

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Main Workflow

  1. Run the notebooks in PREPROCESSING/ to clean and segment EEG recordings into epochs.
  2. Use the scripts in scripts/ or the analysis notebooks to extract complexity features from epoch files.
  3. Open the notebooks in ANALYSIS/ to reproduce comparisons, figures, and exploratory analyses.

Script Entry Points

The main command-line entrypoint is [scripts/type_complexity.py]. It wraps the feature extraction pipeline in [scripts/type2_features.py].

Example:

cd scripts
python type_complexity.py ../DATA/MDFA/epochs/fixed/MDFA05-base_eeg_epochs.fif --out_dir ../feature_results

There is also a plotting helper in [scripts/group_average_topomaps.py] for group-averaged EEG topomaps across datasets.

About

The project uses resting-state EEG and complexity-based metrics to characterize how neural activity changes across sedation depth and how baseline brain dynamics relate to individual susceptibility to propofol.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors