Download
surface based exploratory group analysis in freesurfer n.
Skip this Video
Loading SlideShow in 5 Seconds..
Surface-based Exploratory Group Analysis in FreeSurfer PowerPoint Presentation
Download Presentation
Surface-based Exploratory Group Analysis in FreeSurfer

Surface-based Exploratory Group Analysis in FreeSurfer

200 Views Download Presentation
Download Presentation

Surface-based Exploratory Group Analysis in FreeSurfer

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Surface-based Exploratory Group Analysis in FreeSurfer

  2. Outline • Processing Stages • Command-line Stream • Assemble Data • Design/Contrast (GLM Theory) • Analyze • Visualize • Interactive/Automated GUI (QDEC) • Correction for multiple comparisons

  3. Aging Exploratory Analysis In which areas does thickness change with age? Cortical Thickness vs Aging Salat, et al, 2004, Cerebral Cortex

  4. Aging Thickness Study Positive Age Correlation Negative Age Correlation N=40 (all in fsaverage space) p<.01

  5. Surface-based Measures • Morphometric (eg, thickness) • Functional • PET • MEG/EEG • Diffusion (?) sampled just under the surface

  6. Processing Stages • Specify Subjects and Surface measures • Assemble Data: • Resample into Common Space • Smooth • Concatenate into one file • Model and Contrasts (GLM) • Fit Model (Estimate) • Correct for multiple comparisons • Visualize

  7. The General Linear Model (GLM) y1 y2 x1 x2 Is Thickness correlated with Age? Thickness Dependent Variable, Measurement Subject 1 Subject 2 HRF Amplitude IQ, Height, Weight Age Of course, you’d need more then two subjects … Independent Variable

  8. Linear Model Thickness Intercept: b Slope: m y1 Matrix Formulation y2 Age b m y1 y2 1 x1 1 x2 = * x1 x2 b m  System of Linear Equations y1 = 1*b + x1*m y2 = 1*b + x2*m Intercept = Offset X = Design Matrix  = Regression Coefficients = Parameter estimates = “betas” = Intercepts and Slopes = beta.mgh (mri_glmfit) Y = X* mri_glmfit output: beta.mgh

  9. Hypotheses and Contrasts b m y1 y2 1 x1 1 x2 = * m= [0 1]* b m Thickness Intercept: b b m ?   = C* Slope: m y1 y2 Age x1 x2 Is Thickness correlated with Age? Does m = 0? Null Hypothesis: H0: m=0 C=[0 1]: Contrast Matrix mri_glmfit output: gamma.mgh

  10. More than Two Data Points b m y1 y2 y3 y4 1 x1 1 x2 1 x3 1 x4 = * Thickness Intercept: b Slope: m Age Y = X* y1 = 1*b + x1*m y2 = 1*b + x2*m y3 = 1*b + x3*m y4 = 1*b + x4*m • Model Error • Noise • Uncertainty • rvar.mgh

  11. t-Test and p-values Y = X*  = C* p-value/significance • value between 0 and 1 • closer to 0 means more significant FreeSurfer stores p-values as –log10(p): • 0.1=10-1sig=1, 0.01=10-2sig=2 • sig.mgh files • Signed by sign of  • p-value is for an unsigned test

  12. Two Groups Intercept: b1 Thickness Slope: m1 Slope: m2 Age Intercept: b2 Do groups differ in Intercept? Do groups differ in Slope? Is average slope different than 0? …

  13. Two Groups Intercept: b1 Thickness b1 b2 m1 m2 y11 y12 y21 y22 * 1 0 x11 0 1 0 x12 0 0 1 0 x21 0 1 0 x22 Slope: m1 = Slope: m2 Age Intercept: b2 Y = X* y11 = 1*b1 + 0*b2 + x11*m1 + 0*m2 y12 = 1*b1 + 0*b2 + x12*m1 + 0*m2 y21 = 0*b1 + 1*b2 + 0*m1 + x21*m2 y22 = 0*b1 + 1*b2 + 0*m1 + x22*m2

  14. Two Groups b1 b2 m1 m2 b1 b2 m1 m2 Intercept: b1 Thickness Slope: m1 Slope: m2 Age Intercept: b2 y11 y12 y21 y22 * 1 0 x11 0 1 0 x12 0 0 1 0 x21 0 1 0 x22 Do groups differ in Intercept? Does b1=b2? Does b1-b2 = 0? C = [+1-100],  = C* = Do groups differ in Slope? Does m1=m2? Does m1-m2=0? C = [00+1-1],  = C* Y = X*  Is average slope different than 0? Does (m1+m2)/2 = 0? C = [000.50.5],  = C*

  15. Surface-based Group Analysis in FreeSurfer • Create your own design matrix and contrast matrices • Create an FSGD File • FreeSurfer creates design matrix • You still have to specify contrasts • QDEC • Limited to 2 discrete variables, 2 levels max • Limited to 2 continuous variables

  16. } recon-all -qcache Command-line Processing Stages • Assemble Data (mris_preproc) • Resample into Common Space • Smooth • Concatenate into one file • Model and Contrasts (GLM) (FSGD) • Fit Model (Estimate) (mri_glmfit) • Correct for multiple comparisons • Visualize (tksurfer)

  17. Specifying Subjects bert Subject ID $SUBJECTS_DIR fred jenny margaret …

  18. FreeSurfer Directory Tree bert bem stats morph mri rgb scripts surf tiff label orig T1 brain wm aseg Subject ID lh.aparc_annnot rh.aparc_annnot lh.white rh.white lh.thickness rh.thickness lh.sphere.reg rh.sphere.reg SUBJECTS_DIR environment variable

  19. Example: Thickness Study $SUBJECTS_DIR/bert/surf/lh.thickness $SUBJECTS_DIR/fred/surf/lh.thickness $SUBJECTS_DIR/jenny/surf/lh.thickness $SUBJECTS_DIR/margaret/surf/lh.thickness …

  20. FreeSurfer Group Descriptor (FSGD) File • Simple text file • List of all subjects in the study • Accompanying demographics • Like a spreadsheet • Automatic design matrix creation • You must still specify the contrast matrices • Integrated with tksurfer Note: Can specify design matrix explicitly with --design

  21. FSGD Format GroupDescriptorFile 1 Class Male Class Female Variables Age Weight IQ Input bert Male 10 100 1000 Input fred Male 15 150 1500 Input jenny Female 20 200 2000 Input margaret Female 25 250 2500 • One Discrete Factor (Gender) with Two Levels (M&F) • Three Continuous Variables: Age, Weight, IQ Class = Group Note: Can specify design matrix explicitly with --design

  22. FSGDF  X (Automatic) Male Age Female Group Female Age Male Group 1 0 10 0 100 0 1000 0 1 0 15 0 150 0 1500 0 0 1 0 20 0 200 0 2000 0 1 0 25 0 250 0 2500 X = Weight IQ Age C = [-1 1 0 0 0 0 0 0] } Tests for the difference in intercept/offset between groups C = [ 0 0 -1 1 0 0 0 0] } Tests for the difference in age slope between groups DODS – Different Offset, Different Slope

  23. Another FSGD Example • Two Discrete Factors • Gender: Two Levels (M&F) • Handedness: Two Levels (L&R) • One Continuous Variable: Age GroupDescriptorFile 1 Class MaleRight Class MaleLeft Class FemaleRight Class FemaleLeft Variables Age Input bert MaleLeft 10 Input fred MaleRight 15 Input jenny FemaleRight 20 Input margaret FemaleLeft 25 Class = Group

  24. Interaction Contrast 4  2 L 3  1 R M F   3-1)- 4-2) 1+2+ 3-4 C = [-1 +1 +1 -1] • Two Discrete Factors (no continuous, for now) • Gender: Two Levels (M&F) • Handedness: Two Levels (L&R) • Four Regressors (Offsets) • MR (1), ML (2), FR (3), FL (4) GroupDescriptorFile 1 Class MaleRight Class MaleLeft Class FemaleRight Class FemaleLeft Input bert MaleLeft Input fred MaleRight Input jenny FemaleRight Input margaret FemaleLeft

  25. NRegressors Number of Regressors Each Group/Class: • Has its own Intercept • Has its own Slope for each continuous variable • DODS = Different offset, different slope NRegressors = NClasses*(NVariables+1) C = [-1 1 0 0 0 0 0 0] } Tests for the difference in intercept/offset between groups C = [ 0 0 -1 1 0 0 0 0] } Tests for the difference in age slope between groups

  26. Factors, Levels, Groups, Classes Factors can be Discrete or Continuous: • Continuous Variables: Age, IQ, Volume, etc • Discrete Factors: Gender, Handedness, Diagnosis • Discrete Factors have Levels: • Gender: Male and Female • Handedness: Left and Right • Diagnosis: Normal, MCI, AD Group or Class: Specification of All Discrete Factors: • Left-handed Male MCI • Right-handed Female Normal

  27. Assemble Data: mris_preproc mris_preproc --help --fsgd FSGDFile : Specify subjects thru FSGD File --hemi lh : Process left hemisphere --meas thickness : $SUBJECTS_DIR/subjectid/surf/hemi.thickness --target fsaverage : common space is subject fsaverage --o lh.thickness.mgh : output “volume-encoded surface file” Lots of other options! lh.thickness.mgh – file with thickness maps for all subjects  Input to Smoother or GLM

  28. Surface Smoothing • mri_surf2surf --help • Loads lh.thickness.mgh • 2D surface-based smoothing • Specify FWHM (eg, fwhm = 10 mm) • Saves lh.thickness.sm10.mgh • Can be slow (~10-60min) • recon-all -qcache

  29. mri_glmfit • Reads in FSGD File and constructs X • Reads in your contrasts (C1, C2, etc) • Loads data (lh.thickness.sm10.mgh) • Fits GLM (ie, computes ) • Computes contrasts (=C*) • t or F ratios, significances • Significance -log10(p) (.01  2, .001  3)

  30. mri_glmfit mri_glmfit --y lh.thickness.sm10.mgh --fsgd gender_age.txt --C age.mtx –C gender.mtx --surf fsaverage lh --cortex --glmdir lh.gender_age.glmdir mri_glmfit --help

  31. mri_glmfit mri_glmfit --y lh.thickness.sm10.mgh --fsgd gender_age.txt --C age.mtx –C gender.mtx --surf fsaverage lh --cortex --glmdir lh.gender_age.glmdir Input file (output from smoothing). Stack of subjects, one frame per subject

  32. mri_glmfit mri_glmfit --y lh.thickness.sm10.mgh --fsgd gender_age.txt --C age.mtx –C gender.mtx --surf fsaverage lh --cortex --glmdir lh.gender_age.glmdir • FreeSurfer Group Descriptor File (FSGD) • Group membership • Covariates

  33. mri_glmfit mri_glmfit --y lh.thickness.sm10.mgh --fsgd gender_age.txt --C age.mtx –C gender.mtx --surf fsaverage lh --cortex --glmdir lh.gender_age.glmdir • Contrast Matrices • Simple text/ASCII files • Test hypotheses

  34. mri_glmfit mri_glmfit --y lh.thickness.sm10.mgh --fsgd gender_age.txt --C age.mtx –C gender.mtx --surf fsaverage lh --cortex --glmdir lh.gender_age.glmdir • Perform analysis on left hemisphere of fsaverage subject • Masks by fsaverage cortex.label • Computes FWHM in 2D

  35. mri_glmfit Output directory: lh.gender_age.glmdir/ beta.mgh – parameter estimates rvar.mgh – residual error variance etc … age/ sig.mgh – -log10(p), uncorrected gamma.mgh, F.mgh gender/ sig.mgh – -log10(p) gamma.mgh, F.mgh mri_glmfit --y lh.thickness.sm10.mgh --fsgd gender_age.txt --C age.mtx –C gender.mtx --surf fsaverage lh --cortex --glmdir lh.gender_age.glmdir

  36. Visualization with tksurfer Saturation: -log10(p), Eg, 5=.00001 Threshold: -log10(p), Eg, 2=.01 uncorrected False Dicovery Rate Eg, .01 View->Configure->Overlay File->LoadOverlay

  37. Visualization with tksurfer File-> Load Group Descriptor File …

  38. Problem of Multiple Comparisons p < 0.10 p < 0.01 p < 10-7 p value is probability that a voxel is falsely activated • Threshold too liberal: many false positives • Threshold too restrictive: lose activation (false negatives)

  39. Clusters p<.01 p<10-7 p<.10 • True signal tends to be clustered • False Positives tend to be randomly distributed in space • Cluster – set of spatially contiguous voxels that are above a given threshold.

  40. Cluster-forming Threshold p<.001 sig<3 p<.0001 sig<4 p<.00001 sig<5 Unthresholded As threshold lowers, clusters may expand or merge and new clusters can form. No way to say what the threshold should be.

  41. Cluster Table, Uncorrected p<.0001 sig<4 38 clusters ClusterNo Area(mm2) X Y Z Structure Cluster 1 3738.82 -11.1 34.5 27.2 superiorfrontal Cluster 2 5194.19 -32.4 -23.3 15.7 insula Cluster 3 1271.30 -25.9 -75.0 19.0 superiorparietal Cluster4 775.38 -44.4 -9.7 51.3 precentral Cluster5 440.56 -33.0 -36.8 37.5 supramarginal … How likely is it to get a cluster of a certain size under the null hypothesis?

  42. Correction for Multiple Comparisons • Cluster-based • Monte Carlo simulation • Permutation Tests • False Discovery Rate (FDR) – built into tksurfer and QDEC. (Genovese, et al, NI 2002)

  43. Cluster-based Corr. for Multiple Comparisons • Simulate data under Null Hypothesis: • Synthesize Gaussian noise and then smooth (Monte Carlo) • Permute rows of design matrix (Permutation, orthog) • Analyze, threshold, cluster, max cluster size • Repeat 10,000 times • Analyze real data, get cluster sizes • P(cluster) = #MaxClusterSize > ClusterSize/10000 mri_glmfit-sim

  44. Cluster Table, Corrected p<.0001 sig<4 22 clusters out of 38 have cluster p-value < .05 ClusterNo Area(mm2) X Y Z Structure Cluster P Cluster 1 3738.82 -11.1 34.5 27.2 superiorfrontal .0001 Cluster 2 5194.19 -32.4 -23.3 15.7 insula .0003 Cluster 3 1271.30 -25.9 -75.0 19.0 superiorparietal .0050 Cluster4 775.38 -44.4 -9.7 51.3 precentral .0100 Cluster5 440.56 -33.0 -36.8 37.5 supramarginal .0400 … Note the difference between the Cluster Forming Threshold (p<.0001) and the Cluster p-value.

  45. Surface-based Corr. for Multiple Comparisons • 2D Cluster-based Correction at p < .05 mri_glmfit-sim --glmdir lh.gender_age.glmdir --cache pos 2 --cwpvalthresh .05 --2spaces

  46. Original mri_glmfit command: mri_glmfit --y lh.thickness.sm10.mgh --fsgd gender_age.txt --C age.mtx –C gender.mtx --surf fsaverage lh --cortex --glmdir lh.gender_age.glmdir Surface-based Corr. for Multiple Comparisons • 2D Cluster-based Correction at p < .05 mri_glmfit-sim --glmdir lh.gender_age.glmdir --cache pos 2 --cwpvalthresh .05 --2spaces lh.gender_age.glmdir/ beta.mgh – parameter estimates rvar.mgh – residual error variance etc … age/ sig.mgh – -log10(p), uncorrected gamma.mgh, F.mgh gender/ sig.mgh – -log10(p) gamma.mgh, F.mgh

  47. Surface-based Corr. for Multiple Comparisons • 2D Cluster-based Correction at p < .05 mri_glmfit-sim --glmdir lh.gender_age.glmdir --cache pos 2 --cwpvalthresh .05 --2spaces • Use pre-cached simulation results • positive contrast • voxelwise threshold = 2 (p<.01) • Can use another simulation or permutation

  48. Surface-based Corr. for Multiple Comparisons • 2D Cluster-based Correction at p < .05 mri_glmfit-sim --glmdir lh.gender_age.glmdir --cache pos 2 --cwpvalthresh .05 --2spaces Cluster-wise threshold p<.05

  49. 49 Surface-based Corr. for Multiple Comparisons • 2D Cluster-based Correction at p < .05 mri_glmfit-sim --glmdir lh.gender_age.glmdir --cache pos 2 --cwpvalthresh .05 --2spaces Bonferroni correct over two hemispheres

  50. Correction for Multiple Comparisons Output lh.gender_age.glmdir mri_glmfit-sim --glmdir lh.gender_age.glmdir --cache pos 2 --cwpvalthresh .05 --2spaces age gender sig.mgh – pre-existing uncorrected p-values cache.th20.pos.sig.cluster.mgh – map of significance of clusters cache.th20.pos.sig.ocn.annot – annotation of significant clusters cache.th20.pos.sig.cluster.summary – text file of cluster table (clusters, sizes, MNI305 XYZ, and their significances) • Only shows clusters p<.05