Renaming channels with _channels.tsv?


I am trying to write a generic BIDS importer for Brainstorm.

When testing this dataset: OpenNeuro
I realized that the channel names were not matching between the BIDS metadata _channels.tsv and _electrodes.tsv (e.g. “A1”) and the EEGLAB .set files that contain the header of the EEG data (e.g. “1A1”).
Is it OK to use the _channels.tsv to rename the data channels?

According to the specs (Electroencephalography - Brain Imaging Data Structure v1.7.0): the file _channels.tsv is optional, and the order of the channels SHOULD be the same as in the original file.
This means that the dataset is valid if the order is different between the recordings file and the _channels.tsv, or if not all the recorded channels are documented in the metadata. Therefore renaming the channels with the _channels.tsv is unsafe.

I would tend not to allow it in my importer, however it means that I can’t import the positions of the electrodes defined in the _electrodes.tsv.

Any recommendation?

Hi Francois,

Regarding this dataset, we could not find the electrodes which were different between the different files. Would you mind indicating which ones?


I think this might have to do with your EEGLAB data import function

I’ve just realized that the problem is coming from the S3 sync from OpenNeuro: it is not downloading the correct version of the dataset.

The following command, documented in the Download tab of the OpenNeuro dataset, downloads version 1.0.1 instead of version 1.1.0.

aws s3 sync --no-sign-request s3:// ds002578-download/

In this older dataset, there is a .fdt file, and in the .set file the channel are labelled as “1A1”, “1A2”, etc. instead of “A1”, “A2”…
No problem with the current version 1.1.0.

In MNE-BIDS we give the BIDS metadata priority.

However, see also this for a discussion on metadata conflicts:

Thank you for pointing at this PR.
All the discussed variants explain well that the BIDS metadata can’t be used to modify intentionally the information existing in the data files. The only discussed exception is a lack of technical possibility to represent the exact same information on both sides.
Since channel names are expected to be char arrays with only printable characters, I don’t see how any discrepancy could happen. I think we can therefore consider that the BIDS metadata can’t be used to rename the channels.

If the channel names differ between the BIDS metadata and the EEG/MEG data files, this should be reported as an error.
Conclusion: I will not make the extra effort to consider in the Brainstorm BIDS importer the case where channel renaming occurs.

All solved, thanks!

1 Like