Data Processing of Resting
Download
Report
Transcript Data Processing of Resting
Data Processing of
Resting-State fMRI
(Part 2)
YAN Chao-Gan
严超赣
Ph. D.
[email protected]
State Key Laboratory of Cognitive Neuroscience and Learning,
Beijing Normal University, China
1
Outline
• Statistical Analysis
• Results Viewing
• Multiple Comparisons
• REST Image Calculator
• Other Functions
2
Statistical Analysis
One sample T test
Two Sample T test
Paired T test
ANOVA analysis
3
One sample T test
Preparation
• ALFF: mALFF-1
• fALFF: mfALFF-1
• ReHo: smReHo-1
• FC: zFC
4
One sample
T test
5
One sample T test
smReHo
mALFF
g1-1
6
One sample T test
7
One sample T test
m*-1 images
zFC images
Brain Mask
Directory for
saving SPM.mat
8
One sample T test
The generated
spm.mat
9
One sample T test
The generated
spm.mat
1
10
One sample T test
spmT_0001.img
HeightthresholdT = 2.687659 {p<0.05(FDR)}
Extentthresholdk = 10 voxels
11
Two sample T test
Preparation
• ALFF:mALFF
• fALFF: mfALFF
• ReHo: smReHo
• FC: zFC
• Mask
12
Mask
Two sample T test
• Brain Mask
Mask=(Patient_1T.img>Thrd)+(CON_1T.img>Thrd)
>0
Patient_1T.img
CON_1T.img
Mask_2T.img
(i1>1.96+i2
>1.96)>0
13
Two sample T test
Brain Mask or
Mask_2T.img
m* or zFC* images
for the two groups
Directory for
saving SPM.mat
14
Two sample T test
The generated
spm.mat
15
Two sample T test
The generated
spm.mat
1 -1
16
Two sample T test
spmT_0001.img
HeightthresholdT = Inf {p<0.05(FDR)}
Extentthresholdk = 0 voxels
17
Paired T test
18
Paired T test
m* or zFC*
images
for each pair
Brain Mask
19
Paired T test
20
ANOVA Analysis
21
ANOVA Analysis
3
Corresponding level
Images for this group
22
ANOVA Analysis
23
Statistical Analysis in REST
24
One-Sample T-Test
0 for m*-1 images
1 for m* images
Brain Mask
T Statistic Image
25
Two-Sample T-Test
T Statistic Image: positive corresponds to the mean of
Group 1 is greater than the mean of Group 2
26
Two-Sample T-Test
Two-Sample T-Test with covariates: e.g. gray matter proportion
images
(Oakes
et
al.,
2007, Neuroimage)
Please
make
sure
the
correspondence
the group
Other
covariate
can be between
also specified
as text
images and the files.
covariate
order
and
(E.g.images:
age, brain
size,
IQvoxel
etc.) size
27
Paired T-Test
Situation 1 –
Situation 2
Please make
sure the
correspondence
T Statistic Image
28
ANOVA or ANCOVA
ANCOVA: e.g. gray matter proportion images F
(Oakes
et al.,
Statistic
Image
2007,make
Neuroimage)
Please
sure
the covariate
correspondence
the group
Other
can be between
also specified
as text
images and the files.
covariate
order
and
(E.g.images:
age, brain
size,
IQvoxel
etc.) size
29
Correlation Analysis
The imaging measure:
ALFF maps
Traits: e.g.
MMSE.txt
19
15
23
14
23
…
30
Outline
• Statistical Analysis
• Results Viewing
• Multiple Comparisons
• REST Image Calculator
• Other Functions
31
Results Viewing
• SPM5
• xjview
• MRIcroN
• REST Slice Viewer
32
Results Viewing - SPM5
33
Results Viewing - SPM5
34
Results Viewing - xjview
35
结果呈现—xjview
36
Results Viewing - MRIcroN
37
REST
Slice
Viewer
38
39
40
For Voxel size = 3*3*3
Voxels are connected if their faces touch
rmm=4
Voxels are connected if their faces or edges
touch
rmm=5; SPM_Criterion
Voxels are connected if their faces, edges, or
corners touch
rmm=6
41
42
43
44
45
46
This report is based on CUI Xu's xjview. (http://www.alivelearn.net/xjview/)
Revised by YAN Chao-Gan and ZHU Wei-Xuan 20091108: suitable for different Cluster
Connectivity Criterion: surface connected, edge connected, corner connected.
Number of clusters found: 7
---------------------Cluster 1
Number of voxels: 59
Peak MNI coordinate: 27 6 -45
Peak MNI coordinate region: // Right Cerebrum // Temporal Lobe // Superior Temporal
Gyrus // White Matter // undefined // Temporal_Inf_R (aal)
Peak intensity: 3.5023
# voxels structure
59
--TOTAL # VOXELS-40
Right Cerebrum
33
Temporal Lobe
20
White Matter
19
Temporal_Inf_R (aal)
16
Gray Matter
14
Superior Temporal Gyrus
13
Fusiform_R (aal)
11
brodmann area 38
8
Inferior Temporal Gyrus
7
Middle Temporal Gyrus
7
Limbic Lobe
6
Uncus
6
Temporal_Pole_Mid_R (aal)
5
brodmann area 20
3
Sub-Gyral
---------------------Cluster 2
Number of voxels: 98
47
48
49
Create Brodmann Mask
Template\brodmann.nii
Or
Template\Brodmann_61x73x61.nii
50
Create Brodmann Mask
51
Data
Resample
0 – Nearest Neighbor
1 – Trilinear
2- 2nd degree b-spline
52
Outline
• Statistical Analysis
• Results Viewing
• Multiple Comparisons
• REST Image Calculator
• Other Functions
53
2
1.5
Multiple Comparisons
1
0.5
0
-0.5
1
2
3
4
5
P=0.05
P=0.05 P=0.05
P=0.05
P=0.05
0.95 0.95
0.95
0.95
0.95
Probability
of not
Probability
Probability
of not of
Probability
not
Probability
of not
of not
0.955=0.774
getting a false
getting a false
getting a falsegetting a false
getting a false
positive result:
positive result:
positive result:
positive result:
positive result:
1 - 0.05 = 0.95
1 - 0.05 = 10.95
- 0.05 = 0.95
1 - 0.05 = 0.95
1 - 0.05 = 0.95
54
Multiple Comparisons
• Bonferroni correction: 0.05/5=0.01
• Family-Wise Error (FWE) correction
• False Discovery Rates (FDR) correction
• Monte Carlo simulations (AlphaSim)
55
FDR Theory
• False discovery rate Qe=E(V/(V+S))=E(V/R)
Benjamini and Hochberg, 1995, Journal of the Royal Statistical Society
56
FDR Theory
• Let H1, …, Hm be the null hypotheses and P1, …, Pm their
corresponding p-values. Order these values in increasing
order and denote them by P(1), …, P(m). For a given q, find
the largest k such that P(k) ≦ kq/m.
•Then reject (i.e. declare positive) all H(i) for i = 1, …, k.
57
FDR in REST
58
FDR in REST
59
FDR in REST
60
Multiple Comparisons
Monte Carlo simulations (AlphaSim)
11
11
10
10
9
9
8
8
7
7
6
6
5
5
4
4
3
3
2
2
1
1
2
3
4
5
6
7
8
9
10
1
11
1
2
3
4
5
6
7
8
9
10
11
?
61
REST
AlphaSim
62
63
Cl Size
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Frequency
235971
76150
32297
15940
8476
4786
2767
1606
1011
585
391
236
164
98
69
37
22
22
11
7
5
5
4
1
Cum Prop p/Voxel
0.619898
0.819945
0.904789
0.946664
0.968930
0.981503
0.988772
0.992991
0.995647
0.997184
0.998211
0.998831
0.999262
0.999519
0.999701
0.999798
0.999856
0.999913
0.999942
0.999961
0.999974
0.999987
0.999997
1.000000
Max Freq
0.009613
0.006282
0.004131
0.002763
0.001863
0.001265
0.000860
0.000586
0.000405
0.000276
0.000194
0.000133
0.000093
0.000063
0.000043
0.000029
0.000020
0.000015
0.000010
0.000007
0.000005
0.000003
0.000002
0.000000
Alpha
0
0
0
0
0
1
19
51
127
132
172
146
107
78
61
30
22
21
11
7
5
5
4
1
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
0.999000
0.980000
0.929000
0.802000
0.670000
0.498000
0.352000
0.245000
0.167000
0.106000
0.076000
0.054000
0.033000
0.022000
0.015000
0.010000
0.005000
0.001000
64
Outline
• Statistical Analysis
• Results Viewing
• Multiple Comparisons
• REST Image Calculator
• Other Functions
65
REST
Image
Calculator
66
REST Image
Calculator
67
REST Image Calculator
Example expressions:
(a)
g1-1
Subtract 1 from each image in group 1
(b)
g1-g2 Subtract each image in group 2 from each corresponding image in
group1
(c)
i1-i2 Subtract image 2 from image 1
(d)
i1>100 Make a binary mask image at threshold of 100
(e)
g1.*(i1>100) Make a mask and then apply to each image in group 1
(f) mean(g1) Calculate the mean image of group 1
(g) (i1-mean(g1))./std(g1) Calculate the z value of i1 related to group 1
(g)
corr(g1,g2,''temporal'') Calculate the temporal correlation between two
groups, i.e. one correlation coefficient between two ''time courses'' for each
voxel.
(h)
corr(g1,g2,''spatial'')
Calculate the spatial correlation between two groups,
i.e. one correlation coefficient between two images for each ''time point''.
68
Outline
• Statistical Analysis
• Results Viewing
• Multiple Comparisons
• REST Image Calculator
• Other Functions
69
Power
Spectrum
70
Power Spectrum
71
Power Spectrum
72
Power Spectrum
73
Granger Causality Analysis
Contributed by Mr. ZANG Zhen-Xiang
74
Theory of Granger Causality
Signed path coefficient
Chen et al, 2009, ISMRM
Granger 1969; Ding et al., 2006
75
Theory of Granger Causality
Residual based
Granger 1969; Ding et al., 2006
76
77
NIfTI nii to
NIfTI pairs
78
NIfTI .nii to NIfTI
pairs
79
Reading and Writing functions
Reading:
[Data Vox Head]=rest_readfile('brodmann.nii');
Data – 181*217*181 double
Vox – 1 1 1
Head - Structure
Processing:
BA20Data=(Data==20);
Writing:
rest_WriteNiftiImage(BA20Data,Head,'BA20.img');
80
Solve Problem "Out Of Memory"
1. Reboot your computer and do not run any other programs.
2. Enlarge your memory.
3. MATLAB Version 7.1 or above is suggested.
4. You can turn on the 3GB switch of Windows XP!!! Please see more details in
http://msdn.microsoft.com/en-us/library/ff556232.aspx.
5. If this problem remains, please install Linux, especially 64 bit Linux and
Matlab.
81
Solve Problem "Out Of Memory"
Enable the 3GB switch on Windows XP
* Right-click My Computer -> Properties -> Advanced -> Startup and
Recovery -> Settings -> Edit.
Modify the following line (maybe not exactly same) in the boot.ini file:
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="WinXP Pro 3GB"
/noexecute=optin /fastdetect /3GB
* Save and close -> Restart your computer.
Enable the 3GB switch on Windows Vista and Windows 7 (32-bit)
* Right-click Command Prompt in the Accessories program group of the
Start menu. Click Run as Administrator.
* At the command prompt, enter "bcdedit /set IncreaseUserVa 3072"
* Restart the computer.
82
Further Help
Further questions:
www.restfmri.net
83
Thanks to
DONG Zhang-Ye
GUO Xiao-Juan
HE Yong
LONG Xiang-Yu
SONG Xiao-Wei
YAO Li
ZANG Yu-Feng
ZHANG Han
ZHU Chao-Zhe
ZOU Qi-Hong
ZUO Xi-Nian
……
SPM Team: Wellcome
Department of Imaging
Neuroscience, UCL
MRIcroN Team: Chris
RORDEN
Xjview Team: CUI Xu
……
All the group
members!
84
Thanks for your attention!
85