help
help > Error in conn_batch when trying to name Results contrast (i.e. Results.saveas)
Dec 1, 2020 09:12 PM | David Stephenson
Error in conn_batch when trying to name Results contrast (i.e. Results.saveas)
Hello CONN community,
I am testing out implementation of the conn_batch command, and am running into an error when trying to give a name to my user defined contrast (Note I receive this error on both v19c and today's v20b release). All other steps (batch.Setup - batch.Analysis) run without problem, but when I get to batch.Results, if I run the following:
%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%Level 2 Seed/ROI Results
batch.Results.name = 'Test_ROI_to_ROI_Analysis';
batch.Results.display = 1;
batch.Results.saveas = {'SEED_HC_vs_PSD'};
batch.Results.between_subjects.effect_names = {'HC','SZ','SCA','BPD','Age','meanFD'};
batch.Results.between_subjects.contrast = [1 -0.33 -0.33 -0.33 0 0];
batch.Results.overwrite = 'Yes';
batch.Results.done = 1;
%%%%%%%%%%%%%%%%%%%%%%%%%%
I get the following error:
%%%%%%%%%%%%%%%%%%%%%%%%%%
Undefined function or variable 'descrip'.
Error in conn_contrastmanager/conn_contrastmanager_update (line 93)
if isempty(descrip), nameext=sprintf('%s',name);
Error in conn_contrastmanager (line 17)
else conn_contrastmanager_update(str,varargin{:});
Error in conn_batch (line 1761)
conn_contrastmanager('add',0,batch.Results.saveas);
Error in conn_batch (line 1746)
conn_batch(batchtemp);
Error in conn_process (line 68)
case 'batch', conn_batch(varargin{:});
%%%%%%%%%%%%%%%%%%%%%%%%%
However, everything runs without error if I comment out the batch.Results.saveas = {'SEED_HC_vs_PSD'}; line.
Also note that adding a description to the subject effect variables (i.e. batch.Setup.subjects.descrip) does not fix the aforementioned error.
Any help with this would be greatly appreciated.
Below you will find the full syntax for the batch structure, in case this is an upstream issue.
Thank you,
David
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear batch;
batch.filename = fullfile(results_o_dir,'MACIP_CONN_ANALYSIS.mat');
batch.parallel.N = NSUBJECTS;
batch.parallel.profile='Background process (Unix,Mac)';
batch.Setup.isnew = 1;
batch.Setup.nsubjects = NSUBJECTS;
batch.Setup.RT = 0.46;
batch.Setup.functionals = repmat({{}},[NSUBJECTS,1]);
for nsub = 1:NSUBJECTS
batch.Setup.functionals{nsub}{1} = FUNCTIONAL_FILE{nsub};
end
batch.Setup.structurals = STRUCTURAL_FILE;
batch.Setup.secondarydatasets.functionals_type = 2;
batch.Setup.conditions.names = {'rest'};
for ncond=1
for nsub=1:NSUBJECTS
for nses=1
batch.Setup.conditions.onsets{ncond}{nsub}{nses} = 0;
batch.Setup.conditions.durations{ncond}{nsub}{nses} = inf;
end
end
end
batch.Setup.rois.names = {'ATLAS_TLRC'};
batch.Setup.rois.files{1} = ROIFILE;
batch.Setup.rois.multiplelabels = 1;
batch.Setup.rois.dataset = 1;
batch.Setup.preprocessing.steps = {'functional_smooth','functional_label_as_smoothed'};
batch.Setup.preprocessing.fwhm = 6;
batch.Setup.analyses = [1,2,3];
batch.Setup.voxelmask = 1;
batch.Setup.voxelmaskfile = ANALYSIS_MASK_FILE;
batch.Setup.voxelresolution = 1;
batch.Setup.analysisunits = 2;
batch.Setup.subjects.group_names = {'HC','SZ','SCA','BPD'};
batch.Setup.subjects.groups = MACIP_DATA.DSM_DX;
batch.Setup.subjects.effect_names = {'Age','meanFD'};
batch.Setup.subjects.effects = {MACIP_DATA.Age,MACIP_DATA.REST_meanFD};
batch.Setup.done = 1;
batch.Setup.overwrite = 'Yes';
%%Denoising step
batch.Denoising.filter = [0.01, 0.1];
batch.Denoising.detrending = 0;
batch.Denoising.despiking = 0;
batch.Denoising.counfounds.names = {''};
batch.Denoising.done = 1;
batch.Denoising.overwirte = 'Yes';
%%%Level-1 ROI-to-ROI and seed-to-voxel analysis step
batch.Analysis.name = 'Test_ROI_to_ROI_Analysis';
batch.Analysis.measure = 1;
batch.Analysis.weight = 2;
batch.Analysis.modulation = 0;
batch.Analysis.type = 3;
batch.Analysis.done = 1;
batch.Analysis.overwrite = 'Yes';
%%%%Level-1 voxel-to-voxel ICA analysis
batch.vvAnalysis.name = 'Test_ICA_Analysis';
batch.vvAnalysis.measures.names = 'group-ICA';
batch.vvAnalysis.measures.factors = 20;
batch.vvAnalysis.measures.kernelsupport = 8;
batch.vvAnalysis.measures.norm = 1;
batch.vvAnalysis.measures.options = 'GICA3';
batch.vvAnalysis.measures.dimensions = 64;
batch.vvAnalysis.done = 1;
batch.vvAnalysis.overwrite = 'Yes';
%%%%Level-2 Seed/ROI Analyses
batch.Results.name = 'Test_ROI_to_ROI_Analysis';
batch.Results.display = 1;
batch.Results.saveas = {'SEED_HC_vs_PSD'};
batch.Results.between_subjects.effect_names = {'HC','SZ','SCA','BPD','Age','meanFD'};
batch.Results.between_subjects.contrast = [1 -0.33 -0.33 -0.33 0 0];
batch.Results.overwrite = 'Yes';
batch.Results.done = 1;
% %%%%Level-2 Voxelwise/ICA Analyses
batch.vvResults.name = 'Test_ICA_Analysis';
batch.vvResults.display = 1;
batch.vvResults.saveas = {'ICA_HC_vs_PSD'};
batch.vvResults.between_subjects.effect_names = {'HC','SZ','SCA','BPD','Age','meanFD'};
batch.vvResults.between_subjects.contrast = [1 -0.33 -0.33 -0.33 0 0 ];
batch.vvResults.overwrite = 'Yes';
batch.vvResults.done = 1;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I am testing out implementation of the conn_batch command, and am running into an error when trying to give a name to my user defined contrast (Note I receive this error on both v19c and today's v20b release). All other steps (batch.Setup - batch.Analysis) run without problem, but when I get to batch.Results, if I run the following:
%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%Level 2 Seed/ROI Results
batch.Results.name = 'Test_ROI_to_ROI_Analysis';
batch.Results.display = 1;
batch.Results.saveas = {'SEED_HC_vs_PSD'};
batch.Results.between_subjects.effect_names = {'HC','SZ','SCA','BPD','Age','meanFD'};
batch.Results.between_subjects.contrast = [1 -0.33 -0.33 -0.33 0 0];
batch.Results.overwrite = 'Yes';
batch.Results.done = 1;
%%%%%%%%%%%%%%%%%%%%%%%%%%
I get the following error:
%%%%%%%%%%%%%%%%%%%%%%%%%%
Undefined function or variable 'descrip'.
Error in conn_contrastmanager/conn_contrastmanager_update (line 93)
if isempty(descrip), nameext=sprintf('%s',name);
Error in conn_contrastmanager (line 17)
else conn_contrastmanager_update(str,varargin{:});
Error in conn_batch (line 1761)
conn_contrastmanager('add',0,batch.Results.saveas);
Error in conn_batch (line 1746)
conn_batch(batchtemp);
Error in conn_process (line 68)
case 'batch', conn_batch(varargin{:});
%%%%%%%%%%%%%%%%%%%%%%%%%
However, everything runs without error if I comment out the batch.Results.saveas = {'SEED_HC_vs_PSD'}; line.
Also note that adding a description to the subject effect variables (i.e. batch.Setup.subjects.descrip) does not fix the aforementioned error.
Any help with this would be greatly appreciated.
Below you will find the full syntax for the batch structure, in case this is an upstream issue.
Thank you,
David
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear batch;
batch.filename = fullfile(results_o_dir,'MACIP_CONN_ANALYSIS.mat');
batch.parallel.N = NSUBJECTS;
batch.parallel.profile='Background process (Unix,Mac)';
batch.Setup.isnew = 1;
batch.Setup.nsubjects = NSUBJECTS;
batch.Setup.RT = 0.46;
batch.Setup.functionals = repmat({{}},[NSUBJECTS,1]);
for nsub = 1:NSUBJECTS
batch.Setup.functionals{nsub}{1} = FUNCTIONAL_FILE{nsub};
end
batch.Setup.structurals = STRUCTURAL_FILE;
batch.Setup.secondarydatasets.functionals_type = 2;
batch.Setup.conditions.names = {'rest'};
for ncond=1
for nsub=1:NSUBJECTS
for nses=1
batch.Setup.conditions.onsets{ncond}{nsub}{nses} = 0;
batch.Setup.conditions.durations{ncond}{nsub}{nses} = inf;
end
end
end
batch.Setup.rois.names = {'ATLAS_TLRC'};
batch.Setup.rois.files{1} = ROIFILE;
batch.Setup.rois.multiplelabels = 1;
batch.Setup.rois.dataset = 1;
batch.Setup.preprocessing.steps = {'functional_smooth','functional_label_as_smoothed'};
batch.Setup.preprocessing.fwhm = 6;
batch.Setup.analyses = [1,2,3];
batch.Setup.voxelmask = 1;
batch.Setup.voxelmaskfile = ANALYSIS_MASK_FILE;
batch.Setup.voxelresolution = 1;
batch.Setup.analysisunits = 2;
batch.Setup.subjects.group_names = {'HC','SZ','SCA','BPD'};
batch.Setup.subjects.groups = MACIP_DATA.DSM_DX;
batch.Setup.subjects.effect_names = {'Age','meanFD'};
batch.Setup.subjects.effects = {MACIP_DATA.Age,MACIP_DATA.REST_meanFD};
batch.Setup.done = 1;
batch.Setup.overwrite = 'Yes';
%%Denoising step
batch.Denoising.filter = [0.01, 0.1];
batch.Denoising.detrending = 0;
batch.Denoising.despiking = 0;
batch.Denoising.counfounds.names = {''};
batch.Denoising.done = 1;
batch.Denoising.overwirte = 'Yes';
%%%Level-1 ROI-to-ROI and seed-to-voxel analysis step
batch.Analysis.name = 'Test_ROI_to_ROI_Analysis';
batch.Analysis.measure = 1;
batch.Analysis.weight = 2;
batch.Analysis.modulation = 0;
batch.Analysis.type = 3;
batch.Analysis.done = 1;
batch.Analysis.overwrite = 'Yes';
%%%%Level-1 voxel-to-voxel ICA analysis
batch.vvAnalysis.name = 'Test_ICA_Analysis';
batch.vvAnalysis.measures.names = 'group-ICA';
batch.vvAnalysis.measures.factors = 20;
batch.vvAnalysis.measures.kernelsupport = 8;
batch.vvAnalysis.measures.norm = 1;
batch.vvAnalysis.measures.options = 'GICA3';
batch.vvAnalysis.measures.dimensions = 64;
batch.vvAnalysis.done = 1;
batch.vvAnalysis.overwrite = 'Yes';
%%%%Level-2 Seed/ROI Analyses
batch.Results.name = 'Test_ROI_to_ROI_Analysis';
batch.Results.display = 1;
batch.Results.saveas = {'SEED_HC_vs_PSD'};
batch.Results.between_subjects.effect_names = {'HC','SZ','SCA','BPD','Age','meanFD'};
batch.Results.between_subjects.contrast = [1 -0.33 -0.33 -0.33 0 0];
batch.Results.overwrite = 'Yes';
batch.Results.done = 1;
% %%%%Level-2 Voxelwise/ICA Analyses
batch.vvResults.name = 'Test_ICA_Analysis';
batch.vvResults.display = 1;
batch.vvResults.saveas = {'ICA_HC_vs_PSD'};
batch.vvResults.between_subjects.effect_names = {'HC','SZ','SCA','BPD','Age','meanFD'};
batch.vvResults.between_subjects.contrast = [1 -0.33 -0.33 -0.33 0 0 ];
batch.vvResults.overwrite = 'Yes';
batch.vvResults.done = 1;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Threaded View
Title | Author | Date |
---|---|---|
David Stephenson | Dec 1, 2020 | |
Alfonso Nieto-Castanon | Dec 1, 2020 | |
David Stephenson | Dec 2, 2020 | |