forked from JoramSoch/MACS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbatch_MC_LBF_group_man.m
103 lines (87 loc) · 3.52 KB
/
batch_MC_LBF_group_man.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
function module = batch_MC_LBF_group_man
% _
% Configure MATLAB Batch for "MC: calculate LBF (manually)"
%
% Author: Joram Soch, BCCN Berlin
% E-Mail: joram.soch@bccn-berlin.de
%
% First edit: 18/03/2017, 17:31 (V0.99/V15)
% Last edit: 09/03/2018, 10:25 (V1.2/V18)
%=========================================================================%
% F I E L D S %
%=========================================================================%
% Directory
%-------------------------------------------------------------------------%
dir = cfg_files;
dir.tag = 'dir';
dir.name = 'Directory';
dir.help = {'Select the directory into which the LBF images will be saved.'};
dir.filter = 'dir';
dir.ufilter = '.*';
dir.num = [1 1];
% Models
%--------------------------------------------------------------------------
models = cfg_files;
models.tag = 'models';
models.name = 'Model';
models.help = {'Select the log model evidence map for this GLM in this subject.'
'Models should be specfied in the same order for each subject.'};
models.filter = 'image';
models.ufilter = '.*';
models.num = [1 1];
% Subjects
%--------------------------------------------------------------------------
subjects = cfg_repeat;
subjects.tag = 'subjects';
subjects.name = 'Subject';
subjects.help = {'Select the log model evidence maps of the GLMs for this subject.'
'Models should be specfied in the same order for each subject.'};
subjects.values = {models};
subjects.num = [2 2];
% Select LME maps
%-------------------------------------------------------------------------%
LME_maps = cfg_repeat;
LME_maps.tag = 'LME_maps';
LME_maps.name = 'Select LME maps';
LME_maps.help = {'Select the log model evidence map for each subject and model.'};
LME_maps.values = {subjects};
LME_maps.num = [1 Inf];
% Names
%-------------------------------------------------------------------------%
names = cfg_entry;
names.tag = 'names';
names.name = 'Name';
names.help = {'Enter the name of this GLM.'};
names.strtype = 's';
names.num = [1 Inf];
names.val = {'GLM_'};
% Enter GLM names
%--------------------------------------------------------------------------
GLM_names = cfg_repeat;
GLM_names.tag = 'GLM_names';
GLM_names.name = 'Enter GLM names';
GLM_names.help = {'Enter a name for each model.'}';
GLM_names.values = {names};
GLM_names.num = [2 2];
%=========================================================================%
% M O D U L E %
%=========================================================================%
% MC: LBF group (man)
%-------------------------------------------------------------------------%
module = cfg_exbranch;
module.tag = 'MC_LBF_group_man';
module.name = 'MC: calculate LBF (manually)';
module.val = {dir LME_maps GLM_names};
module.help = {'Log Bayes Factors for General Linear Models'
'Type "help MC_LBF_group" or "help ME_BMS_FFX" for help.'};
module.prog = @run_module;
%=========================================================================%
% F U N C T I O N S %
%=========================================================================%
% Run batch
%-------------------------------------------------------------------------%
function out = run_module(job)
% execute operation
MC_LBF_group(job);
% set output files
out = [];