help > Subject-specific ROIs in CONN batch
Showing 1-3 of 3 posts
Display:
Results per page:
Jun 20, 2021  09:06 PM | Pavan Bains - UCL
Subject-specific ROIs in CONN batch
Dear Alfonso & the CONN community,

I am using batch code to conduct my analysis - my ROIs are subject-specific, but I don't know how to specify this in the script. My current script is attached. Any guidance would be greatly appreciated!

Kind Regards,
Pavan
Jun 24, 2021  12:06 AM | Alfonso Nieto-Castanon - Boston University
RE: Subject-specific ROIs in CONN batch
Dear Pavan,

Your script looks perfectly fine but CONN batch syntax expects cell arrays (instead of strings) in the list of filenames for each ROI, so I believe simply changing the lines that read:

   grey = string(conn_dir('*_c1rs*.nii'));
   white = string(conn_dir('*_c2rs*.nii'));
   etc.

to:

   grey = cellstr(conn_dir('*_c1rs*.nii'));
   white = cellstr(conn_dir('*_c2rs*.nii'));
   etc.

should do the trick.

Best
Alfonso

Originally posted by Pavan Bains:
Dear Alfonso & the CONN community,

I am using batch code to conduct my analysis - my ROIs are subject-specific, but I don't know how to specify this in the script. My current script is attached. Any guidance would be greatly appreciated!

Kind Regards,
Pavan
Jun 24, 2021  10:06 AM | Pavan Bains - UCL
RE: Subject-specific ROIs in CONN batch
Hi Alfonso,

Ah I see - thank you so much! I have another query - I am trying to run the ART outlier detection but I keep receiving this error after 12 or 13 participants (out of 89) have been processed:

ERROR DESCRIPTION:

Error using spm_sample_vol
File too small.
Error in spm_get_data (line 46)
Y(i,:) = spm_sample_vol(V(i),XYZ(1,:),XYZ(2,:),XYZ(3,:),0);
Error in art>art_OpeningFcn (line 395)
else temp=reshape(spm_get_data(VY{sess}(i),xyz_voxel),VY{sess}(i).dim); %temp=spm_read_vols(VY{sess}(i));
Error in gui_mainfcn (line 220)
feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:});
Error in art (line 145)
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
Error in conn_art (line 8)
[varargout{1:nargout}]=art(varargin{:});
Error in conn_setup_preproc (line 2956)
else h=conn_art('sess_file',matlabbatch{n}.art,'visible','off');
Error in conn (line 1143)
ok=conn_setup_preproc('',varargin{2:end});
Error in conn_menumanager (line 121)
feval(CONN_MM.MENU{n0}.callback{n1}{1},CONN_MM.MENU{n0}.callback{n1}{2:end});
CONN20.b
SPM12 + DAiSS DEM FieldMap MEEGtools
Matlab v.2020b
project: CONN20.b
storage: 805.6Gb available
spm @ /Users/pavanbains/Documents/UCL/Neuroimaging/spm12
conn @ /Users/pavanbains/Documents/UCL/conn
SUGGESTIONS:
Potential corrupt or incomplete volume. Try revising or regenerating source volumes

Any help would be greatly appreciated.

Kind Regards,
Pavan