diff --git a/+bids/+internal/list_all_trial_types.m b/+bids/+internal/list_all_trial_types.m index 594e143b..7b12f0a1 100644 --- a/+bids/+internal/list_all_trial_types.m +++ b/+bids/+internal/list_all_trial_types.m @@ -54,6 +54,8 @@ trial_type_list = {}; + BIDS = bids.layout(BIDS, 'index_dependencies', false); + event_files = bids.query(BIDS, 'data', ... 'suffix', 'events', ... 'extension', '.tsv', ... diff --git a/+bids/diagnostic.m b/+bids/diagnostic.m index f1c20313..c2f70a76 100644 --- a/+bids/diagnostic.m +++ b/+bids/diagnostic.m @@ -78,7 +78,8 @@ parse(args, varargin{:}); %% - BIDS = bids.layout(args.Results.BIDS, 'use_schema', args.Results.use_schema); + BIDS = bids.layout(args.Results.BIDS, 'use_schema', args.Results.use_schema, ... + 'index_dependencies', false); output_path = args.Results.output_path; diff --git a/tests/test_diagnostic.m b/tests/test_diagnostic.m index 697d81b3..80eca978 100644 --- a/tests/test_diagnostic.m +++ b/tests/test_diagnostic.m @@ -19,7 +19,7 @@ function test_diagnostic_basic() for i = 1:size(examples, 1) - BIDS = bids.layout(deblank(examples(i, :))); + BIDS = bids.layout(deblank(examples(i, :)), 'index_dependencies', false); diagnostic_table = bids.diagnostic(BIDS, 'output_path', pwd); diagnostic_table = bids.diagnostic(BIDS, 'split_by', {'suffix'}, 'output_path', pwd); diff --git a/tests/test_report.m b/tests/test_report.m index a4ca04b5..99540620 100644 --- a/tests/test_report.m +++ b/tests/test_report.m @@ -14,7 +14,7 @@ function test_report_asl() BIDS = fullfile(cfg.pth_bids_example, datasets); - BIDS = bids.layout(BIDS, 'use_schema', true); + BIDS = bids.layout(BIDS, 'use_schema', true, 'index_dependencies', false); filter.modality = 'perf'; @@ -46,7 +46,7 @@ function test_report_basic() for i = 1:numel(datasets) BIDS = fullfile(cfg.pth_bids_example, datasets{i}); - BIDS = bids.layout(BIDS, 'use_schema', true); + BIDS = bids.layout(BIDS, 'use_schema', true, 'index_dependencies', false); for j = 1:numel(modalities) @@ -81,7 +81,7 @@ function test_report_pet() BIDS = fullfile(cfg.pth_bids_example, datasets); - BIDS = bids.layout(BIDS, 'use_schema', true); + BIDS = bids.layout(BIDS, 'use_schema', true, 'index_dependencies', false); filter.modality = 'pet'; @@ -120,7 +120,7 @@ function test_report_moae_data() 'verbose', true, ... 'delete_previous', false); - BIDS = bids.layout(pth, 'use_schema', true); + BIDS = bids.layout(pth, 'use_schema', true, 'index_dependencies', false); report = bids.report(BIDS, ... 'output_path', cfg.output_path, ... diff --git a/tests/tests_layout/test_layout.m b/tests/tests_layout/test_layout.m index fe48199b..65cff4f3 100644 --- a/tests/tests_layout/test_layout.m +++ b/tests/tests_layout/test_layout.m @@ -61,6 +61,7 @@ function test_layout_filter() BIDS = bids.layout(fullfile(get_test_data_dir(), '7t_trt'), ... 'verbose', verbose, ... + 'index_dependencies', false, ... 'filter', struct('sub', {{'01', '02'}}, ... 'modality', {{'anat', 'func'}}, ... 'ses', {{'1', '2'}})); @@ -82,6 +83,7 @@ function test_layout_filter_regex() BIDS = bids.layout(fullfile(get_test_data_dir(), '7t_trt'), ... 'verbose', verbose, ... + 'index_dependencies', false, ... 'filter', struct('sub', {{'^.*0[12]'}}, ... 'modality', {{'anat', 'func'}}, ... 'ses', {{'[1]'}})); @@ -96,13 +98,3 @@ function test_layout_filter_regex() assertEqual(subjects, {'1'}); end - -function test_layout_smoke_test() - - verbose = false; - - BIDS = bids.layout(fullfile(get_test_data_dir(), 'genetics_ukbb'), 'verbose', verbose); - - BIDS = bids.layout(fullfile(get_test_data_dir(), 'ds210'), 'verbose', verbose); - -end diff --git a/tests/tests_layout/test_layout_derivatives.m b/tests/tests_layout/test_layout_derivatives.m index 8bc4970c..ad024bf2 100644 --- a/tests/tests_layout/test_layout_derivatives.m +++ b/tests/tests_layout/test_layout_derivatives.m @@ -6,24 +6,6 @@ initTestSuite; end -function test_layout_warning_invalid_subfolder_struct_fieldname() - - % https://github.com/bids-standard/bids-matlab/issues/332 - - invalid_subfolder = fullfile(get_test_data_dir(), '..', ... - 'data', 'synthetic', 'derivatives', 'invalid_subfolder'); - - if bids.internal.is_octave() - moxunit_throw_test_skipped_exception('Octave:mixed-string-concat warning thrown'); - end - - assertWarning(@()bids.layout(invalid_subfolder, ... - 'use_schema', false, ... - 'verbose', true), ... - 'layout:invalidSubfolderName'); - -end - function test_layout_nested() pth_bids_example = get_test_data_dir(); @@ -41,7 +23,8 @@ function test_layout_nested() for i = 1:numel(dataset_to_test) BIDS = bids.layout(fullfile(pth_bids_example, dataset_to_test{i}), ... 'use_schema', true, 'tolerant', false, ... - 'index_derivatives', true); + 'index_derivatives', true, ... + 'index_dependencies', false); fprintf(1, '.'); end @@ -55,7 +38,8 @@ function test_layout_meg_derivatives() 'ds000117', ... 'derivatives', ... 'meg_derivatives'), ... - 'use_schema', false); + 'use_schema', false, ... + 'index_dependencies', false); modalities = {'meg'}; assertEqual(bids.query(BIDS, 'modalities'), modalities); @@ -80,6 +64,7 @@ function test_layout_prefix() 'swuasub-01_acq-anat_TB1TFL.nii.gz')); BIDS = bids.layout(fullfile(pth_bids_example, 'qmri_tb1tfl'), ... + 'index_dependencies', false, ... 'use_schema', false); data = bids.query(BIDS, 'data', ... @@ -99,8 +84,8 @@ function test_layout_schemaless() pth_bids_example = get_test_data_dir(); - BIDS = bids.layout(fullfile(pth_bids_example, ... - 'ds000001-fmriprep'), ... + BIDS = bids.layout(fullfile(pth_bids_example, 'ds000001-fmriprep'), ... + 'index_dependencies', false, ... 'use_schema', false); modalities = {'anat', 'figures', 'func'}; @@ -132,3 +117,21 @@ function test_layout_schemaless() '_space-MNI152NLin6Asym_desc-smoothAROMAnonaggr_bold.nii'] }); end + +function test_layout_warning_invalid_subfolder_struct_fieldname() + + % https://github.com/bids-standard/bids-matlab/issues/332 + + invalid_subfolder = fullfile(get_test_data_dir(), '..', ... + 'data', 'synthetic', 'derivatives', 'invalid_subfolder'); + + if bids.internal.is_octave() + moxunit_throw_test_skipped_exception('Octave:mixed-string-concat warning thrown'); + end + + assertWarning(@()bids.layout(invalid_subfolder, ... + 'use_schema', false, ... + 'verbose', true), ... + 'layout:invalidSubfolderName'); + +end diff --git a/tests/tests_layout/test_layout_schemaless.m b/tests/tests_layout/test_layout_schemaless.m index aca7e848..829886b7 100644 --- a/tests/tests_layout/test_layout_schemaless.m +++ b/tests/tests_layout/test_layout_schemaless.m @@ -23,6 +23,7 @@ function test_layout_no_schema_no_ses_in_filename() BIDS = bids.layout(bids_dir, ... 'verbose', verbose, ... + 'index_dependencies', false, ... 'use_schema', true, ... 'filter', filter); @@ -31,6 +32,7 @@ function test_layout_no_schema_no_ses_in_filename() BIDS = bids.layout(bids_dir, ... 'verbose', verbose, ... + 'index_dependencies', false, ... 'use_schema', false, ... 'filter', filter); diff --git a/tests/tests_private/test_append_to_layout.m b/tests/tests_private/test_append_to_layout.m index 26b0d1a6..95c68b88 100644 --- a/tests/tests_private/test_append_to_layout.m +++ b/tests/tests_private/test_append_to_layout.m @@ -32,8 +32,7 @@ function test_append_to_layout_schema_unknown_entity() file = 'sub-16_task-bar_foo-bar_meg.ds'; - assertWarning( ... - @()bids.internal.append_to_layout(file, subject, modality, schema, previous), ... + assertWarning(@()bids.internal.append_to_layout(file, subject, modality, schema, previous), ... 'append_to_layout:unknownEntity'); end @@ -61,8 +60,7 @@ function test_append_to_layout_basic() file = 'sub-16_ses-mri_run-1_acq-hd_T1w.nii.gz'; subject = bids.internal.append_to_layout(file, subject, modality, schema, previous); - expected.anat = struct( ... - 'filename', 'sub-16_ses-mri_run-1_acq-hd_T1w.nii.gz', ... + expected.anat = struct('filename', 'sub-16_ses-mri_run-1_acq-hd_T1w.nii.gz', ... 'suffix', 'T1w', ... 'ext', '.nii.gz', ... 'prefix', '', ... @@ -114,8 +112,7 @@ function test_append_to_structure_basic_test() subject = bids.internal.append_to_layout(file, subject, ... modality, schema, previous); - expected.anat(1, 1) = struct( ... - 'filename', 'sub-16_ses-mri_run-1_acq-hd_T1w.nii.gz', ... + expected.anat(1, 1) = struct('filename', 'sub-16_ses-mri_run-1_acq-hd_T1w.nii.gz', ... 'suffix', 'T1w', ... 'ext', '.nii.gz', ... 'prefix', '', ... @@ -203,8 +200,7 @@ function test_append_to_layout_schemaless() schema = bids.Schema(use_schema); schema.verbose = true; - subject = struct( ... - modality, struct([]), ... + subject = struct(modality, struct([]), ... 'path', fullfile(pwd, 'sub-01')); previous = struct('group', struct('index', 0, 'base', '', 'len', 1), ... diff --git a/tests/tests_query/test_bids_query.m b/tests/tests_query/test_bids_query.m index 27d93437..913e9136 100644 --- a/tests/tests_query/test_bids_query.m +++ b/tests/tests_query/test_bids_query.m @@ -8,7 +8,8 @@ function test_query_phenotype() - BIDS = bids.layout(fullfile(get_test_data_dir(), 'pet002')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'pet002'), ... + 'index_dependencies', false); phenotype = bids.query(BIDS, 'phenotype'); @@ -32,11 +33,13 @@ function test_query_phenotype() function test_query_participants() - BIDS = bids.layout(fullfile(get_test_data_dir(), 'pet002')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'pet002'), ... + 'index_dependencies', false); participants = bids.query(BIDS, 'participants'); - BIDS = bids.layout(fullfile(get_test_data_dir(), 'asl001')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'asl001'), ... + 'index_dependencies', false); participants = bids.query(BIDS, 'participants'); @@ -44,7 +47,8 @@ function test_query_participants() function test_query_impossible_suffix_should_return_empty() - BIDS = bids.layout(fullfile(get_test_data_dir(), 'synthetic')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'synthetic'), ... + 'index_dependencies', false); % no suffix bold in anat filter = struct('sub', '01', ... @@ -60,12 +64,14 @@ function test_query_impossible_suffix_should_return_empty() function test_query_suffixes() - BIDS = bids.layout(fullfile(get_test_data_dir(), 'pet002')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'pet002'), ... + 'index_dependencies', false); suffixes = {'T1w', 'pet'}; assertEqual(bids.query(BIDS, 'suffixes'), suffixes); - BIDS = bids.layout(fullfile(get_test_data_dir(), 'synthetic')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'synthetic'), ... + 'index_dependencies', false); suffixes = {'T1w'}; assertEqual(bids.query(BIDS, 'suffixes', 'modality', 'anat'), suffixes); @@ -74,7 +80,8 @@ function test_query_suffixes() function test_query_subjects() - BIDS = bids.layout(fullfile(get_test_data_dir(), 'ieeg_visual')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'ieeg_visual'), ... + 'index_dependencies', false); subjs = arrayfun(@(x) sprintf('%02d', x), 1:2, 'UniformOutput', false); assertEqual(bids.query(BIDS, 'subjects'), subjs); @@ -95,7 +102,8 @@ function test_query_regex_subjects_no_regex_by_default() % end - BIDS = bids.layout(fullfile(get_test_data_dir(), '..', 'data', 'synthetic')); + BIDS = bids.layout(fullfile(get_test_data_dir(), '..', 'data', 'synthetic'), ... + 'index_dependencies', false); data = bids.query(BIDS, 'subjects', 'sub', '01'); @@ -109,7 +117,8 @@ function test_query_regex_subjects_no_regex_by_default() function test_query_regex_subjects() - BIDS = bids.layout(fullfile(get_test_data_dir(), 'ds000247')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'ds000247'), ... + 'index_dependencies', false); data = bids.query(BIDS, 'data', 'sub', '.*', 'suffix', 'T1w'); @@ -123,7 +132,8 @@ function test_query_regex_subjects() function test_query_with_indices() - BIDS = bids.layout(fullfile(get_test_data_dir(), 'ds105')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'ds105'), ... + 'index_dependencies', false); data_1 = bids.query(BIDS, 'data', 'sub', '1', 'run', {3, 5, '7', '01'}, 'suffix', 'bold'); data_2 = bids.query(BIDS, 'data', 'sub', '1', 'run', 1:2:7, 'suffix', 'bold'); @@ -134,7 +144,8 @@ function test_query_with_indices() function test_query_entities() - BIDS = bids.layout(fullfile(get_test_data_dir(), 'qmri_qsm')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'qmri_qsm'), ... + 'index_dependencies', false); entities = bids.query(BIDS, 'entities'); @@ -144,7 +155,8 @@ function test_query_entities() assertEqual(entities, expected); %% - BIDS = bids.layout(fullfile(get_test_data_dir(), 'pet002')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'pet002'), ... + 'index_dependencies', false); entities = bids.query(BIDS, 'entities', 'suffix', 'pet'); @@ -157,7 +169,8 @@ function test_query_entities() function test_query_events_tsv_in_root() - BIDS = bids.layout(fullfile(get_test_data_dir(), 'synthetic')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'synthetic'), ... + 'index_dependencies', false); data = bids.query(BIDS, 'data', 'sub', '01', 'ses', '01', 'task', 'nback', 'suffix', 'events'); @@ -170,7 +183,8 @@ function test_query_events_tsv_in_root() function test_query_exclude_entity() - BIDS = bids.layout(fullfile(get_test_data_dir(), 'ds000246')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'ds000246'), ... + 'index_dependencies', false); filter = struct('sub', '0001'); assertEqual(bids.query(BIDS, 'modalities', filter), {'anat', 'meg'}); @@ -189,7 +203,8 @@ function test_query_exclude_entity() function test_query_basic() - BIDS = bids.layout(fullfile(get_test_data_dir(), 'pet005')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'pet005'), ... + 'index_dependencies', false); tasks = {'eyes'}; assertEqual(bids.query(BIDS, 'tasks'), tasks); @@ -204,7 +219,8 @@ function test_query_basic() function test_query_data_filter() - BIDS = bids.layout(fullfile(get_test_data_dir(), 'pet005')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'pet005'), ... + 'index_dependencies', false); % make sure that query can work with filter filters = {'sub', {'01'}; ... @@ -225,7 +241,8 @@ function test_query_data_filter() function test_query_extension() - BIDS = bids.layout(fullfile(get_test_data_dir(), 'qmri_tb1tfl')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'qmri_tb1tfl'), ... + 'index_dependencies', false); extensions = bids.query(BIDS, 'extensions'); @@ -244,7 +261,8 @@ function test_query_extension() function test_query_metadata() - BIDS = bids.layout(fullfile(get_test_data_dir(), 'qmri_tb1tfl')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'qmri_tb1tfl'), ... + 'index_dependencies', false); md = bids.query(BIDS, 'metadata', ... 'sub', '01', ... @@ -258,7 +276,8 @@ function test_query_metadata() function test_query_modalities() - BIDS = bids.layout(fullfile(get_test_data_dir(), 'pet002')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'pet002'), ... + 'index_dependencies', false); modalities = {'anat', 'pet'}; @@ -270,7 +289,8 @@ function test_query_modalities() function test_query_tsv_content() - BIDS = bids.layout(fullfile(get_test_data_dir(), 'eeg_ds003645s_hed_inheritance')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'eeg_ds003645s_hed_inheritance'), ... + 'index_dependencies', false); tsv_content = bids.query(BIDS, 'tsv_content', 'suffix', 'events'); @@ -291,7 +311,8 @@ function test_query_tsv_content() function test_query_tsv_content_error() - BIDS = bids.layout(fullfile(get_test_data_dir(), 'qmri_tb1tfl')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'qmri_tb1tfl'), ... + 'index_dependencies', false); assertExceptionThrown(@()bids.query(BIDS, 'tsv_content', 'extension', '.nii.gz'), ... 'query:notJustTsvFiles'); @@ -299,7 +320,8 @@ function test_query_tsv_content_error() function test_query_sessions() - BIDS = bids.layout(fullfile(get_test_data_dir(), 'synthetic')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'synthetic'), ... + 'index_dependencies', false); sessions = {'01', '02'}; assertEqual(bids.query(BIDS, 'sessions'), sessions); assertEqual(bids.query(BIDS, 'sessions', 'sub', '02'), sessions); @@ -312,7 +334,8 @@ function test_query_sessions() function test_query_sessions_tsv() - BIDS = bids.layout(fullfile(get_test_data_dir(), 'synthetic')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'synthetic'), ... + 'index_dependencies', false); suffixes = bids.query(BIDS, 'suffixes'); assert(ismember('sessions', suffixes)); @@ -354,7 +377,8 @@ function test_query_sessions_tsv() function test_query_scans_tsv() - BIDS = bids.layout(fullfile(get_test_data_dir(), 'motion_spotrotation')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'motion_spotrotation'), ... + 'index_dependencies', false); suffixes = bids.query(BIDS, 'suffixes'); assert(ismember('scans', suffixes)); diff --git a/tests/tests_query/test_bids_query_asl.m b/tests/tests_query/test_bids_query_asl.m index d1eb644f..7dd29e38 100644 --- a/tests/tests_query/test_bids_query_asl.m +++ b/tests/tests_query/test_bids_query_asl.m @@ -35,7 +35,8 @@ function test_bids_query_asl_basic_asl002() function test_bids_query_asl_basic_asl001() - BIDS = bids.layout(fullfile(get_test_data_dir(), 'asl001')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'asl001'), ... + 'index_dependencies', false); modalities = {'anat', 'perf'}; assertEqual(bids.query(BIDS, 'modalities'), modalities); @@ -64,7 +65,8 @@ function test_bids_query_asl_basic_asl001() function test_bids_query_asl_basic_asl003() - BIDS = bids.layout(fullfile(get_test_data_dir(), 'asl003')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'asl003'), ... + 'index_dependencies', false); modalities = {'anat', 'perf'}; assertEqual(bids.query(BIDS, 'modalities'), modalities); diff --git a/tests/tests_query/test_bids_query_derivatives.m b/tests/tests_query/test_bids_query_derivatives.m index f22d6279..f61c857b 100644 --- a/tests/tests_query/test_bids_query_derivatives.m +++ b/tests/tests_query/test_bids_query_derivatives.m @@ -9,6 +9,7 @@ function test_bids_query_derivatives_basic() BIDS = bids.layout(fullfile(get_test_data_dir(), 'ds000001-fmriprep'), ... + 'index_dependencies', false, ... 'use_schema', false); spaces = bids.query(BIDS, 'spaces'); diff --git a/tests/tests_query/test_bids_query_dwi.m b/tests/tests_query/test_bids_query_dwi.m index 4e8fc39b..1ccea623 100644 --- a/tests/tests_query/test_bids_query_dwi.m +++ b/tests/tests_query/test_bids_query_dwi.m @@ -11,7 +11,8 @@ function test_bids_query_dwi_basic() % dwi queries % %% - BIDS = bids.layout(fullfile(get_test_data_dir(), 'eeg_rest_fmri')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'eeg_rest_fmri'), ... + 'index_dependencies', false); modalities = {'anat', 'dwi', 'eeg', 'func'}; assertEqual(bids.query(BIDS, 'modalities'), modalities); diff --git a/tests/tests_query/test_bids_query_eeg.m b/tests/tests_query/test_bids_query_eeg.m index cc480d8d..cc66e1aa 100644 --- a/tests/tests_query/test_bids_query_eeg.m +++ b/tests/tests_query/test_bids_query_eeg.m @@ -12,7 +12,8 @@ function test_bids_query_eeg_basic_1() % %% - BIDS = bids.layout(fullfile(get_test_data_dir, 'eeg_face13')); + BIDS = bids.layout(fullfile(get_test_data_dir, 'eeg_face13'), ... + 'index_dependencies', false); modalities = {'eeg'}; assertEqual(bids.query(BIDS, 'modalities'), modalities); @@ -38,7 +39,8 @@ function test_bids_query_eeg_basic_2() % %% - BIDS = bids.layout(fullfile(get_test_data_dir, 'eeg_ds000117')); + BIDS = bids.layout(fullfile(get_test_data_dir, 'eeg_ds000117'), ... + 'index_dependencies', false); modalities = {'anat', 'eeg'}; assertEqual(bids.query(BIDS, 'modalities'), modalities); diff --git a/tests/tests_query/test_bids_query_func.m b/tests/tests_query/test_bids_query_func.m index 0e541954..6c3d8666 100644 --- a/tests/tests_query/test_bids_query_func.m +++ b/tests/tests_query/test_bids_query_func.m @@ -11,7 +11,8 @@ function test_bids_query_func_basic() % func queries % - BIDS = bids.layout(fullfile(get_test_data_dir(), 'ds001')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'ds001'), ... + 'index_dependencies', false); %% dependencies dependencies = bids.query(BIDS, 'dependencies', ... diff --git a/tests/tests_query/test_bids_query_ieeg.m b/tests/tests_query/test_bids_query_ieeg.m index 89c85260..ca52e765 100644 --- a/tests/tests_query/test_bids_query_ieeg.m +++ b/tests/tests_query/test_bids_query_ieeg.m @@ -12,7 +12,8 @@ function test_bids_query_ieeg_basic_1() % %% - BIDS = bids.layout(fullfile(get_test_data_dir(), 'ieeg_epilepsy')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'ieeg_epilepsy'), ... + 'index_dependencies', false); modalities = {'anat', 'ieeg'}; assertEqual(bids.query(BIDS, 'modalities'), modalities); @@ -38,7 +39,8 @@ function test_bids_query_ieeg_basic_2() % %% - BIDS = bids.layout(fullfile(get_test_data_dir(), 'ieeg_epilepsy_ecog')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'ieeg_epilepsy_ecog'), ... + 'index_dependencies', false); modalities = {'anat', 'ieeg'}; assertEqual(bids.query(BIDS, 'modalities'), modalities); diff --git a/tests/tests_query/test_bids_query_matlab_octave.m b/tests/tests_query/test_bids_query_matlab_octave.m index 1d74463a..bb73dd71 100644 --- a/tests/tests_query/test_bids_query_matlab_octave.m +++ b/tests/tests_query/test_bids_query_matlab_octave.m @@ -11,7 +11,8 @@ function test_query_impossible_suffix_should_return_empty() - BIDS = bids.layout(fullfile(get_test_data_dir(), '7t_trt')); + BIDS = bids.layout(fullfile(get_test_data_dir(), '7t_trt'), ... + 'index_dependencies', false); subjects = bids.query(BIDS, 'subjects'); assertEqual(size(subjects), [1, 22]); diff --git a/tests/tests_query/test_bids_query_meg.m b/tests/tests_query/test_bids_query_meg.m index 9a50d795..f56a4465 100644 --- a/tests/tests_query/test_bids_query_meg.m +++ b/tests/tests_query/test_bids_query_meg.m @@ -11,7 +11,8 @@ function test_bids_query_meg_basic() % meg queries % - BIDS = bids.layout(fullfile(get_test_data_dir(), 'ds000246')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'ds000246'), ... + 'index_dependencies', false); modalities = {'anat', 'meg'}; assertEqual(bids.query(BIDS, 'modalities'), modalities); @@ -21,9 +22,8 @@ function test_bids_query_meg_basic() assertEqual(bids.query(BIDS, 'suffixes'), suffixes); % smoke tests - BIDS = bids.layout(fullfile(get_test_data_dir(), 'ds000247')); - - BIDS = bids.layout(fullfile(get_test_data_dir(), 'ds000248')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'ds000248'), ... + 'index_dependencies', false); dependencies = bids.query(BIDS, 'dependencies', 'sub', '01', 'suffix', 'meg'); diff --git a/tests/tests_query/test_bids_query_microscopy.m b/tests/tests_query/test_bids_query_microscopy.m index 1bc991a6..043f8bd1 100644 --- a/tests/tests_query/test_bids_query_microscopy.m +++ b/tests/tests_query/test_bids_query_microscopy.m @@ -8,12 +8,14 @@ function test_bids_query_microscopy_basic() - BIDS = bids.layout(fullfile(get_test_data_dir(), 'micr_SEM')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'micr_SEM'), ... + 'index_dependencies', false); data = bids.query(BIDS, 'data'); assertEqual(numel(data), 6); - BIDS = bids.layout(fullfile(get_test_data_dir(), 'micr_SPIM')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'micr_SPIM'), ... + 'index_dependencies', false); data = bids.query(BIDS, 'data'); assertEqual(numel(data), 11); diff --git a/tests/tests_query/test_bids_query_motion.m b/tests/tests_query/test_bids_query_motion.m index 62ee47ee..3d199607 100644 --- a/tests/tests_query/test_bids_query_motion.m +++ b/tests/tests_query/test_bids_query_motion.m @@ -11,7 +11,8 @@ function test_bids_query_motion_basic() % motion queries % - BIDS = bids.layout(fullfile(get_test_data_dir(), 'motion_spotrotation')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'motion_spotrotation'), ... + 'index_dependencies', false); optodes_files = bids.query(BIDS, 'data', ... 'suffix', 'channels'); diff --git a/tests/tests_query/test_bids_query_nirs.m b/tests/tests_query/test_bids_query_nirs.m index 44d39b6e..ab345c1b 100644 --- a/tests/tests_query/test_bids_query_nirs.m +++ b/tests/tests_query/test_bids_query_nirs.m @@ -11,7 +11,8 @@ function test_bids_query_nirs_basic() % nirs queries % - BIDS = bids.layout(fullfile(get_test_data_dir(), 'fnirs_tapping')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'fnirs_tapping'), ... + 'index_dependencies', false); optodes_files = bids.query(BIDS, 'data', ... 'suffix', 'optodes'); diff --git a/tests/tests_query/test_bids_query_qmri.m b/tests/tests_query/test_bids_query_qmri.m index fd6676ff..b44a8e2d 100644 --- a/tests/tests_query/test_bids_query_qmri.m +++ b/tests/tests_query/test_bids_query_qmri.m @@ -8,7 +8,8 @@ function test_bids_query_qmri_megre_echos() - BIDS = bids.layout(fullfile(get_test_data_dir(), 'qmri_megre')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'qmri_megre'), ... + 'index_dependencies', false); echos = bids.query(BIDS, 'echos', 'modality', 'anat'); assertEqual(numel(echos), 8); @@ -17,7 +18,8 @@ function test_bids_query_qmri_megre_echos() function test_bids_query_qmri_irt1_inv() - BIDS = bids.layout(fullfile(get_test_data_dir(), 'qmri_irt1')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'qmri_irt1'), ... + 'index_dependencies', false); inversions = bids.query(BIDS, 'inversions'); assertEqual(numel(inversions), 4); diff --git a/tests/tests_query/test_query_bug_453.m b/tests/tests_query/test_query_bug_453.m index 56c2a8e5..f7804072 100644 --- a/tests/tests_query/test_query_bug_453.m +++ b/tests/tests_query/test_query_bug_453.m @@ -1,6 +1,7 @@ function test_query_bug_453() - BIDS = bids.layout(fullfile(get_test_data_dir(), 'ds000248')); + BIDS = bids.layout(fullfile(get_test_data_dir(), 'ds000248'), ... + 'index_dependencies', false); assertEqual(bids.query(BIDS, 'modalities'), {'anat', 'meg'}); assertEqual(bids.query(BIDS, 'modalities', 'task', '.*'), {'meg'}); diff --git a/tests/tests_utils/test_plot_events.m b/tests/tests_utils/test_plot_events.m index a0084bf2..7e61f17f 100644 --- a/tests/tests_utils/test_plot_events.m +++ b/tests/tests_utils/test_plot_events.m @@ -12,7 +12,7 @@ function test_plot_events_ds101() data_dir = fullfile(get_test_data_dir(), 'ds001'); - BIDS = bids.layout(data_dir); + BIDS = bids.layout(data_dir, 'index_dependencies', false); events_files = bids.query(BIDS, ... 'data', ... @@ -33,7 +33,7 @@ function test_plot_events_ds101_with_model() 'model', ... 'model-balloonanalogrisktask_smdl.json'); - BIDS = bids.layout(data_dir); + BIDS = bids.layout(data_dir, 'index_dependencies', false); events_files = bids.query(BIDS, ... 'data', ... @@ -49,7 +49,7 @@ function test_plot_events_ds108() data_dir = fullfile(get_test_data_dir(), 'ds108'); - BIDS = bids.layout(data_dir); + BIDS = bids.layout(data_dir, 'index_dependencies', false); events_files = bids.query(BIDS, ... 'data', ...