Skip to content

Spectral DCM pipeline for rs-fMRI effective connectivity and dementia conversion analysis.

Notifications You must be signed in to change notification settings

zxKyouma/trinet-dcm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

TriNet-DCM

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/

Citation

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

What's included

All scripts are in Code/:

  • trinet_pipeline.m - main entry point; run one stage at a time
  • trinet_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 extraction
  • trinet_firstlevelDCM_QC.m - first-level spectral DCM fitting + QC
  • trinet_EC_classifier.m - second-level PEB/BMA + elastic-net classifier
  • trinet_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

Requirements

  • MATLAB R2021b or later
  • SPM12 (tested on v7771)
  • glmnet for MATLAB

Data requirements

This repo does not include data. The scripts expect:

  • rs-fMRI and T1 images arranged with fMRI/ and T1/ inside each subject folder
  • CSV files containing metadata (e.g. EID, TR, TE, DEM_STATUS, MCI_STATUS, age_at_scan, EDUC, etc.)

Quick start

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_pipeline

When prompted, choose which stage (1-6) to run.