LIMO-EEG-Toolbox / limo_tools

Hierarchical Linear Modelling for MEEG data
https://limo-eeg-toolbox.github.io/limo_meeg/
Other
58 stars 27 forks source link

Relative path errors #103

Closed ChristineLackner closed 2 years ago

ChristineLackner commented 2 years ago

calling limo_batch to make a custom contrast. The other contrasts, data pre-processing etc were all done on another machine, with an external harddrive attached. Changed the list of LIMO.mat files to be referencing the current machine directory, but get the following error: Error using cd Unable to change current folder to 'D:\media\drlackner\Brains_HD2\AReg\AReg_smoke_LIMO_2grp\derivatives\sub-075\eeg\GrpxCond_GLM_Channels_Time_OLS' (Name is nonexistent or not a folder). File D:\AReg\AReg_smoke_stimlock_LIMO_2grp\code\dependencies\eeglab\plugins\LIMO3.2\limo_batch_contrast.m at line 11 File D:\AReg\AReg_smoke_stimlock_LIMO_2grp\code\dependencies\eeglab\plugins\LIMO3.2\external\psom\psom_run_job.m at line 214 File D:\AReg\AReg_smoke_stimlock_LIMO_2grp\code\dependencies\eeglab\plugins\LIMO3.2\external\psom\psom_run_job.m at line 128 File D:\AReg\AReg_smoke_stimlock_LIMO_2grp\code\dependencies\eeglab\plugins\LIMO3.2\external\psom\psom_run_script.m at line 437 File D:\AReg\AReg_smoke_stimlock_LIMO_2grp\code\dependencies\eeglab\plugins\LIMO3.2\external\psom\psom_run_script.m at line 323 File D:\AReg\AReg_smoke_stimlock_LIMO_2grp\code\dependencies\eeglab\plugins\LIMO3.2\external\psom\psom_pipeline_process.m at line 591 File D:\AReg\AReg_smoke_stimlock_LIMO_2grp\code\dependencies\eeglab\plugins\LIMO3.2\external\psom\psom_run_pipeline.m at line 417 File C:\Program Files\MATLAB\R2022a\toolbox\matlab\lang\parallel_function.m at line 837 File C:\Program Files\MATLAB\R2022a\toolbox\parallel\remoteParallelFunction.m at line 67

The \media\drlackner\Brains_HD2 is how it appears on the original machine, and the D drive is how it appears on the current machine.

Matlab directory pointed to D:\AReg\AReg_smoke_LIMO_2grp\derivatives\LIMO_AReg_smoke_resplock_LIMO_2grp

I believe this is a relative path issue... LIMO must be pulling old directory information from somewhere (not sure where), and not updating that info to the new directory.

CPernet commented 2 years ago

Hi Christine,

does 'update LIMO paths' works for you? image

ChristineLackner commented 2 years ago

Cyril, I assume it would work, but it is a bit of a cumbersome process. You have to select the LIMO files for each participant, and with 75 ps in the larger study, it isn't really the easiest process, given that I frequently bring the data home and back to work. Moreover, the GUI asks for participants in the numeric (study file) order, and not necessarily by their participant number/subject code as entered into EEGLAB and what is entered into the name of the derivatives folders. For instance, the GUI asks for participant 1's LIMO file location ("select LIMO file subject 1"), but I have no such subject. Participant 1 needed to be excluded; therefore participant 1 is actually sub-002. This gets a bit confusing and makes it quite easy to make errors, for instance:

Index exceeds the number of array elements. Index must not exceed 52.

Error in limo_path_update (line 40) cd(fileparts(Paths{index}));

Error in limo_tools>path_updates_Callback (line 76) limo_path_update

Error in gui_mainfcn (line 95) feval(varargin{:});

Error in limo_tools (line 29) gui_mainfcn(gui_State, varargin{:});

Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)limo_tools('path_updates_Callback',hObject,eventdata,guidata(hObject))

Error while evaluating UIControl Callback.

The GUI is asking for participants according to the row in the study design, which may not directly correspond to the subject name.

[cid:083a6235-0546-4758-a3f1-aa92de16062d]

Given that all of the paths have changed in an identical manner, and EEGLAB itself can figure out where the .set and .fdt files are now located, why does LIMO struggle with finding the LIMO.mat files?

Could there be a GUI which asks to select just a few of the new LIMO.mat locations and then the rest of the locations are extrapolated from there? It is simply the prefix to the location which changes (e.g., going from a D:\ drive to an E:\ drive)

Thanks for your help. Chrissy

