Skip to content

Commit 487b3b7

Browse files
committed
Script for t2 based tests finished. Consider speeding up tests
1 parent e9f30fa commit 487b3b7

File tree

6 files changed

+11
-7
lines changed

6 files changed

+11
-7
lines changed

NBS_addon/NBSstats_smn.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,6 @@
451451
flat_target_stat = flat_matrix(target_stat, STATS.mask);
452452
% Calculate p-values directly for each element in flat_target_stat
453453
pval = arrayfun(@(stat) sum(stat <= null_dist) / K, flat_target_stat);
454-
disp('Place holder')
455454

456455
case {3, 4, 5} % cNBS and SEA
457456

0 Bytes
Binary file not shown.

create_t2_test_dataset.m

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ function create_t2_test_dataset()
4040
file_name = './data/test_t2_fc.mat';
4141

4242
save(file_name, 'brain_data', 'study_info', 'outcome');
43-
44-
%% Remove this later
45-
edge_based_tests('test_t2_fc.mat')
43+
4644

4745
end

power_calculator_test_script.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
test_power_calculation_from_gt_and_data()
2727

2828
%% Create t2-test dataset
29+
create_t2_test_dataset()
30+
31+
edge_based_tests('test_t2_fc.mat')
32+
33+
network_based_tests('test_t2_fc.mat')
2934

3035

3136

test_scripts/edge_based_tests.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ function edge_based_tests(data_set_name)
55

66
Params = common_test_setup(data_set_name);
77

8-
% stat_method_cell = {'Parametric_Bonferroni', 'Parametric_FDR', 'Size', 'TFCE'};
9-
stat_method_cell = {'Parametric_Bonferroni'};
8+
stat_method_cell = {'Parametric_Bonferroni', 'Parametric_FDR', 'Size', 'TFCE'};
109

1110
Params.all_cluster_stat_types = stat_method_cell;
1211

test_scripts/network_based_tests.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
function network_based_tests(data_set_name)
22

3+
data_set = load(['./data/', data_set_name]);
4+
data_set_name = get_data_set_name(data_set);
5+
36
Params = common_test_setup(data_set_name);
47

58
stat_method_cell = {'Constrained', 'Constrained_FWER'};
@@ -13,7 +16,7 @@ function network_based_tests(data_set_name)
1316
method = stat_method_cell{i};
1417

1518
% The query is based on how the dataset is created
16-
query = {'testing', 'test_hcp', 'REST_TASK', method, 'subs_40', 'brain_data'};
19+
query = {'testing', data_set_name, 'REST_TASK', method, 'subs_40', 'brain_data'};
1720

1821
brain_data = getfield(ResData, query{:});
1922

0 commit comments

Comments
 (0)