help > Problem when relabeling ICA networks
Showing 1-3 of 3 posts
Display:
Results per page:
Feb 9, 2017  06:02 PM | grntntkl
Problem when relabeling ICA networks
First of all I would like to thank Alfonso Nieto-Castanon and Susan Whitfield-Gabrieli for their work on this extraordinarily good software.

I think I have discovered a bug when manually labeling ICA networks. I hope this hasn't been reported in this forum, but I haven't found anything in a quick search. When using "ICA tools" -> "Label individual networks/components" and then saving the labels, CONN basically "inserts" additional carriage returns (\r) after each label. E.g. when the list (ICA.ROIs.txt) was "label1\r\nlabel2\r\n", after setting the labels the list will be "label1\r\r\nlabel2\r\r\n". (Maybe that's only a problem under Windows - I'm using CONN Toolbox 17a with Matlab 2016a under Windows 7 64 bit). When now including the ICA networks at the setup step as ROIs and pressing "Done", I get the error:

ERROR DESCRIPTION:

Error using conn_process (line 763)
duplicated ROI name group-ICA.
Error in conn_process (line 15)
case 'setup', disp(['CONN: RUNNING SETUP STEP']); conn_process([0:4,4.5,5]);
Error in conn (line 3195)
else conn_process('setup');
Error in conn_menumanager (line 119)


I have removed the extra carriage returns from the ICA.ROIs.txt and I have changed line 23 in conn_icaexplore.m from

trefnames=regexp(fileread(fullfile(filepathresults,[ICAPCA,'.ROIs.txt'])),'\n*','split');

to

trefnames=strsplit(fileread(fullfile(filepathresults,[ICAPCA,'.ROIs.txt'])));

which solved the problem for me, as far as I can see.
I hope that this information will be of some help.

Best regards,
Gregor
Feb 11, 2017  02:02 AM | Alfonso Nieto-Castanon - Boston University
RE: Problem when relabeling ICA networks
Hi Gregor,

Thank you very much for reporting this issue, and providing a fix as well!

I am attaching a patch for this issue as well (this patch is for release 17a, to install it simply copy this file to the conn distribution folder overwriting the file with the same name there), if you have a chance to try it out please let me know if everything seems to work fine (I am using a slight variation of your proposed changes, mainly because the function strsplit is relatively new -introduced in Matlab 2013a- and CONN tries to support older Matlab releases as far as 2007a)

Thanks again
Alfonso
Originally posted by Gregor L:
First of all I would like to thank Alfonso Nieto-Castanon and Susan Whitfield-Gabrieli for their work on this extraordinarily good software.

I think I have discovered a bug when manually labeling ICA networks. I hope this hasn't been reported in this forum, but I haven't found anything in a quick search. When using "ICA tools" -> "Label individual networks/components" and then saving the labels, CONN basically "inserts" additional carriage returns (\r) after each label. E.g. when the list (ICA.ROIs.txt) was "label1\r\nlabel2\r\n", after setting the labels the list will be "label1\r\r\nlabel2\r\r\n". (Maybe that's only a problem under Windows - I'm using CONN Toolbox 17a with Matlab 2016a under Windows 7 64 bit). When now including the ICA networks at the setup step as ROIs and pressing "Done", I get the error:

ERROR DESCRIPTION:

Error using conn_process (line 763)
duplicated ROI name group-ICA.
Error in conn_process (line 15)
case 'setup', disp(['CONN: RUNNING SETUP STEP']); conn_process([0:4,4.5,5]);
Error in conn (line 3195)
else conn_process('setup');
Error in conn_menumanager (line 119)


I have removed the extra carriage returns from the ICA.ROIs.txt and I have changed line 23 in conn_icaexplore.m from

trefnames=regexp(fileread(fullfile(filepathresults,[ICAPCA,'.ROIs.txt'])),'\n*','split');

to

trefnames=strsplit(fileread(fullfile(filepathresults,[ICAPCA,'.ROIs.txt'])));

which solved the problem for me, as far as I can see.
I hope that this information will be of some help.

Best regards,
Gregor
Attachment: conn_icaexplore.m
Feb 14, 2017  04:02 PM | grntntkl
RE: Problem when relabeling ICA networks
Hi Alfonso,

thank you for your quick reply and the fixed file. I had a quick look and it works fine for me.
Also, I was already wondering why you were using the regexp function when there is the strsplit function, but that explains it. Next time when I try to suggest a fix I'll keep that in mind :)

Best,
Gregor