methlabUZH / automagic

Automagic
GNU General Public License v3.0
89 stars 32 forks source link

Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. #72

Open juedec opened 3 months ago

juedec commented 3 months ago

Hello,

I use Matlab version 2023 and automagic version 3.0. When I launch preprocessing I get this warning signal, having carefully stored my data as indicated by the plug-in sprocessors Can you help me ?

Thanks

Start preprocessing all dataset Processing file Subject01_Sub-01-mma ...(file 1 out of 1) Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\P' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\P' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: The file size on disk does not correspond to the dataset information. Skipping preprocessing for this file... Warning: Escaped character '\S' is not valid. See 'doc sprintf' for supported special characters. * Pre-processing finished. Total elapsed time: 00:00:02***

ksgfan commented 3 months ago

Hi, it is difficult to say without knowing the data structure and selected preprocessing steps. Could you share a file of 1 subject e.g., via Dropbox or WeTransfer?

juedec commented 3 months ago

Hi,

These are EEG data recorded with a 128-electrode EGI system, e poch sur EVENT DIN1 in -.1; 0.5s, referenced 129th electrodes, sample 1000Hz. Please find attached one of the document https://we.tl/t-45ueIUbVyV

Thanks for you help

Julie


De : ksgfan @.***> Envoyé : mercredi 22 mai 2024 23:03:30 À : methlabUZH/automagic Cc : Julie DECOURT; Author Objet : Re: [methlabUZH/automagic] Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. (Issue #72)

Hi, it is difficult to say without knowing the data structure and selected preprocessing steps. Could you share a file of 1 subject e.g., via Dropbox or WeTransfer?

— Reply to this email directly, view it on GitHubhttps://github.com/methlabUZH/automagic/issues/72#issuecomment-2125738882, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BIVLO66WCKA77L6PTIMDJ7TZDUB2FAVCNFSM6AAAAABIEKMALSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRVG4ZTQOBYGI. You are receiving this because you authored the thread.Message ID: @.***>

ksgfan commented 3 months ago

Hi, you've shared a .set file. Do you also have the corresponding .fdt file? Without .fdt file that contains EEG data, loading of .set file is not possible.

juedec commented 3 months ago

No, I don't have the fdt files. The raw data are .mff files which are modified in EEGlab to .set and secondarily imported into automagic.

ksgfan commented 3 months ago

I think that something went wrong during conversion from .mff to .set. The .set file you've shared with me does not contain any data. See on image below:

Bildschirmfoto 2024-05-23 um 13 52 46

Could you share the .mff file too?

juedec commented 3 months ago

Strange !

Yes of course, you can find it there https://we.tl/t-FAjA56oetl

Can I charge file on mff format ?

juedec commented 3 months ago

Hmmm, I found the .fdt file https://we.tl/t-bJMOHstoVO

juedec commented 3 months ago

I retry with the /fdt in the fold I have a new error message and i keep the same erro message concerning '\U' and sprintf

Start preprocessing all dataset Processing file Subject01_Sub-01-mma ...(file 1 out of 1) Running Prep... Using option file in directory C:\Users\julie.decourt Checking for boundary events Preliminary detrend to compute reference pop_eegfiltnew() - performing 3301 point highpass filtering. pop_eegfiltnew() - transition band width: 1 Hz pop_eegfiltnew() - passband edge(s): 1 Hz pop_eegfiltnew() - cutoff frequency(ies) (-6 dB): 0.5 Hz pop_eegfiltnew() - filtering the data (zero-phase, non-causal) firfilt(): |====================| 100%, ETE 00:00 Warning: [MATLAB:subsassigndimmismatch] Unable to perform assignment because the size of the left side is 129-by-60000 and the size of the right side is 129-by-600-by-100.

Error in removeTrend (line 67) EEG.data(detrendOut.detrendChannels, :) = EEG1.data;

Error in prepPipeline (line 115) [EEGNew, detrend] = removeTrend(EEG, params);

Error in performPrep (line 98) [new_EEG, ~, ~] = prepPipeline(new_EEG, prepParams);

Error in preprocess (line 233) [EEG, EOG] = performPrep(EEG, EOG, PrepParams, EEGSystem.refChan);

Error in Block/preprocess (line 535) [EEG, fig1, fig2, fig3] = preprocess(data, self.params);

Error in Project/preprocessAll (line 503) [EEG, automagic] = block.preprocess();

Error in mainGUI>runpreprocessbutton_Callback (line 842) project.preprocessAll();

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

Error in mainGUI (line 61) gui_mainfcn(gui_State, varargin{:});

Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)mainGUI('runpreprocessbutton_Callback',hObject,eventdata,guidata(hObject)) Detecting bad channels using routines of clean_raw_data()... Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\P' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\P' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: TRANSPOSE does not support N-D arrays. Use PAGETRANSPOSE/PAGECTRANSPOSE to transpose pages or PERMUTE to reorder dimensions of N-D arrays. Skipping preprocessing for this file... Warning: Escaped character '\S' is not valid. See 'doc sprintf' for supported special characters. * Pre-processing finished. Total elapsed time: 00:00:07***

