@@ -13,38 +13,42 @@ function bidspm(varargin)
1313
1414 defaultAction = ' init' ;
1515
16- isEmptyOrCellstr = @(x ) isempty(x ) || iscellstr(x );
16+ isEmptyOrCellstr = @(x ) isempty(x ) || iscellstr(x ); % #ok<*ISCLSTR>
1717 isFileOrStruct = @(x ) isstruct(x ) || exist(x , ' file' ) == 2 ;
1818
19- isLogical = @(x ) validateattributes( x , { ' logical ' }, { ' numel' , 1 }) ;
20- isChar = @(x ) validateattributes( x , { ' char ' }, { ' row ' } );
21- isPositiveScalar = @(x ) validateattributes( x , { ' numeric ' }, { ' nonnegative ' , ' numel' , 1 }) ;
19+ isLogical = @(x ) islogial( x ) && numel( x ) == 1 ;
20+ isChar = @(x ) ischar( x );
21+ isPositiveScalar = @(x ) isnumeric( x ) && numel( x ) == 1 && x >= 0 ;
2222
23- isLowLevelActionOrDir = @(x ) (ismember(x , low_level_actions()) || isdir(x ));
23+ isFolder = @(x ) isfolder(x );
24+
25+ isCellStr = @(x ) iscellstr(x );
26+
27+ isLowLevelActionOrDir = @(x ) (ismember(x , low_level_actions()) || isfolder(x ));
2428
2529 addOptional(args , ' bids_dir' , pwd , isLowLevelActionOrDir );
2630
2731 addOptional(args , ' output_dir' , ' ' , isChar );
2832 addOptional(args , ' analysis_level' , ' subject' , @(x ) ismember(x , {' subject' , ' dataset' }));
2933
3034 addParameter(args , ' action' , defaultAction , isChar );
31- addParameter(args , ' participant_label' , {}, @ iscellstr );
32- addParameter(args , ' task' , {}, @ iscellstr );
35+ addParameter(args , ' participant_label' , {}, isCellStr );
36+ addParameter(args , ' task' , {}, isCellStr );
3337 addParameter(args , ' dry_run' , false , isLogical );
3438 addParameter(args , ' bids_filter_file' , struct([]), isFileOrStruct );
3539 addParameter(args , ' options' , struct([]), isFileOrStruct );
3640 addParameter(args , ' verbosity' , 2 , isPositiveScalar );
3741
3842 addParameter(args , ' fwhm' , 6 , isPositiveScalar );
39- addParameter(args , ' space' , {}, @ iscellstr );
43+ addParameter(args , ' space' , {}, isCellStr );
4044
4145 % preproc only
4246 addParameter(args , ' dummy_scans' , 0 , isPositiveScalar );
4347 addParameter(args , ' anat_only' , false , isLogical );
4448 addParameter(args , ' ignore' , {}, isEmptyOrCellstr );
4549
4650 % stats only
47- addParameter(args , ' preproc_dir' , pwd , @ isdir );
51+ addParameter(args , ' preproc_dir' , pwd , isFolder );
4852 addParameter(args , ' model_file' , struct([]), isFileOrStruct );
4953 addParameter(args , ' roi_based' , false , isLogical );
5054 % group level stats only
@@ -178,6 +182,11 @@ function bidspm(varargin)
178182 if ismember(' fieldmaps' , args .Results .ignore )
179183 opt.useFieldmaps = false ;
180184 end
185+ if ismember(' qa' , lower(args .Results .ignore ))
186+ opt.QA.func.do = false ;
187+ opt.QA.anat.do = false ;
188+ opt.QA.glm.do = false ;
189+ end
181190
182191 opt.dummy_scans = args .Results .dummy_scans ;
183192
@@ -375,11 +384,12 @@ function initBidspm(dev)
375384 opt.verbosity = 2 ;
376385 opt.msg.color = ' ' ;
377386
378- octaveVersion = ' 4.0.3 ' ;
387+ octaveVersion = ' 6. 4.0' ;
379388 matlabVersion = ' 8.6.0' ;
380389
381390 % octave packages
382- installlist = {' io' , ' statistics' , ' image' };
391+ installlist = {};
392+ % installlist = {'io', 'statistics', 'image'};
383393
384394 thisDirectory = fileparts(mfilename(' fullpath' ));
385395
@@ -440,6 +450,10 @@ function initBidspm(dev)
440450
441451 addpath(BIDSPM_PATHS , ' -begin' );
442452
453+ if isOctave
454+ warning(' off' , ' Octave:shadowed-function' );
455+ end
456+
443457 checkDependencies(opt );
444458 printCredits(opt );
445459
@@ -533,6 +547,11 @@ function run_tests()
533547
534548 bidspm(' action' , ' dev' );
535549
550+ % to reduce noise in the output
551+ if isOctave
552+ warning(' off' , ' setGraphicWindow:noGraphicWindow' );
553+ end
554+
536555 cd(fileparts(mfilename(' fullpath' )));
537556
538557 if isGithubCi
@@ -552,8 +571,7 @@ function run_tests()
552571 folderToCover = fullfile(pwd , ' src' );
553572 testFolder = fullfile(pwd , ' tests' , subfolder );
554573
555- success = moxunit_runtests( ...
556- testFolder , ...
574+ success = moxunit_runtests(testFolder , ...
557575 ' -verbose' , ' -recursive' , ' -with_coverage' , ...
558576 ' -cover' , folderToCover , ...
559577 ' -cover_xml_file' , ' coverage.xml' , ...
0 commit comments