Problem with IC rejection

Hello,
We used Brainstorm for cleaning EEG data, and encountered the following problem: rejection of ICA components does not work correctly if the dataset contains previously interpolated channels.
The sequence of actions we performed is the following:

  1. Initially, we have a dataset with one or several bad channels.
  2. We mark these channels as bad (i.e. "delete" them from the data), and then we use "standardize -> interpolate bad channels".
  3. We perform ICA (with jade algorithm)
  4. We try to manually exclude components from the data (we do this for EOG correction)
    We see that something happens with the data as we reject components, but these changes do not seem correct: after rejection, we still observe significant contribution of the rejected component to the signal. Furthermore, in the window of IC activations, we see that activation of a rejected component changes, but does not become zero.
    We tested the whole procedure (both with and without channel interpolation) on other datasets, in which all channels were ok, and we found that the described problems occur specifically in the case when channel interpolation was applied. When no interpolation was done, contributions of the rejected components correctly disappeared from the signal, and activations of these components became exactly zero.
    Interestingly, the problem disappears after certain manipulations. For example, everything starts to work fine after recalculation of components or even after just opening the ICA calculation dialog. However, such behavior seems weird, and we can not rely on it in our research.
    We use the last version of Brainstorm, but it seems that this problem was present also in several previous versions.
    P.S. In a quite old Brainstorm version (maybe half of a year ago), there was another problem related to channel interpolation and IC rejection. In that version, the channels that were previously interpolated, were simply ignored (i.e. remained unchanged) after component rejection. This bug was fixed in subsequent versions. Maybe this information would be useful.
    Here is an example of the issue. First 2 components were marked to be removed, but still remain non-zero.

Matlab version - 2017a
Thank you.

Hello,

I discovered there was a bug in the bad channel replacement: bad channels that didn’t have any neighbors were replaced with NaN values, which caused lots of display and processing problems further down in the analysis. I fixed the bug, update Brainstorm to get the patch.

It is maybe not your problem here, as it doesn’t seem to be the range of problem. I could not reproduce the behavior your described, so I will need an example dataset from you. Please upload an example file somehwere, send me the link, and post here the exact sequence of operations to reproduce the abnormal behavior (click by click, so I can reproduce it).

A general remark: is this a common thing to do ICA analysis after the bad channel replacement? It doesn’t seem to me like a correct sequence of operations. To me it would seem more correct to run the ICA analysis on signals that do no include the artificial mixing due to the channel interpolation. But I am not an EEG expert…

Francois

Hello,

With the new update we encountered with a new problem with interpolation:
“Line 143: Undefined function or variable ‘iNotFix’.”
That is why we recreated ICA rejection with the previous version from 17.05.2018.

Here is the folder with the dataset and pipeline description with screenshots:
https://drive.google.com/open?id=1uyUzUFtoCyB6oHYOaKThIahCfddiB9Q4

PROCESSING
Create a new protocol.

  1. Default anatomy, one channel file per acquisition run
  2. Review raw file - select the dataset (.set)
  3. Select channel for interpolation (Fpz) -> delete -> close the data viewer
  4. Edit channel file. Replace electrode type for A1 and A2 electrode to ‘EEG_NO_LOC’, in order to process only channels with ‘EEG’ tag
  5. Select the process from the batching interface. Drag the file ‘manuhina_5’ to the batching interface -> run -> standardize -> interpolate bad electrodes (5 cm, type ‘EEG’).
  6. Drag the file ‘manuhina_5_interpbad’ to the box -> artifacts -> ICA components (all file, to event names, no filter, 20 components, types ‘EGG’, no sorting, method ‘JADE’)
  7. Open the raw file -> artifacts -> select active projectors. When removing components, they remain non-zero.

Thank you!
Yulia

I fixed the bug with the “iNotFix” variable.
But if you had it, it means this was not the problem in your case.

I’ll have a look at your example dataset next week.

Hello,

I downloaded your example file and processed exactly in the way you described.
I could not notice anything unusual: when removing an IC component, its contribution gets correctly removed from the EEG signals, and the corresponding IC time series appear as completely flat (not strictly zero, but something numerically close to zero, ~1e-16)

First, make sure you do not have any other toolbox in your Matlab path that interfere with Brainstorm.
Then try to reproduce exactly my screen captures. It would be helpful to see how they differ from mine.
What version of Matlab are you using?

No component removed:

First component removed:

Last 9 components removed:

Francois

(to display the screen captures bigger, you can right-click on them > Show image)

Hello,

I do not know what kid of error caused this issue, but somehow the latest update (24.05.2018) solved it.
I double-checked described sequence in previous (17.05.2018) and current versions, and the problem occur only in the first one. Even though it did not seem to be related with interpolation process itself, your fix resolved the ICA rejection window.

Here is version 17.05.2018

And current one:

Thank you kindly!
Yulia