help > Error in Denoising & Quality Control tab after batch import of preprocessed data
Mar 12, 2026  08:03 PM | Fabian Wissing - Ruhr University Bochum
Error in Denoising & Quality Control tab after batch import of preprocessed data

Dear CONN community,


I am importing already preprocessed functional data, masks, and covariates into CONN toolbox using the following batch script:


clear batch;
batch.filename=fullfile(conn_dir,'conn_batch_new.mat');


batch.Setup.isnew=1;
batch.Setup.done=1;
batch.Setup.overwrite=1;


batch.Setup.nsubjects=1;
batch.Setup.RT=2;


conditions = {'rest','cond1', 'cond2', 'cond3', 'cond4'};
nconditions = numel(conditions);
batch.Setup.covariates.names = {'realignment'};


batch.Setup.functionals{nsub} = {fullfile(data, 'swarfunc.nii')};
batch.Setup.structurals{nsub} = {fullfile(data, 'swmanat.nii')};
batch.Setup.masks.Grey{nsub} = {fullfile(data, 'gm_mask.nii')};
batch.Setup.masks.White{nsub} = {fullfile(data, 'wm_mask.nii')};
batch.Setup.masks.CSF{nsub} = {fullfile(data, 'csf_mask.nii')};
batch.Setup.covariates.files{1}{nsub} = {fullfile(data, 'rp_func.txt')}; conds = load(fullfile(data, 'conditions.mat'));
for ncond=1:numel(conditions)
    if ncond==1
        batch.Setup.conditions.names{ncond} = 'rest';
        batch.Setup.conditions.onsets{ncond}{nsub}{1}=0;
        batch.Setup.conditions.durations{ncond}{nsub}{1}=inf;
    else
        batch.Setup.conditions.names{ncond} = conds.names{ncond-1};
        batch.Setup.conditions.onsets{ncond}{nsub}{1}=conds.onsets{ncond-1};
        batch.Setup.conditions.durations{ncond}{nsub}{1}=conds.durations{ncond-1};
    end
end


batch.Denoising.done=1;
batch.Denoising.overwrite=1;


batch.QA.foldername = [fullfile(project_dir, 'results','qa','CONN_2026')];
batch.QA.plots = {'QA_DENOISE histogram';
'QA_DENOISE timeseries';
'QA_DENOISE FC-QC';
'QA_DENOISE scatterplot'};


conn_batch(batch);


The script runs without errors. However, when opening the project using the GUI and selecting the Denoising & Quality Control tab, I get the following error:


Unable to compute Data Sensitivity. Expected the following QC_ 2nd-level
covariates: 
QC_ProportionValidScans|QC_MeanMotion|QC_MeanGSchange|QC_NORM_struct|QC_DOF|QC_PeakFC|QC_StdFC


ERROR DESCRIPTION:


Index exceeds the number of array elements. Index must not exceed 0.


Error in conn (line 7570)
  if
conn_existfile(fullfile(CONN_x.Preproc.qa.folders{3},'DataSensitivityScore.mat'))


Error in conn_menumanager (line 125)
  
feval(CONN_MM.MENU{n0}.callback{n1}{1},CONN_MM.MENU{n0}.callback{n1}{2:end});
CONN25.b
SPM12 + DAiSS DEM FieldMap MEEGtools
Matlab v.2023b
project: CONN25.b
storage: 5923.6Gb available


In the Denoising & Quality Control tab, no figures appear in Preview Effect of Denoising, and all QC parameters have question marks. The folder results/qa/CONN_2026 only contains:




  • QA_DENOISE.subject001.mat




  • QA_DENOISE_scatterplot.subject001.mat




and none of the other expected QA files.


Could this indicate that some QA or QC covariates were not generated during the batch processing? Is there an additional step required when importing already-preprocessed data?


Thank you for any suggestions.

  Edited (Mar 12, 2026  08:03 PM)