-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtbx_cfg_MM12.m
290 lines (266 loc) · 9.04 KB
/
tbx_cfg_MM12.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
function MM12 = tbx_cfg_MM12
if ~isdeployed, addpath(fullfile(spm('dir'),'toolbox','MM12')); end
% pres
pres = cfg_menu;
pres.tag = 'pres';
pres.name = 'Project in residual space';
pres.help = {
'Choose yes if you want to perform the analysis '
'in the residual space. This means that the part of the data that correlates '
'with X*c where c is your contrast (possibly multidimensional) and '
'X is the design matrix will be removed.'
};
pres.labels = {
'Yes'
'No'
}';
pres.values = {
1
0
}';
pres.val = {};
% filter
filter = cfg_menu;
filter.tag = 'filter';
filter.name = 'Filter';
filter.help = {
'Choose yes if you want to filter the data by the temporal '
'filter that was used in the initial SPM analysis. In general '
'this is adviced unless you know exatly what you''re doing because'
'the model used to project the data onto a subspace has also been'
'temporally filtered'
};
filter.labels = {
'Yes'
'No'
}';
filter.values = {
1
0
}';
filter.val = {};
% GSF
GSF = cfg_menu;
GSF.tag = 'GSF';
GSF.name = 'Use gSF';
GSF.help = {
'Choose yes if you want to use gSF the data '
};
GSF.labels = {
'Yes'
'No'
}';
GSF.values = {
1
0
}';
GSF.val = {};
% dvres
dvres = cfg_menu;
dvres.tag = 'dvres';
dvres.name = 'Normalize by residuals SD';
dvres.help = {
'choose yes if you want to normalize the data '
'voxel per voxel by the estimate of the residual standard deviation'
};
dvres.labels = {
'Yes'
'No'
}';
dvres.values = {
1
0
}';
dvres.val = {};
% mlmanal
mlmanal = cfg_const;
mlmanal.tag = 'mlmanal';
mlmanal.name = 'MLM';
mlmanal.val = {'MLM'};
% svdanal
svdanal = cfg_branch;
svdanal.tag = 'svdanal';
svdanal.name = 'SVD';
svdanal.val = {pres filter dvres};
% typeanal
typeanal = cfg_choice;
typeanal.tag = 'typeanal';
typeanal.name = 'Type of analysis';
typeanal.help = {
' Multivariate Methods : '
' Choose SVD to perform SVD (eg PCA) analysis. '
' Choose MLM for multivariate linear models. '
' Further information can be found in the html help document.'
' For more advanced disscussion see Worsley 97'
' (Neuroimage 1997 Nov;6(4):305-19) '
};
typeanal.values = {
mlmanal
svdanal
}';
typeanal.val = {};
% god
god = cfg_files;
god.tag = 'god';
god.name = 'Global subjects results ';
god.help = {'Select a directory. Global results concerning the MM analysis'
'will be saved in this directory'
'You must have write permissions on this directory'};
god.filter = 'dir';
god.ufilter = '.*';
god.num = [1 1];
% iod
iod = cfg_files;
iod.tag = 'iod';
iod.name = 'Individual space domain results';
iod.help = {'Select a directory. Results concerning this specific space domain '
'will be saved in this directory'};
iod.filter = 'dir';
iod.ufilter = '.*';
iod.num = [1 1];
% mod
mod = cfg_files;
mod.tag = 'mod';
mod.name = 'Experimental model';
mod.help = {
'Select a SPM.mat matrix. This will define an experimental model '
'that will be used to either remove some components of no interest '
'or to reduce the data to the part that correlates with part of '
'this model (projection onto some space of interest). '
};
mod.filter = 'mat';
mod.ufilter = 'SPM.mat';
mod.num = [1 1];
mod.val = {};
% Cm
Cm = cfg_files;
Cm.tag = 'Cm';
Cm.name = 'Contrast Matrix';
Cm.help = {
'Select a contrast matrix that corresponds to the SPM.mat chosen'
};
Cm.filter = 'mat';
Cm.ufilter = 'xCon.mat';
Cm.num = [1 1];
Cm.val = {};
% Ci
Ci = cfg_entry;
Ci.strtype = 'n';
Ci.tag = 'Ci';
Ci.name = 'Contrast index';
Ci.help = {
'Select a contrast: '
'for data projection onto a subspace (removing effect of no interest'
'or selecting effect of interest) with the selection of an appropriate contrast '
'(For instance, choose a contrast that selects the block effects to remove them '
'in a further SVD analysis)'
};
% leig
leig = cfg_entry;
leig.tag = 'leig';
leig.name = 'Number of EigenImages';
leig.help = {
'Choose the number of eigenimage to be saved. '
'You can choose a small number, 5 is generally enough to start with '
'Type for example 1:5 to save the first 5 eigenimages '
'You will be given later the possibillty to compute a new set of eigenimage.'
};
leig.strtype = 'e';
leig.num = [1 Inf];
leig.val = {1:5};
% neig
neig = cfg_entry;
neig.name = 'Eigen images basename';
neig.tag = 'neig';
neig.help = {...
'Choose the base-name for the output eigen image '
'Eigenimages will be named "base-name"NNNN where NNNN '
'is the eigen image number'
};
neig.strtype = 's';
neig.num = [1 Inf];
neig.val = {'eigen'};
% UseDefImage
UseDefImage = cfg_const;
UseDefImage.tag = 'UseDefImage';
UseDefImage.name = 'Default';
UseDefImage.val = {''};
% ChooseManually
Image = cfg_files;
Image.tag = 'Image';
Image.name = 'Choose manually';
Image.help = {
'choose the functional images to work on:'
};
Image.filter = 'image';
Image.ufilter = '.*';
Image.num = [0 Inf];
Image.val = {''};
% DefImages
DefImages = cfg_choice;
DefImages.tag = 'DefImages';
DefImages.name = 'Data Image: Use default location ?';
DefImages.help = {
'Default : use images defined by SPM analysis (stored in the SPM.mat file).'
'Choose manually: to enter manually the location of images. '
};
DefImages.values = {
UseDefImage
Image
}';
DefImages.val = {};
% domain
onedomain = cfg_branch;
onedomain.tag = 'domain';
onedomain.name = 'Domain';
onedomain.val = {iod mod neig DefImages};
% subjects
domains = cfg_repeat;
domains.tag = 'domains';
domains.name = 'Domains';
domains.val = {onedomain };
domains.help = {
'Choose the number of space domains (with identical time domains) for this analysis '
'This corresponds to the number of SPM analyses that have previously '
'been done and that will be included in the multivariate computations '
'(e.g. this number is 1 for fixed effect analysis - and in fact is generally 1 ...)'
};
domains.values = {onedomain };
domains.num = [1 Inf];
% anal
anal = cfg_exbranch;
anal.tag = 'anal';
anal.name = 'MM12 Analysis';
anal.help = {
'MULTIVARIATE METHODS is a package for fMRI/PET data analysis'
'developed by the Models and Data Analysis group at SHFJ/CEA'
'Main Author : Ferath Kherif. Other : JB Poline'
'This is a ALPHA VERSION'
'Please do not distribute and redirect requests for the toolbox to'
'us. For bugs, remarks, additions, etc, please contact jb at'
'[email protected]. Some of the ideas implemented in the MM toolbox'
'have not yet been published. Please refrain from publishing the'
'original ideas that can be found here ... If you are using this'
'material for publication, please see with us how you can'
'acknowledge our work.'};
anal.val = {typeanal god Ci leig domains};
anal.prog = @MM5_prog;
anal.vout = @MM5_vout;
% MM5
MM12 = cfg_branch;
MM12.tag = 'MM12';
MM12.name = 'MM12';
MM12.val = {anal};
end
function out = MM5_prog(job)
if isfield(job.typeanal, 'pres')
MM('SVD', job);
out=job;
else
MM('MLM', job);
out=job;
end
end
function dep = MM5_vout(job)
dep = cfg_dep;
end