Freesurfer Group Analysis(FSGD)

From CCN Wiki
Revision as of 17:25, 30 May 2018 by Greg (talk | contribs) (→‎Data)
Jump to navigation Jump to search

Freesurfer Group Differences Analysis

Kinda cool method that can be used to compare groups and/or regress out nuisance variables from BOLD data within Freesurfer.

Some sources:

https://surfer.nmr.mgh.harvard.edu/fswiki/FsgdExamples
https://surfer.nmr.mgh.harvard.edu/fswiki/FsgdFormat
https://surfer.nmr.mgh.harvard.edu/fswiki/Fsgdf2G0V


Data

If caomparing T1 and T2 data, grab the files used for original GLMs (e.g. ces.nii.gz). Rename and cat them for each hemi:

mri_concat T1_ces.nii.gz T2_ces.nii.gz --o T1T2_ces.nii.gz

FSGD

For T1 vs. T2 Data, first line needs to stay the same. (g2v0.fsgd) -- 2 groups no covariates

GroupDescriptorFile 1
Title OSGM_T1T2
Class GroupT1
Class GroupT2
Input FS_T1_501 GroupT1
Input FS_T1_505 GroupT1
Input FS_T1_506 GroupT1
Input FS_T1_508 GroupT1
Input FS_T1_513 GroupT1
Input FS_T1_515 GroupT1
Input FS_T1_529 GroupT1
Input FS_T1_531 GroupT1
Input FS_T1_534 GroupT1
Input FS_T1_542 GroupT1
Input FS_T1_546 GroupT1
Input FS_T1_557 GroupT1
Input FS_T1_564 GroupT1
Input FS_T1_575 GroupT1
Input FS_T1_576 GroupT1
Input FS_T1_579 GroupT1
Input FS_T1_580 GroupT1
Input FS_T1_587 GroupT1
Input FS_T1_589 GroupT1
Input FS_T2_501 GroupT2
Input FS_T2_505 GroupT2
Input FS_T2_506 GroupT2
Input FS_T2_508 GroupT2
Input FS_T2_513 GroupT2
Input FS_T2_515 GroupT2
Input FS_T2_529 GroupT2
Input FS_T2_531 GroupT2
Input FS_T2_534 GroupT2
Input FS_T2_542 GroupT2
Input FS_T2_546 GroupT2
Input FS_T2_557 GroupT2
Input FS_T2_564 GroupT2
Input FS_T2_575 GroupT2
Input FS_T2_576 GroupT2
Input FS_T2_579 GroupT2
Input FS_T2_580 GroupT2
Input FS_T2_587 GroupT2
Input FS_T2_589 GroupT2


'DODS' contrast files

groupdiff.mtx

1 -1

T1.mtx

1 0

T2.mtx

01

T1T2intercept.mtx

0.5 0.5

glm

Command:

mri_glmfit --surface fsaverage rh --glmdir g2v0 --y T1T2_ces.nii.gz --fsgd g2v0.fsgd --C GroupDiff.mtx --C GroupT1.mtx --C GroupT2.mtx --C GroupT1T2.intercept.mtx 

Correct for multi comparisons

Next:

mri_glmfit-sim --glmdir g2v0 --cache 3 abs --cwpvalthresh .05


Now you've got clusters and .annot files to load up and get sizes/means etc.

Overlay

tksurfer fsaverage lh pial

load overlay -> cache.th30.abs.sig.cluster.mgh

cache.th30.abs.sig.cluster.summary contains cluster info.

Alternatively, you can segment the cache.th30.abs.sig.cluster.annot file into desired clusters.