help > RE: Error importing SPM.mat file
Dec 12, 2014  01:12 AM | Alfonso Nieto-Castanon - Boston University
RE: Error importing SPM.mat file
Hi Xiaozhen

Yes, the issue here seems to be a problem with the formatting of Parcels_MNI_333.txt. There are two .txt formats that CONN interprets, one where you simply provide a list of ROI labels (the length of this list should be equal to the largest ROI id found in the associated .nii file; e.g. the BA.txt file), and another where you provide a list of tab-separated ROI id's and ROI names (e.g. Freesurfer *LUT.txt files). CONN was interpreting your file as the former type (taking the first column of numbers to identify the id's, from 1 to 333, and the strings at the right to identify the ROI names). The problem was that the provided list of ROI names was not unique (it contained replicated ROI names).

If you intended your file to be interpreted as the first type above (e.g. the first ROI would be named "1 Default", '2 SMhand", etc.) then simply remove the extra line at the end of your Parcels_MNI_333.txt file and that should fix this (after repeating the "Setup" step), since a mismatch between the number of lines in your .txt file and the number of id's in your .nii file is what is making CONN identify this file as the latter style.

If, on the other hand, you intended your file to be interpreted as the second type above (e.g. the first ROI would be named "Default", associated with ROI id = 1, the second "SMhand" associated with id = 2, etc.) you can either resolve those repeated names manually or use the attached patch to have REX resolve those repeated ROI-names automatically (repeated ROI-names will be resolved by adding numbers at the end of the ROI name, e.g. Default1, Default2, ..., Default40 for your file). To use this patch simply copy the attached file to your CONN distribution folder overwriting the file with the same name there (and then repeat the "Setup" step)

Hope this helps
Alfonso
Originally posted by Xiaozhen You:
Thank you for such prompt response Alfonso!
Yes here is the roi file and the text file for the look up. It was downloaded from the WUSTL group, and I modified it from their excel file to match how the BA.img's corresponding text file look like.
Maybe I did something wrong in the process. It's indeed little different in the sense that there can be a group of rois that has the same name..
Thank you for checking it out!
Xiaozhen
Attachment: rex.m

Threaded View

TitleAuthorDate
Xiaozhen You Nov 25, 2014
Xiaozhen You Nov 26, 2014
Alfonso Nieto-Castanon Nov 27, 2014
Xiaozhen You Dec 9, 2014
Alfonso Nieto-Castanon Dec 10, 2014
Alfonso Nieto-Castanon Dec 10, 2014
Xiaozhen You Dec 10, 2014
RE: Error importing SPM.mat file
Alfonso Nieto-Castanon Dec 12, 2014
Xiaozhen You Dec 23, 2014
Xiaozhen You Dec 23, 2014
Alfonso Nieto-Castanon Dec 24, 2014
Xiaozhen You Dec 31, 2014
Alfonso Nieto-Castanon Dec 31, 2014
Xiaozhen You Jan 1, 2015
Alfonso Nieto-Castanon Jan 1, 2015
Xiaozhen You Jan 2, 2015
Alfonso Nieto-Castanon Jan 3, 2015
Xiaozhen You Jan 5, 2015
Xiaozhen You Jan 6, 2015
Alfonso Nieto-Castanon Jan 15, 2015
Xiaozhen You Jan 15, 2015
Xiaozhen You Dec 17, 2014
Xiaozhen You Nov 27, 2014
Alfonso Nieto-Castanon Nov 26, 2014