Skip to content

Commit cf44ebd

Browse files
committed
Added atlas option for voxels
1 parent 23d7a7c commit cf44ebd

17 files changed

+77
-33
lines changed

.DS_Store

0 Bytes
Binary file not shown.
3.44 MB
Binary file not shown.
0 Bytes
Binary file not shown.

config_files/setparams.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929

3030
% Datasets - Commented for easy use
3131
% Params.data_dir = './data/s_abcd_fc_rosenblatt.mat';
32-
Params.data_dir = './data/s_hcp_fc_noble_tasks.mat';
33-
% Params.data_dir = './data/s_hcp_act_noble_1.mat';
34-
Params.output = 'test_tfce_comparions';
32+
% Params.data_dir = './data/s_hcp_fc_noble_tasks.mat';
33+
Params.data_dir = './data/s_hcp_act_noble_1.mat';
34+
Params.output = 'hcp_activation';
3535

3636
% Save specifications - if NaN output becomes dataset file name
3737
Params.save_directory = './power_calculator_results/';
@@ -56,7 +56,7 @@
5656
Params.other_scripts_dir='./NBS_benchmarking/support_scripts/';
5757

5858
%%% Resampling parameters %%%
59-
Params.parallel = true; % run stuff sequentially or in parallel
59+
Params.parallel = false; % run stuff sequentially or in parallel
6060
Params.n_workers = 5; % num parallel workers for parfor, best if # workers = # cores
6161
Params.n_repetitions = 100; % 500 recommended
6262
Params.batch_size = 25;
@@ -79,8 +79,8 @@
7979
Params.pthresh_second_level = 0.05; % FWER or FDR rate
8080
Params.tpr_dthresh = 0; % Threshold for true positives vs negatives
8181
Params.save_significance_thresh = 0.15;
82-
Params.all_cluster_stat_types = {'Exact_FC_TFCE', 'Fast_TFCE_dh1', 'Fast_TFCE_dh5', 'Fast_TFCE_dh10'};
8382
% Params.all_cluster_stat_types = {'Parametric', 'Size_cpp', 'Fast_TFCE_cpp', 'Constrained_cpp', 'Omnibus_cNBS'};
83+
Params.all_cluster_stat_types = {'Constrained_cpp', 'Omnibus_cNBS'};
8484

8585
Params.all_submethods = {'FWER', 'FDR'};
8686

create_flat_function.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
parse(p, varargin{:});
66
variable_type = p.Results.variable_type;
77

8+
% Ok, it stayed like this because of legacy code, sorry
89
switch variable_type
9-
case 'node'
10-
flat_function = @(x) x(:);
1110
otherwise
1211
flat_function = @(x) x(mask);
1312
end

file_handlers/create_edge_level_stats_in_file.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
function create_edge_level_stats_in_file(file_path, file_type, n_var, n_repetitions, edge_groups)
1+
function create_edge_level_stats_in_file(file_path, file_type, n_var, n_repetitions, edge_groups, n_networks)
22

33

44
switch file_type
55

66
case 'full_file'
77

88
edge_level_stats = NaN(n_var, n_repetitions);
9-
network_level_stats = NaN(length(unique(edge_groups)) - 1, 1);
9+
network_level_stats = NaN(n_networks, 1);
1010

1111
save(file_path, 'edge_level_stats', 'network_level_stats', '-append');
1212

1313
case 'compact_file'
1414

1515
edge_level_stats = zeros(n_var, 1);
16-
network_level_stats = zeros(length(unique(edge_groups)) - 1, 1);
16+
network_level_stats = zeros(n_networks, 1);
1717

1818
edge_mean_squared_error = zeros(n_var, 1);
19-
network_mean_squared_error = zeros(length(unique(edge_groups)) - 1, 1);
19+
network_mean_squared_error = zeros(n_networks, 1);
2020

2121
save(file_path, 'edge_level_stats', 'network_level_stats', ...
2222
'edge_mean_squared_error', 'network_mean_squared_error', '-append');

file_handlers/extract_relevant_meta_data_from_RP.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252

5353
% File related
5454
meta_data.atlas_file = RP.atlas_file;
55+
meta_data.n_networks = RP.n_networks;
5556

5657
% Sub related data - total subs and this run subs
5758
meta_data.total_n_subs_1 = RP.n_subs_1;

power_calculator_tools/.DS_Store

2 KB
Binary file not shown.

power_calculator_tools/atlas_data_set_map.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ case strcmp(data_set_choice, 'abcd_fc')
4949
atlas_file = './atlas_storage/map268_subnetwork.mat';
5050

5151
case strcmp(data_set_choice, 'hcp_act')
52-
atlas_file = NaN;
52+
atlas_file = './atlas_storage/shen_2mm_268_parcellation__in_subnetworks.nii';
5353

5454
case startsWith(data_set_choice, 'test') && endsWith(data_set_choice, 'fc')
5555
atlas_file = './atlas_storage/test_hcp_fc_atlas.mat';

power_calculator_tools/check_calculation_status.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
meta_data = create_meta_data_file(file_path, meta_data, RP, ids_sampled, existing_repetitions);
168168

169169
create_edge_level_stats_in_file(file_path, RP.subsample_file_type, ...
170-
RP.n_var, RP.n_repetitions, RP.edge_groups)
170+
RP.n_var, RP.n_repetitions, RP.edge_groups, RP.n_networks)
171171

172172
fprintf('Initialized results file with repetition IDs: %s\n', file_path);
173173
end

0 commit comments

Comments
 (0)