Analysis of EEG LEMON and MEG CamCAN
In Chapter 2 of my master's thesis: Inferring brain network dynamics of MEG and EEG in healthy aging and Alzheimer's disease
💡 Please email SungJun Cho at [email protected] with any questions or concerns.
This repository contains all the scripts necessary to reproduce the analysis and figures shown in Chapter 2 of my thesis. It is divided into four main directories:
scripts_data
: Contains the scripts for inspecting subject demographics and data characteristics.scripts_static
: Contains the scripts for analyzing static power and functional connectivity of resting-state electrophysiological data.scripts_dynamic
: Contains the scripts for analyzing power and functional connectivity of dynamic resting-state networks.scripts_reproducibility
: Contains the scripts for examining reproducibility across different dynamic model runs.
To start, you first need to install the osl-dynamics
package and set up its environment. Its installation guide can be found here.
The seaborn
and openpyxl
packages need to be additionally installed for visualization and compatibility with excel files. Next, download this repository to your designated folder location as below. Once these steps are complete, you're ready to go!
conda activate osld
pip install seaborn
pip install openpyxl
git clone https://github.com/scho97/CompareModality.git
cd CompareModality
Each directory named scripts_*
contains a utils
folder, where the functions required to execute the scripts are kept. Within this directory, scripts are numerically prefixed, indicating the sequence in which they should run. A few exceptions are:
- Excel files that store (1) state/mode orders of inferred RSNs and (2) subject outlier indices for DyNeMo trained on the EEG data. (Located in
scripts_reproducibility
) - Scripts for training HMM and DyNeMo models on the data. These scripts are not prefixed, as they are (technically speaking) not crafted for the post hoc analysis. (Located in
scripts_dynamic
)
For more details, please refer to the thesis. All code within this repository was executed on the Oxford Biomedical Research Computing (BMRC) servers. While individual threads were allocated varying CPUs and GPUs, general information about the BRMC resources can be found at Using the BMRC Cluster with Slurm and GPU Resources.
The analyses and visualizations in this paper had following dependencies:
python==3.10.6
osl-dynamics==1.2.6
seaborn==0.12.2
openpyxl==3.1.2
Copyright (c) 2023 SungJun Cho and OHBA Analysis Group. CompareModality
is a free and open-source software licensed under the MIT License.