help > RE: importing existing connectivity matrices in CONN
Jul 19, 2022  09:07 PM | Alfonso Nieto-Castanon - Boston University
RE: importing existing connectivity matrices in CONN
Dear Samantha,

That seems to indicate some issue with the ROI labels defined in your matrix NIFTI files, could you check if when creating your nifti files you may have used some syntax like:
 
conn_mtx_write(filename, Z, ROIlabels);

If so make sure that the ROIlabels variable is a cell array containing one label per row/column of Z, e.g.

ROIlabels = {'ROI1', 'ROI2', 'ROI3'}; 

(alternatively look at the .json file associated with your matrix NIFTI files to see if that contains non-string elements in the "names" field?)

Hope this helps
Alfonso
Originally posted by Samantha Baldi:
Dear Alfonso, 

I had exactly the same needs so I implemented what you suggested in this post. 
This generated an SPM.mat file, together with a spmF_mv.nii, spmF_mv.json and mask.nii files. 
I am now trying to load the results with conn_display SPM.mat, however I get the following error: 

Loading /rds/user/sb2506/hpc-work/tFMRI_PPI/2ndlevel/dep/SPM.mat
please wait...
Error using regexprep
All cells must be char row vectors.

Error in conn_displayroi (line 204)
data.names=regexprep(data.names,{'_1_1$','^rs\.','^rsREL\.','^aal\.'},'');
Error in conn_display (line 209)
hfigure=conn_displayroi('initspm',fullfile(filepath,[filename,fileext]),varargin{:});

Any idea where this might come from?

Threaded View

TitleAuthorDate
Jaron Kupers Jan 7, 2021
Alfonso Nieto-Castanon Jan 7, 2021
chirokoff Aug 22, 2022
Alfonso Nieto-Castanon Aug 29, 2022
chirokoff Aug 31, 2022
Alfonso Nieto-Castanon Aug 31, 2022
Samantha Baldi Jul 14, 2022
RE: importing existing connectivity matrices in CONN
Alfonso Nieto-Castanon Jul 19, 2022
Jaron Kupers Jan 8, 2021
Alfonso Nieto-Castanon Jan 15, 2021
Jaron Kupers Jan 21, 2021
Alfonso Nieto-Castanon Jan 11, 2021
Jaron Kupers Jan 14, 2021