A spectral DCM pipeline for resting-state fMRI effective-connectivity analysis and dementia conversion prediction using OASIS-3 data. This work builds on the UKB_DCM_dementia codebase:
https://github.com/Wolfson-PNU-QMUL/UKB_DCM_dementia/
If you use or extend this repository, please cite:
Ereira, S., Waters, S., Razi, A. et al.
Early detection of dementia with default-mode network effective connectivity.
Nature Mental Health 2, 787-800 (2024).
https://doi.org/10.1038/s44220-024-00259-5
All scripts are in Code/:
trinet_pipeline.m- main entry point; run one stage at a timetrinet_structural_MRI_preprocess.m- T1 preprocessing (SPM12 segmentation + normalization)trinet_functional_MRI_preprocess.m- rs-fMRI preprocessing (realignment, slice-timing, coregistration, normalization, smoothing)trinet_extract_timeseries.m- ROI time-series extractiontrinet_firstlevelDCM_QC.m- first-level spectral DCM fitting + QCtrinet_EC_classifier.m- second-level PEB/BMA + elastic-net classifiertrinet_dem_EC_prognosticator.m- second-level PEB/BMA + elastic-net prognosticator- Helper scripts:
trinet_ROI_specify.m,trinet_BuildRegressors.m,trinet_general_classifier.m,trinet_general_prognosticator.m
- MATLAB R2021b or later
- SPM12 (tested on v7771)
- glmnet for MATLAB
This repo does not include data. The scripts expect:
- rs-fMRI and T1 images arranged with
fMRI/andT1/inside each subject folder - CSV files containing metadata (e.g. EID, TR, TE, DEM_STATUS, MCI_STATUS, age_at_scan, EDUC, etc.)
Open Code/trinet_config.m and edit the paths:
- SPM + glmnet locations
- fMRI/T1 directory
- Metadata CSV paths
- Output directory
Launch the pipeline in MATLAB:
trinet_pipelineWhen prompted, choose which stage (1-6) to run.