DOI: 10.5281/zenodo.14278700
title: Causal Cortical and Thalamic Connections in the Human Brain

description: Causal Cortical and Thalamic Connections in the Human Brain

Publication title: 

Mapping human thalamocortical connectivity with electrical stimulation and recording

https://www.nature.com/articles/s41593-025-02009-x

This repository contains research data to support a scientific publication. Here you can find the example codes and preprocessed data to replicate the reported findings. 

Abstract:

The brain's functional architecture is shaped by causal connections between its cortical and subcortical structures. Here, utilizing single-pulse electrical stimulation in 27 participants implanted with 4864 intracranial electrodes, we mapped the causal connections throughout the human brain, encompassing both cortical and subcortical regions including multiple thalamic nuclei. In particular, we dissociated three unique spectral patterns generated by the perturbation of a given brain area. Among these, a novel waveform emerged, marked by distinct temporal and spatial patterns uniquely associated with the thalamus. Stimulations of the thalamus caused delayed-onset theta oscillations in both ipsilateral and contralateral cortices. Moreover, features of causal connectivity in the human brain, as identified here, revealed highly organized patterns which are different from each other, suggesting that each feature is related to a distinct signal transmission pathway. Our causal connectivity data can be used to inform biologically informed computational models of the functional architecture of the brain.

# Project Overview

## Data TypeIntracranial electrophysiological recordings during repeated trials of single-pulse electrical stimulation.

## Sample SizeTwenty-seven participants (40.7% female) diagnosed with focal epilepsy were included. A total of 4,864 SEEG electrode contacts were analyzed. Each participant had an average of 180 ± 46 (mean ± SD) contacts implanted, including 6.8 ± 4.2 bipolar channels in the thalamus. At least two thalamic subdivisions were sampled per person (2.3 ± 1.8 bipolar channels per subdivision).

Single-pulse electrical stimulation was repeated 44 ± 2 times per pair to assess connectivity.

- Initial number of stimulated-recorded pairs: 275,336  - Connected pairs: 76,899  - Of these, 7,566 had stimulation channels in the thalamus    - 291.0 ± 250.0 per subject    - 109.0 ± 78.7 in anterior thalamus (antTH)    - 72.5 ± 118.7 in midline thalamus (midTH)    - 109.5 ± 108.5 in posterior thalamus (pstTH)

The brain was divided into 26 regions of interest. Each participant had electrodes covering an average of 14.3 ± 3.8 regions. For regions outside the thalamus, there were 206.2 ± 233.1 stimulation pairs per region per subject, when covered.

## Software and Toolboxes Used- MATLAB ≥ R2021a  - Python 3.9  - R 4.2  - umap-learn 0.5.3  - mne 1.5.0  - r-nlme 3.1-162  - jupyter-matlab-proxy 0.7.1  

---

## Folder Organization

### 1. COHORTContains sample size and participant information.

### 2. DATAIncludes repeated single-pulse evoked responses (RSEPs) in time and time-frequency domains.

#### 2.1. metaTable.csv- Contains all examined connection pairs.- If a `filteridx` field is present, it aligns with the row order in the meta-table.- Default order matches the meta-table.

#### 2.2. CCEP- time_domain: Trial-averaged stimulation-evoked potentials    - Sampling rate: 1000 Hz    - Epoch: -200 to +1000 ms around stimulation- timeFreq_domain: Trial-averaged spectrograms (power and inter-trial phase coherence)    - Sampling rate: 200 Hz

#### 2.3. UMAP- Input: Downsampled and vectorized power and ITPC spectrograms for group-level machine learning- Electrode metadata in: `./results/umap/brainInfo.csv`- Anatomical information in: `metaTable.csv`

#### 2.4. workbench- Subject-specific files:    - Brain surfaces in FS_LR 32k format (*.pial.32k.surf.gii)    - Electrode coordinates (*.fscords.txt)    - Electrode indices and metadata (elec_FSLR_vIndex_wbComm_*.csv)

### 3. scriptsCustom code used to perform analyses and generate results.

### 4. results

#### 4.1. umap- Semi-supervised learning results for individual-level activation detection.- Group-level UMAP outcomes are included.- File rows correspond to brainInfo.csv entries.- vectCCEP_feature.mat contains spectrograms classified into four clusters.- idx_in_metaT links to metaTable.csv (1-based indexing in MATLAB).

#### 4.2. feature- Time-varying similarity curves for three features:    - F1 (clst0)    - F2 (clst1)    - F3 (clst2)

#### 4.3. stats- clstPermutation: Cluster-based permutation results for comparing spectrograms- ROIanalysis: Compares feature representations across thalamic nuclei and pathways

### 5. figure_source_dataAll data used to generate the figures in the publication. Refer to Figures 1–7.

---

## metaTable Variable Descriptions

1. subject, stim_chan, record_chan: Subject ID, stimulation channel, and recording channel labels  2. JP_label_in1/2, JP_label_out1/2: Manually labeled anatomical regions     - "in" = recording channel, "out" = stimulation channel     - Suffix 1/2 = contact in the bipolar pair (e.g., A1-A2)  3. Yeo7_in/out: Yeo-7 functional network labels from JoN 2011  4. MNIout_coord_1/2/3: MNI (x, y, z) coordinates for stimulation channels (midpoint of bipolar pair)  5. MNIin_coord_1/2/3: MNI coordinates for recording channels  6. FSout_coord_1/2/3: FS_LR coordinates for stimulation channels (projected to right hemisphere)  7. FSin_coord_1/2/3: FS_LR coordinates for recording channels  8. umapAct: Activation status from UMAP     - 0 = non-activated, 1 = activated, NA = noisy  9. peak_maxCor_clst1/2/3: Peak correlation (R) values over time for features F1–F3  10. time_maxCor_clst1/2/3: Time delay to peak correlation after stimulation