Introducon to FreeSurfer -...

Preview:

Citation preview

Introduc)ontoFreeSurferh0p://surfer.nmr.mgh.harvard.edu

JenniPachecojpacheco@mail.utexas.edu

2

Outline

•  ProcessingStages•  Command‐lineStream

–  AssembleData(mris_preproc,mri_surf2surf)–  Design/Contrast(GLMTheory)(designmatrix)–  Analyze(mri_glmfit)–  Visualize(tksurfer,QDEC)

•  Interac)ve/AutomatedGUI(QDEC)•  Correc)onformul)plecomparisons(mri_surfcluster)

3

Surface-based Study (Thickness)

Example:ThicknessStudy

1.  $SUBJECTS_DIR/bert/surf/lh.thickness 2.  $SUBJECTS_DIR/fred/surf/lh.thickness 3.  $SUBJECTS_DIR/sara/surf/lh.thickness 4.  $SUBJECTS_DIR/margaret/surf/lh.thickness 5.  …

lh.thickness is in the subject’s surface space, Ie, not a common surface space.

5

ProcessingStages

•  SpecifySubjectsandSurfacemeasures•  AssembleData:

–  Resampleintocommonspace–  Smooth–  Concatenateintoonefile

•  ModelandContrasts(GLM)•  FitModel(Es)mate)•  Correctformul)plecomparisons•  Visualize

Inter‐SubjectAveragingSu

bjec

t 1

Subj

ect 2

Native Spherical Spherical

Surface-to- Surface

Surface-to- Surface

GLM

Demographics

GLMTheory

•  y is surface-based measure •  X is design matrix •  Beta are regression coefficients •  C is contrast matrix •  GLM: fit for beta •  Null Hypotheses: gamma = 0 •  Performed at each surface vertex •  Conceptually no different than volume-

based

Need: •  y •  X •  C

Output: •  beta •  gamma (cope) •  t/F/p

Surface‐basedSta)s)calAnalysis

•  Makinganaveragesubjectfromyoursetofsubjects(orusefsaverage)

•  Construc)ngaFreeSurferGroupDescriptorFile(FSGD)

•  Preprocessingthegroupdata•  Construc)ngthedesignmatrix

•  Construc)ngcontrastmatricestotesthypotheses•  Correc)ngformul)plecomparisons

Average(Target)Subject

•  Usethepre‐madeaveragesubject,fsaverage– Averageof40subjects

•  Createyourownaveragesubjectsfromyourdataset

•  Useoneindividualsubjectfromyourgroup

•  Somethingelse…

Surface‐basedSta)s)calAnalysis

•  Makinganaveragesubjectfromyoursetofsubjects(orusefsaverage)

•  Construc)ngaFreeSurferGroupDescriptorFile(FSGD)

•  Preprocessingthegroupdata•  Construc)ngthedesignmatrix

•  Construc)ngcontrastmatricestotesthypotheses•  Correc)ngformul)plecomparisons

FSGDFile

FSGDF=FreeSurferGroupDescriptorFile,

Supplies(mostof)Xandy.

GroupDescriptorFile 1 Class Male red square Class Female blue circle Variables Age Weight IQ Input bert Male 10 100 1000 Input fred Male 15 150 1500 Input sara 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

Surface‐basedSta)s)calAnalysis

•  Makinganaveragesubjectfromyoursetofsubjects(orusefsaverage)

•  Construc)ngaFreeSurferGroupDescriptorFile(FSGD)

•  Preprocessingthegroupdata•  Construc)ngthedesignmatrix

•  Construc)ngcontrastmatricestotesthypotheses•  Correc)ngformul)plecomparisons

• Assembles your subjects into a common space (spherical) and gathers the information from the measurement you are using (thickness) into one file.

• Will need to specify: • fsgd file • Hemisphere • Measure (thickness, curv, sulc, functional values, etc…) • Target subject

mris_preproc

Input: •  y •  X •  C

mris_preprocCommand

mris_preproc‐‐fsgdgender_age.txt‐‐targetaverage‐‐hemilh‐‐measthickness

‐‐outlh.gender_age.thickness.mgh

SurfaceSmoothing•  Usesoutputfrommris_preproc

–  lh.thickness.mgh

•  2Dsurface‐basedsmoothing(eg,fwhm=10mm)

•  Saveslh.thickness.sm10.mgh