Christine Lackner, PhD

Associate Professor

Psychology Department

Mount St. Vincent University

Office: EV 421

902-457-5981

MSVU land acknowledgement: MSVU is located on unceded ancestral Mi’kmaq territory. This territory is covered by the Covenant Chain of Treaties of Peace and Friendship signed between 1725 and 1779. We pay respect to the knowledge embedded in the Indigenous custodians of this land and to the Elders, past, present, and future


From: Cyril Pernet @.> Sent: Wednesday, April 13, 2022 2:48 AM To: LIMO-EEG-Toolbox/limo_tools @.> Cc: Christine Lackner @.>; Author @.> Subject: Re: [LIMO-EEG-Toolbox/limo_tools] Relative path errors (Issue #103)

Hi Christine,

does 'update LIMO path' works for you? [image]https://user-images.githubusercontent.com/4772878/163108859-2d8844fc-1c25-4159-ae81-d06899797413.png

— Reply to this email directly, view it on GitHubhttps://github.com/LIMO-EEG-Toolbox/limo_tools/issues/103#issuecomment-1097584810, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AUIMHH3XMH4DU7KE2Z6LS2TVEZN3RANCNFSM5RN65PYA. You are receiving this because you authored the thread.Message ID: @.***>

CPernet commented 2 years ago

note it was a simple does it work lol what would be the most conveniant way to update the files for you? (independently of STUDY though) -- what about giving the old .txt file listing all LIMO.mat and the new directory -- the expected behaviour being LIMO.mat gets their paths updated, and attempting to do all txt files as well

ChristineLackner commented 2 years ago

Yes, that sounds like a good solution. If it works for me, it may be something to include in the documentation and/or to implement right into LIMO Chrissy

Christine Lackner, PhD

Associate Professor

Psychology Department

Mount St. Vincent University

Office: EV 421

902-457-5981

MSVU land acknowledgement: MSVU is located on unceded ancestral Mi’kmaq territory. This territory is covered by the Covenant Chain of Treaties of Peace and Friendship signed between 1725 and 1779. We pay respect to the knowledge embedded in the Indigenous custodians of this land and to the Elders, past, present, and future


From: Cyril Pernet @.> Sent: Tuesday, April 19, 2022 4:00 AM To: LIMO-EEG-Toolbox/limo_tools @.> Cc: Christine Lackner @.>; Author @.> Subject: Re: [LIMO-EEG-Toolbox/limo_tools] Relative path errors (Issue #103)

note it was a simple does it work lol what would be the most conveniant way to update the files for you? (independently of STUDY though) -- what about giving the old .txt file listing all LIMO.mat and the new directory -- the expected behaviour being LIMO.mat gets their paths updated, and attempting to do all txt files as well

— Reply to this email directly, view it on GitHubhttps://github.com/LIMO-EEG-Toolbox/limo_tools/issues/103#issuecomment-1102165156, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AUIMHH65APFSUBCI2NL2M7LVFZK2PANCNFSM5RN65PYA. You are receiving this because you authored the thread.Message ID: @.***>

CPernet commented 2 years ago

ok https://github.com/LIMO-EEG-Toolbox/limo_tools/commit/46949e3109359ba1e16d4efc819183f7d7a05791 should fix it pull from master and let me know how this runs for you

CPernet commented 2 years ago

can i close this?

ChristineLackner commented 2 years ago

Yes, thank you. It appears to work on my work computer. Thanks Chrissy

Christine Lackner, PhD

Associate Professor

Psychology Department

Mount St. Vincent University

Office: EV 421

902-457-5981

MSVU land acknowledgement: MSVU is located on unceded ancestral Mi’kmaq territory. This territory is covered by the Covenant Chain of Treaties of Peace and Friendship signed between 1725 and 1779. We pay respect to the knowledge embedded in the Indigenous custodians of this land and to the Elders, past, present, and future


From: Cyril Pernet @.> Sent: Saturday, April 30, 2022 10:52 AM To: LIMO-EEG-Toolbox/limo_tools @.> Cc: Christine Lackner @.>; Author @.> Subject: Re: [LIMO-EEG-Toolbox/limo_tools] Relative path errors (Issue #103)

can i close this?

— Reply to this email directly, view it on GitHubhttps://github.com/LIMO-EEG-Toolbox/limo_tools/issues/103#issuecomment-1113992709, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AUIMHH6LON7NJPBTQICXQF3VHU3JTANCNFSM5RN65PYA. You are receiving this because you authored the thread.Message ID: @.***>