ksgfan commented 3 months ago

It seems that the .set file structure is already epoched, but the data in fdt file is not. That is why you get an error.

Maybe try to run the preprocessing on the mff file? Automagic can handle them too.

Please note that you have misc. channels in your data and you need them exclude them (Exclude Misc. Channels in Automagic).

juedec commented 3 months ago

Yes I did it and I have the same message error. I don't found where is the '\U' ; '\P'; Could it be a java or matlab version? or directory?

Start preprocessing all dataset Processing file Subject01_tc01mma-DET ...(file 1 out of 1) Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\P' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\P' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Cannot find Fileio extension, use EEGLAB Extension Manager to install it Skipping preprocessing for this file... * Pre-processing finished. Total elapsed time: 00:00:01***

ksgfan commented 3 months ago

fileio extension is not installed. Close Automagic, restart matlab, run restoredefaultpath in matlab command window, and run automagic again. It should install required extensions automatically, after you start the preprocessing.

juedec commented 3 months ago

It looks much better indeed, but I still have the same problem at the end ...

Start preprocessing all dataset Processing file Subject01_tc01mma-DET ...(file 1 out of 1) Running Prep... Using option file in directory C:\Users\julie.decourt Checking for boundary events Preliminary detrend to compute reference pop_eegfiltnew() - performing 3301 point highpass filtering. pop_eegfiltnew() - transition band width: 1 Hz pop_eegfiltnew() - passband edge(s): 1 Hz pop_eegfiltnew() - cutoff frequency(ies) (-6 dB): 0.5 Hz pop_eegfiltnew() - filtering the data (zero-phase, non-causal) firfilt(): |====================| 100%, ETE 00:00 Line noise removal Warning: [MATLAB:UndefinedFunction] Undefined function 'dpss' for input arguments of type 'double'.

Error in checkTapers (line 35) [tapers, eigs] = dpss(N, tapers(1), tapers(2));

Error in cleanLineNoise (line 52) lineNoiseOut.tapers = checkTapers(lineNoiseOut.taperTemplate, Nwin, lineNoiseOut.Fs);

Error in removeLineNoise (line 67) [signal, lineNoiseOut] = cleanLineNoise(signal, lineNoiseOut);

Error in prepPipeline (line 137) [EEGClean, lineNoise] = removeLineNoise(EEGNew, params);

Error in performPrep (line 98) [new_EEG, ~, ~] = prepPipeline(new_EEG, prepParams);

Error in preprocess (line 233) [EEG, EOG] = performPrep(EEG, EOG, PrepParams, EEGSystem.refChan);

Error in Block/preprocess (line 535) [EEG, fig1, fig2, fig3] = preprocess(data, self.params);

Error in Project/preprocessAll (line 503) [EEG, automagic] = block.preprocess();

Error in mainGUI>runpreprocessbutton_Callback (line 842) project.preprocessAll();

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

Error in mainGUI (line 61) gui_mainfcn(gui_State, varargin{:});

Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)mainGUI('runpreprocessbutton_Callback',hObject,eventdata,guidata(hObject)) Detecting bad channels using routines of clean_raw_data()... Perform Filtering... Performing ICLabel (this may take a while...) Running ICA... ICLabel: extracting features... ICLabel: calculating labels... ICLabel: saving results... Computing projection and removing 19 components .... eeg_checkset: recomputing the ICA activation matrix ... Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\P' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Escaped character '\P' is not valid. See 'doc sprintf' for supported special characters. Error in <a href="matlab: matlab.desktop.editor.openAndGoToLine(which('C:Warning: Undefined function 'zscore' for input arguments of type 'single'. Skipping preprocessing for this file... * Pre-processing finished. Total elapsed time: 00:11:21***

ksgfan commented 3 months ago

Hi, the dpss function is missing, which is part of the Signal Processing Toolbox. When you start Automagic, you should get a warning that this toolbox is missing. Simply install it in Matlab (Home -> Add-Ons -> Signal Processing Toolbox)