Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating template #148

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions cfs_properties/functions/check_properties.m
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@
anat_params = properties.anatomy_params;

% Check default template configuration
if(isequal(lower(anat_params.anatomy_type.id),'template'))
if(isequal(lower(anat_params.anatomy_type.id),'default'))
disp("--------------------------------------------------------------------------");
disp('-->> Checking template configuration');
disp('-->> Checking default configuration');
selected_anatomy = anat_params.anatomy_type;
template_name = selected_anatomy.template_name;
defaults = jsondecode(fileread(fullfile('bst_defaults','bst_default_anatomy.json')));
Expand Down Expand Up @@ -175,6 +175,23 @@
end
end
end

if(isequal(lower(anat_params.anatomy_type.id),'template'))
disp("--------------------------------------------------------------------------");
disp('-->> Checking template configuration');
selected_anatomy = anat_params.anatomy_type;
template_name = selected_anatomy.template_name;
subjects = dir(selected_anatomy.base_path);
if(~contains(template_name, {subjects.name}))
fprintf(2,strcat('\nBC-V-->> Error: The selected template name in process_import_anat.json is wrong \n'));
disp(strcat("Name: ",template_name));
disp(strcat("Please check the available anatomy templates in bst_template/bst_default_anatomy.json file"));
status = false;
disp('-->> Process stopped!!!');
return;
end
end

% Check MRI transform configuration
mri_transform = anat_params.common_params.mri_transformation;
if(mri_transform.use_transformation)
Expand Down Expand Up @@ -314,7 +331,7 @@
end
end

%% Joinning rejected subjects

Check failure on line 334 in cfs_properties/functions/check_properties.m

View workflow job for this annotation

GitHub Actions / Check for spelling errors

Joinning ==> Joining
for i=1:length(reject_anat)
reject_subjects(end+1).SubID = reject_anat{i};
reject_subjects(end).Status = "Rejected";
Expand Down
2 changes: 1 addition & 1 deletion cfs_properties/general_params.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "description":"", "modality":"EEG", "dataset":{ "Name":"CHBMP", "Description":"ICBM152" }, "bst_config":{ "description":"", "protocol_name":"HeadModel_CHBMP", "reset_protocol":false, "bst_path":"/mnt/Develop/Tools/brainstorm3", "db_path":"local", "after_MaQC":{ "run":false } }, "output_path":"/mnt/Data/Data_report/Test", "tmp_path":"local"}
{ "description":"", "modality":"EEG", "dataset":{ "Name":"CHBMP", "Description":"ICBM152" }, "bst_config":{ "description":"", "protocol_name":"HeadModel_CHBMP", "reset_protocol":false, "bst_path":"/mnt/Develop/Tools/brainstorm3", "db_path":"local", "after_MaQC":{ "run":false } }, "output_path":"/mnt/Data/Talia/MIITRA", "tmp_path":"local"}
Expand Down
2 changes: 1 addition & 1 deletion cfs_properties/process_import_anat.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "description":"", "anatomy_type":{ "description":"Select the type of anatomy to use. <<template>> Brainstorm default anatomy. <<individual>> HCP individual anatomy", "type":"default", "type_list":[ { "id":"default", "name":"default_anatomy", "description":"Select the Brainstorm anatomy template. See app/bst_default_anatomy.json file and select all params from there", "template_name":"ICBM152_2023b", "default_atlas":"Desikan-Killiany" },{ "id":"individual", "name":"hcp_anat_individual", "description":"HCP individual anatomy", "base_path":"/mnt/Data/Data_report/CHBMP_EEG_and_MRI/ds_bids_cbm_loris_24_11_21/derivatives/ciftify", "T1w_file_name":"T1w.nii.gz", "Atlas_file_name":"aparc.a2009s+aseg.nii.gz" },{ "id":"template", "name":"hcp_anat_template", "description":"HCP anatomy to use as template for EEG dataset", "base_path":"/mnt/Data/Data_report/CHBMP_EEG_and_MRI/ds_bids_cbm_loris_24_11_21/derivatives/ciftify-ICBM152", "template_name":"ICBM152", "T1w_file_name":"T1w.nii.gz", "Atlas_file_name":"aparc.a2009s+aseg.nii.gz" } ] }, "common_params":{ "mri_transformation":{ "use_transformation":false, "base_path":"/mnt/Store/Data/Conectome/Sample", "file_name":"meg/SubID/MEG/anatomy/SubID_MEG_anatomy_transform.txt" }, "non_brain_surfaces":{ "description":"FSL Bet command output", "base_path":"/mnt/Data/Data_report/CHBMP_EEG_and_MRI/ds_bids_cbm_loris_24_11_21/derivatives/fsl_bet-ICBM152" }, "layer_desc":{ "description":"Layer descriptor. Options <<white>> OR <<midthickness>> OR <<pial>> OR <<bigbrain>> multilayer like bigbrain OR <<fs_LR>> like HCP FSAve (three layers).", "desc":"Midthickness" }, "surfaces_resolution":{ "description":"Numbers of vertices for downsample the surfaces: default <<8000>>", "nvertices":8000 } }}
{ "description":"", "anatomy_type":{ "description":"Select the type of anatomy to use. <<template>> Brainstorm default anatomy. <<individual>> HCP individual anatomy", "type":"template", "type_list":[ { "id":"default", "name":"default_anatomy", "description":"Select the Brainstorm anatomy template. See app/bst_default_anatomy.json file and select all params from there", "template_name":"ICBM152_2023b", "default_atlas":"Desikan-Killiany" },{ "id":"individual", "name":"hcp_anat_individual", "description":"HCP individual anatomy", "base_path":"/mnt/Data/Data_report/CHBMP_EEG_and_MRI/ds_bids_cbm_loris_24_11_21/derivatives/ciftify", "T1w_file_name":"T1w.nii.gz", "Atlas_file_name":"aparc.a2009s+aseg.nii.gz" },{ "id":"template", "name":"hcp_anat_template", "description":"HCP anatomy to use as template for EEG dataset", "base_path":"/mnt/Data/Talia/MIITRA/ciftify", "template_name":"MIITRA", "T1w_file_name":"T1w.nii.gz", "Atlas_file_name":"aparc.a2009s+aseg.nii.gz" } ] }, "common_params":{ "mri_transformation":{ "use_transformation":false, "base_path":"/mnt/Store/Data/Conectome/Sample", "file_name":"meg/SubID/MEG/anatomy/SubID_MEG_anatomy_transform.txt" }, "non_brain_surfaces":{ "description":"FSL Bet command output", "base_path":"/mnt/Data/Talia/MIITRA/bet" }, "layer_desc":{ "description":"Layer descriptor. Options <<white>> OR <<midthickness>> OR <<pial>> OR <<bigbrain>> multilayer like bigbrain OR <<fs_LR>> like HCP FSAve (three layers).", "desc":"Midthickness" }, "surfaces_resolution":{ "description":"Numbers of vertices for downsample the surfaces: default <<8000>>", "nvertices":8000 } }}
Expand Down
Loading