Why should you smooth? •  Improve CNR •  Improve inter-subject registration How much smoothing? •  Blob-size •  Typically 10-20 mm FWHM •  More forgiving than volume-based

Input: •  y •  X •  C

mri_surf2surfCommand

mri_surf2surf‐‐hemilh‐‐saverage‐‐svallh.gender_age.thickness.mgh‐‐fwhm10

‐‐tvallh.gender_age.thickness.10.mgh

Surface‐basedSta)s)calAnalysis

•  Makinganaveragesubjectfromyoursetofsubjects(orusefsaverage)

•  Construc)ngaFreeSurferGroupDescriptorFile(FSGD)

•  Preprocessingthegroupdata•  Construc)ngthedesignmatrix

•  Construc)ngcontrastmatricestotesthypotheses•  Correc)ngformul)plecomparisons

DOSSvsDODS

•  DifferentOffset,SameSlope

•  DifferentOffset,DifferentSlope

Designmatrixandcontrasts

1 0 10 100 1000 1 0 15 150 1500 0 1 20 200 2000 0 1 25 250 2500

DOSS – Different Offset, Same Slope

X =

C = [-1 1 0 0 0]

#Regressors = Nv+Nc = 3+2=5 Fewer regressors than DODS DOF = #Rows - #Regressors

Male Class

Female Class Age for Males and Females

Input: •  y •  X •  C

Tests for the difference in offset between groups

}

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

DODS – Different Offset, Different Slope

X =

C = [-1 1 0 0 0 0 0 0]

Male Group

Female Group Female Age

Male Age

} #Regressors = (Nv+1)*Nc = (3+1)*2=8 DOF = #Rows - #Regressors

Input: •  y •  X •  C

Same test, different vector

Designmatrixandcontrasts

mri_glmfit

•  ReadsinFSGDFileandconstructsX•  Readsinyourcontrasts(C1,C2,etc)•  Usesoutputfrommris_surf2surf

–  lh.thickness.sm10.mgh

•  FitsGLM•  Computescontrasts(gamma)•  torFra)osandsignificances

mri_glmfitCommand

mri_glmfit‐‐ylh.thickness.sm10.mgh‐‐fsgdgender_age.txtdoss‐‐surffsaveragelh

‐‐glmdirlh.gender_age.glmdir

‐‐Cage.mat–Cgender.mat

mri_glmfitOutput

Creates: lh.gender_age.glmdir/ beta.mgh – parameter estimates eres.mgh – residual error rvar.mgh – residual error variance y.fsgd – fsgd file used for scatter plot etc … age/ sig.mgh – -log10(p) gamma.mgh, F.mgh gender/ sig.mgh – -log10(p) gamma.mgh, F.mgh

Visualization with tksurfer

View->Configure->Overlay

Threshold: -log10(p), Eg, 2=.01

Saturation: -log10(p), Eg, 5=.00001

False Discovery Rate Eg, .01

File->LoadOverlay

Visualization with tksurfer

File-> Load Group Descriptor File …

26

ProblemofMul)pleComparisons

p < 0.10 p < 0.01 p < 10-7

27

Correc)onforMul)pleComparisons

•  Cluster‐based– MonteCarlosimula)on

– Permuta)onTests

– SurfaceGaussianRandomFields(GRF)

• Therebutnotfullytested•  FalseDiscoveryRate(FDR)–builtintotksurferandQDEC.(Genovese,etal,NI2002)

28

Clustering1.  Chooseavertex‐wisethreshold

•  Eg,2(p<.01),or3(p<.001)•  Sign(pos,neg,abs)

2.  Aclusterisagroupofconnected(neighboring)ver)cesabovethreshold

3.  Clusterhasasize(areainmm2)

p<.01 (-log10(p)=2) Negative

p<.0001 (-log10(p)=4) Negative

29

Cluster‐basedCorrec)onforMul)pleComparisons1.  SimulatedataunderNullHypothesis:

–  SynthesizeGaussiannoiseandthensmooth(MonteCarlo)–  Permuterowsofdesignmatrix(Permuta)on,orthog)

2.  Analyze,threshold,cluster,maxclustersize3.  Repeat10,000)mes4.  Analyzerealdata,getclustersizes5.  P(cluster)=#MaxClusterSize>ClusterSize/

10000

mri_glmfit-sim

Recommended