-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathN6_5_2_Striatify_FC_SST.m
107 lines (72 loc) · 5.83 KB
/
N6_5_2_Striatify_FC_SST.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
clear;clc
load('/share/inspurStorage/home1/xic_fdu/project/IAMGEN_Develop_diagnostic_0814/Trans_diagnostic_p_facotr/A2_2_1_3_make_mask_specific.mat')
load('/share/inspurStorage/home1/ISTBI_data/IMAGEN_Stratify/SPM/Striatify_Match_SST_CONN.mat');
across = TableS7.TableS7_1_Across;
name = {'SST_stopsucc';'SST_stopfail'};
% Striatify_SST_stop_suces = cat(3,site1.Striatify_SST_stop_suces,site2.Striatify_SST_stop_suces);
% Striatify_SST_stop_failure = cat(3,site1.Striatify_SST_stop_failure,site2.Striatify_SST_stop_failure);
% Striatify_SST_subject = [site1.Striatify_SST_subject;site2.Striatify_SST_subject];
sst_Data{1} = reshape(Striatify_SST_stop_suces,[],size(Striatify_SST_stop_suces,3));
sst_Data{2} = reshape(Striatify_SST_stop_failure,[],size(Striatify_SST_stop_failure,3));
Across_FC = table;
Across_FC.name = name;
Across_FC_mat = table;
Across_FC_mat.name = name;
for j=1:2
dat = sst_Data{j}';
eval(['oppo_ind = unique([across.',[name{j},'_ind'],'{8,1}','; across.',[name{j},'_ind'],'{9,1};', ...
'across.',[name{j},'_ind'],'{10,1}','; across.',[name{j},'_ind'],'{11,1}]);']);
eval( ['Across_FC.ex_pp_only_ind{j,1} = setdiff(across.',[name{j},'_ind'],'{2,1},oppo_ind);'] );
eval( ['Across_FC.ex_nn_only_ind{j,1} = setdiff(across.',[name{j},'_ind'],'{3,1},oppo_ind);'] );
eval( ['Across_FC.in_pp_only_ind{j,1} = setdiff(across.',[name{j},'_ind'],'{5,1},oppo_ind);'] );
eval( ['Across_FC.in_nn_only_ind{j,1} = setdiff(across.',[name{j},'_ind'],'{6,1},oppo_ind);'] );
eval( ['Across_FC.oppo_pn_ind{j,1} = across.',[name{j},'_ind'],'{8,1};'] );
eval( ['Across_FC.oppo_np_ind{j,1} = across.',[name{j},'_ind'],'{9,1};'] );
eval( ['Across_FC.oppo_pp_ind{j,1} = across.',[name{j},'_ind'],'{10,1};'] );
eval( ['Across_FC.oppo_nn_ind{j,1} = across.',[name{j},'_ind'],'{11,1};'] );
% Cotrol
eval('Across_FC.ex_pp_only_FC_sum{j} = sum(dat(:,Across_FC.ex_pp_only_ind{j,1}),2);');
eval('Across_FC.ex_nn_only_FC_sum{j} = sum(dat(:,Across_FC.ex_nn_only_ind{j,1}),2);');
eval('Across_FC.in_pp_only_FC_sum{j} = sum(dat(:,Across_FC.in_pp_only_ind{j,1}),2);');
eval('Across_FC.in_nn_only_FC_sum{j} = sum(dat(:,Across_FC.in_nn_only_ind{j,1}),2);');
eval('Across_FC.oppo_pn_FC_sum{j} = sum(dat(:,Across_FC.oppo_pn_ind{j,1}),2);');
eval('Across_FC.oppo_pp_FC_sum{j} = sum(dat(:,Across_FC.oppo_pp_ind{j,1}),2);');
eval('Across_FC.oppo_np_FC_sum{j} = sum(dat(:,Across_FC.oppo_np_ind{j,1}),2);');
eval('Across_FC.oppo_nn_FC_sum{j} = sum(dat(:,Across_FC.oppo_nn_ind{j,1}),2);');
eval('Across_FC.ex_pp_only_FC_sum{j} = sum(dat(:,Across_FC.ex_pp_only_ind{j,1}),2);');
eval('Across_FC.ex_nn_only_FC_sum{j} = sum(dat(:,Across_FC.ex_nn_only_ind{j,1}),2);');
eval('Across_FC.in_pp_only_FC_sum{j} = sum(dat(:,Across_FC.in_pp_only_ind{j,1}),2);');
eval('Across_FC.in_nn_only_FC_sum{j} = sum(dat(:,Across_FC.in_nn_only_ind{j,1}),2);');
eval('Across_FC.oppo_pn_FC_sum{j} = sum(dat(:,Across_FC.oppo_pn_ind{j,1}),2);');
eval('Across_FC.oppo_pp_FC_sum{j} = sum(dat(:,Across_FC.oppo_pp_ind{j,1}),2);');
eval('Across_FC.oppo_np_FC_sum{j} = sum(dat(:,Across_FC.oppo_np_ind{j,1}),2);');
eval('Across_FC.oppo_nn_FC_sum{j} = sum(dat(:,Across_FC.oppo_nn_ind{j,1}),2);');
% Control Data
eval('Across_FC_mat.ex_pp_only_FC{j} = (dat(:,Across_FC.ex_pp_only_ind{j,1}));');
eval('Across_FC_mat.ex_nn_only_FC{j} = (dat(:,Across_FC.ex_nn_only_ind{j,1}));');
eval('Across_FC_mat.in_pp_only_FC{j} = (dat(:,Across_FC.in_pp_only_ind{j,1}));');
eval('Across_FC_mat.in_nn_only_FC{j} = (dat(:,Across_FC.in_nn_only_ind{j,1}));');
eval('Across_FC_mat.oppo_pn_FC{j} = (dat(:,Across_FC.oppo_pn_ind{j,1}));');
eval('Across_FC_mat.oppo_pp_FC{j} = (dat(:,Across_FC.oppo_pp_ind{j,1}));');
eval('Across_FC_mat.oppo_np_FC{j} = (dat(:,Across_FC.oppo_np_ind{j,1}));');
eval('Across_FC_mat.oppo_nn_FC{j} = (dat(:,Across_FC.oppo_nn_ind{j,1}));');
eval('Across_FC_mat.ex_pp_only_FC{j} = (dat(:,Across_FC.ex_pp_only_ind{j,1}));');
eval('Across_FC_mat.ex_nn_only_FC{j} = (dat(:,Across_FC.ex_nn_only_ind{j,1}));');
eval('Across_FC_mat.in_pp_only_FC{j} = (dat(:,Across_FC.in_pp_only_ind{j,1}));');
eval('Across_FC_mat.in_nn_only_FC{j} = (dat(:,Across_FC.in_nn_only_ind{j,1}));');
eval('Across_FC_mat.oppo_pn_FC{j} = (dat(:,Across_FC.oppo_pn_ind{j,1}));');
eval('Across_FC_mat.oppo_pp_FC{j} = (dat(:,Across_FC.oppo_pp_ind{j,1}));');
eval('Across_FC_mat.oppo_np_FC{j} = (dat(:,Across_FC.oppo_np_ind{j,1}));');
eval('Across_FC_mat.oppo_nn_FC{j} = (dat(:,Across_FC.oppo_nn_ind{j,1}));');
end
Striatify_FC_SST = table;
Striatify_FC_SST.subID = Striatify_SST_subject;
Striatify_FC_SST.ex_pp = sum(cell2mat(Across_FC.ex_pp_only_FC_sum'),2);
Striatify_FC_SST.ex_nn = sum(cell2mat(Across_FC.ex_nn_only_FC_sum'),2);
Striatify_FC_SST.in_pp = sum(cell2mat(Across_FC.in_pp_only_FC_sum'),2);
Striatify_FC_SST.in_nn = sum(cell2mat(Across_FC.in_nn_only_FC_sum'),2);
Striatify_FC_SST.oppo_pp = sum(cell2mat(Across_FC.oppo_pp_FC_sum'),2);
Striatify_FC_SST.oppo_pn = sum(cell2mat(Across_FC.oppo_pn_FC_sum'),2);
Striatify_FC_SST.oppo_np = sum(cell2mat(Across_FC.oppo_np_FC_sum'),2);
Striatify_FC_SST.oppo_nn = sum(cell2mat(Across_FC.oppo_nn_FC_sum'),2);
save N5_3_2_2_Striatify_FC_SST_v3.mat Striatify_FC_SST Across_FC_mat