- MATLAB 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| code | ||
| data | ||
| preregistration | ||
| rois | ||
| LICENSE | ||
| README.md | ||
dOccLS — Molecular and haemodynamic effects of LSD in the human brain
Code and data accompanying the dOccLS manuscript. This repository contains everything needed to reproduce the receptor occupancy and fMRI Global Correlation (GCOR) analyses.
Repository structure
code/
├── run_gcor_pipeline.m Main MATLAB wrapper for regional GCOR analysis
├── process_cpac_outputs3.m Parse C-PAC output tree into a results table
├── process_gcor_regional.m Regional GCOR (232-region Schaefer+Tian atlas)
├── doccls_stats_gcor.Rmd R notebook: occupancy curves + GCOR statistics
├── doccls_qc_metrics.m fMRI QC report (FD, DVARS, QC-FC)
├── preprocessing/ C-PAC preprocessing configuration (YAML)
└── README.md Detailed usage instructions
data/
└── occupancy_data.csv Anonymised PET occupancy and plasma LSD data
rois/
└── Atlas files Schaefer 200, Schaefer+Tian 232, Yeo-7/17 (3 mm MNI)
Analyses covered
Receptor occupancy (doccls_stats_gcor.Rmd, data/occupancy_data.csv)
- Plasma LSD concentration vs neocortex 5-HT2A occupancy: Michaelis-Menten NLS fit with 10,000-iteration sign-flipping bootstrap for Occ_max and IC50 confidence intervals
- LSD dose vs occupancy: same approach, reports ED50
- Subjective drug intensity vs occupancy: linear mixed model
fMRI Global Correlation (run_gcor_pipeline.m, doccls_stats_gcor.Rmd)
- C-PAC preprocessing with
preprocessing/pipeline_config.yml - Regional GCOR computed across 232 brain regions (Schaefer 200 + Tian subcortex)
- LSD vs baseline delta, correlation with plasma levels and receptor occupancy
- QC report: mean FD, DVARS, QC-FC distance-dependence
Quick start
Occupancy statistics only — no fMRI data required:
- Clone this repository
- Open
code/doccls_stats_gcor.Rmdin RStudio - Knit — Section 1 runs self-contained from
data/occupancy_data.csv
GCOR pipeline with synthetic data — no C-PAC outputs required:
- Open
code/run_gcor_pipeline.min MATLAB - Set
USE_DUMMY_DATA = true - Run — generates synthetic 232-region timeseries and exercises the full pipeline
Full GCOR pipeline:
- Run C-PAC with
code/preprocessing/pipeline_config.yml - Edit paths in
run_gcor_pipeline.mand run - Set
gcor_csvindoccls_stats_gcor.Rmdand knit
See code/README.md for full documentation including dependencies and exclusion criteria.
Preregistration
Study hypotheses and statistical methods were registered prior to data analysis.
See the preregistration/ folder.
External software used
Brain entropy measures LZ complexity and geodesic entropy used the CopBET toolbox: https://github.com/anders-s-olsen/CopBET
Cerebral blood flow (pcASL) CBF was quantified using BASIL (part of FSL). The pipeline included label/control subtraction, calibration to absolute CBF (ml/100 g/min) using M0 scans and a single-compartment kinetic model, normalisation to MNI152 space, and 8 mm FWHM spatial smoothing. Regional CBF was extracted using the AAL3 atlas with grey-matter weighted averaging. Software: https://fsl.fmrib.ox.ac.uk/fsl/docs/physiological/basil.html
Internal carotid artery diameter (TOF MRI) ICA diameter was quantified from time-of-flight images using publicly available in-house software that applies background subtraction, anisotropic diffusion filtering, and top-hat filtering, followed by semi-automated 2D region-growing segmentation and 3D diameter estimation. Software: https://github.com/kristian1801/ica-segmentation-tool
Internal carotid artery flow (phase-contrast MRI) ICA flow was quantified from phase-contrast images using PCMCalculator, which measures through-plane flow rate after manual vessel selection. The method has been validated on both 3T Philips and 3T Siemens systems. Software: https://github.com/MarkVestergaard/PCMCalculator