yjmantilla / sovabids

A python package for the automatic conversion of EEG datasets to the BIDS standard, with a focus on making the most out of metadata.
https://sovabids.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
9 stars 3 forks source link

Keeping the mapping file within the output BIDS #33

Closed civier closed 2 years ago

civier commented 3 years ago

Following a discussion I had with @tclose and @dfabbott on the BIDS converter during my presentation today, I found out that in the federated XNAT system implemented in Australia, a conversion to BIDS will take place each time you want to analyse the data. I mentioned that an architeture like that of SOVABIDS is ideal, because the exact mapping used for each participant's conversion is one of the outputs of the conversion. This brought to me the idea that we should also save the mapping with the output BIDS. This will enable users to go back and examine the mapping in case that BIDS conversion was successful, but something was not copied correctly. The BIDS validators are quite thorough, but some copying errors might be only caught when the analysis pipeline is being run of the data (e.g., one raw data file was copied by mistake to two different locations, or combined into two different NIFTIs).

Do you know if a mapping file (from raw data to BIDS) is part of the BIDS specification? If not, I want to suggest to @yjmantilla to get involved in BIDS specification and suggest it. Might be a good way to introduce yourself to the community, and if we're lucky enough, our mapping file format will be the one adopted.

yjmantilla commented 2 years ago

@civier

This brought to me the idea that we should also save the mapping with the output BIDS. This will enable users to go back and examine the mapping in case that BIDS conversion was successful, but something was not copied correctly.

Currently, the mappings are saved in targetdir/code/mappings.yml

This was inspired by bidscoin and following the specification (see here:

Template: code/* Source code of scripts that were used to prepare the dataset MAY be stored here. Examples include anonymization or defacing of the data, or the conversion from the format of the source data to the BIDS format (see source vs. raw vs. derived data). Extra care should be taken to avoid including original IDs or any identifiable information with the source code. There are no limitations or recommendations on the language and/or code organization of these scripts at the moment.


If not, I want to suggest to @yjmantilla to get involved in BIDS specification and suggest it. Might be a good way to introduce yourself to the community, and if we're lucky enough, our mapping file format will be the one adopted.

I think the current mapping file is really oriented towards the way we and bidscoin do bids conversion, that is, I'm not sure it is general enough to be used as a general format. If we were to propose something it should be something really well thought.

We would need to define:

For that we would need 1 (or more) meetings to make a draft.

yjmantilla commented 2 years ago

I'm closing this for now since the main idea of saving the mappings is already implemented.

What is left to be done on this issue is making a proposal for a "mapping file" for bids