sorry I am having trouble uploading attachments, you may download this patch file directly from https://github.com/alfnie/conn/blob/mast...
Alfonso
Originally posted by Alfonso Nieto-Castanon:
Hi Brent and Fabian,
Sorry about this, this condition should produce simply a warning but not an error. I am attaching a patch to fix this issue (to use this patch simply download the attached conn.m file to your conn distribution folder overwriting the file with the same name there; also CONN's github repository has already been updated to include this patch in the latest version). In general, to be able to compute some of the data validity/quality/sensitivity scores CONN needs to have some minimal set of quality control variables created, particularly about subject motion and potential outlier scans. If you are importing an already preprocessed data, simply run the preprocessing step named "functional outlier detection (ART-based identification of outlier scans for scrubbing)" and that will create the variables CONN needs. Alternatively, you can also manually define potential outlier scans from your own timecourses (e.g. if you already have DVARS and FD timeseries) from the menu Setup -> Covariates (1st-level) -> 1st-level covariate tools -> compute new/derived 1st-level covariates -> compute 'scrubbing', and that will also create the variables CONN needs (namely QC_ProportionValidScans, QC_InvalidScans, QC_MeanMotion) in order to be able to compute some of those quality control scores.
Hope this helps
Alfonso
Originally posted by Brent Stewart:
Replying because I am encountering the same issue. Not using batch script. Just using the GUI with already preprocessed data. When in the Denoising & Quality Control tab, the same error described here appears.
Hopefully someone who has solved this issue has suggestions to share.
Thanks
Originally posted by Fabian Wissing:
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_2026only 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.
Threaded View
| Title | Author | Date |
|---|---|---|
| Fabian Wissing | Mar 12, 2026 | |
| Brent Stewart | Apr 30, 2026 | |
| Alfonso Nieto-Castanon | May 1, 2026 | |
| Alfonso Nieto-Castanon | May 1, 2026 | |
