Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] split MEG files should be listed separately in scans.tsv #735

Merged
merged 32 commits into from
Mar 16, 2021

Conversation

eort
Copy link
Contributor

@eort eort commented Feb 15, 2021

As discussed in #692 in the mne-bids repo, MEG recordings that consist of split files, all parts should be listed separately in the scans.tsv file.

sappelhoff
sappelhoff previously approved these changes Feb 16, 2021
Copy link
Member

@sappelhoff sappelhoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @eort

@sappelhoff
Copy link
Member

@eort could you please add yourself to the contributors list here --> https://github.com/bids-standard/bids-specification/wiki/Recent-Contributors

@sappelhoff sappelhoff marked this pull request as ready for review February 16, 2021 07:56
@ftadel
Copy link
Collaborator

ftadel commented Feb 16, 2021

I haven't read the context, but it should be clear that is only about FIF files.
For other CTF and 4D MEG recordings, the split files are within the folder referenced in the scans.tsv.
(for other manufacturers, I don't know...)

Note that the split FIF files are linked with hard-coded file names (tag FIFF.FIFF_REF_FILE_NAME).
Ideally, renaming them should be done carefully by a dedicated program.
Does MNE-BIDS does this?

Copy link
Collaborator

@ftadel ftadel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHOULD or MUST:
preferably MUST, the least ambiguity the better

@hoechenberger
Copy link
Collaborator

Ideally, renaming them should be done carefully by a dedicated program.
Does MNE-BIDS does this?

I'm actually not entirely sure how well this is currently being handled, but if we're not doing this properly in MNE-BIDS, then it's a bug we need to fix. :)

@eort
Copy link
Contributor Author

eort commented Feb 16, 2021

Ideally, renaming them should be done carefully by a dedicated program.
Does MNE-BIDS does this?

I can't say anything about how consistently MNE-BIDS does that, but for my data it works fine.

@sappelhoff
Copy link
Member

I'm actually not entirely sure how well this is currently being handled, but if we're not doing this properly in MNE-BIDS, then it's a bug we need to fix. :)

pretty sure we are just using MNE-Python for that in mne-bids, and MNE-Python does properly rename multi-part FIF files. It's even mentioned as an example/recommended tool to use in the bids spec

image

@sappelhoff sappelhoff dismissed their stale review February 16, 2021 18:27

several open points to discuss as revealed in maintainers meeting

@effigies
Copy link
Collaborator

We should clarify:

  1. Multi-part runs should be discussed in scans.tsv, not just in split, and the same acq_time is REQUIRED across parts of the same run (e.g., echo-, part-, split-)
  2. Explicit note in split that acq_time should be the same for all splits, not acq_time(split2) == acq_time(split1) + duration(split1)
  3. scans.tsv remains OPTIONAL

@tsalo
Copy link
Member

tsalo commented Feb 16, 2021

  1. Multi-part runs should be discussed in scans.tsv, not just in split, and the same acq_time is REQUIRED across parts of the same run (e.g., echo-, part-, split-)

My personal opinion is that the idea that all files should be listed in scan.tsv (when provided), should specifically be brought up in the description for scans.tsv and not in the definition for split.

Something like:

When the OPTIONAL scans.tsv file is provided, split files MUST have the same acquisition time (acq_time).

EDIT: We can open a separate issue about the definition of scans.tsv if you don't want to cover it in this PR.
I've opened bids-standard/bids-validator#1192 about associated validation.

@robertoostenveld
Copy link
Collaborator

@tsalo wrote

...all files should be listed in scan.tsv (when provided), should specifically be brought up in the description for scans.tsv ...

For FieldTrip data2bids and examples I have also been pondering about what is to be listed in the scans.tsv file. That is most explicit here. But I don't find it so clear what constitutes data (to be listed) and what metadata (not to be listed).

E.g. for PET there are the pet.nii files (obviously), but should the blood.tsv files also be listed in the scans.tsv? And for fMRI the bold.nii files would be listed in case scans.tsv is provided, but should physio, stim and events also be listed in that case?

However, for the concrete case here (split/part/echo) I don't think this confusion applies. I do like the suggestion to require acq_time to be the same for all.

@eort
Copy link
Contributor Author

eort commented Feb 17, 2021

all files should be listed in scan.tsv (when provided), should specifically be brought up in the description for scans.tsv and not in the definition for split

Yes, I agree. But should these two things be only mentioned in the scans.tsv section or also in the split sections?

src/99-appendices/06-meg-file-formats.md Outdated Show resolved Hide resolved
src/schema/entities.yaml Outdated Show resolved Hide resolved
@sappelhoff
Copy link
Member

E.g. for PET there are the pet.nii files (obviously), but should the blood.tsv files also be listed in the scans.tsv? And for fMRI the bold.nii files would be listed in case scans.tsv is provided, but should physio, stim and events also be listed in that case?

That's a good point that we should clarify as part of a bigger issue/PR 👍

Multi-part runs should be discussed in scans.tsv, not just in split, and the same acq_time is REQUIRED across parts of the same run (e.g., echo-, part-, split-)

This should be specified in this section: https://github.com/bids-standard/bids-specification/blame/master/src/03-modality-agnostic-files.md#L326

@eort can you make a proposal please?

Co-authored-by: Stefan Appelhoff <stefan.appelhoff@mailbox.org>
Copy link
Member

@sappelhoff sappelhoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, I think this reads well now and addresses all initial criticisms and suggestions

@eort
Copy link
Contributor Author

eort commented Mar 4, 2021

Nice!

Once this is merged, does the validator need to be updated to test for that change?

@sappelhoff
Copy link
Member

Once this is merged, does the validator need to be updated to test for that change?

Taylor has opened an issue for that: bids-standard/bids-validator#1192

but it will be non-trivial to implement, unless you are well versed in JS :) (in the latter case it may or may not be easy)

Copy link
Member

@tsalo tsalo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the hard work on this. There is one minor typo, and I have a thought about wording. I'd prefer to avoid the term "split file," since it makes it harder to distinguish grouping elements (such as "run", "acquisition", and "file"). While a "run" or "acquisition" can correspond to multiple files, I think the singular word "file" should only apply to one actual file object.

src/03-modality-agnostic-files.md Outdated Show resolved Hide resolved
src/99-appendices/06-meg-file-formats.md Outdated Show resolved Hide resolved
src/schema/entities.yaml Outdated Show resolved Hide resolved
eort and others added 3 commits March 5, 2021 16:58
Co-authored-by: Taylor Salo <tsalo006@fiu.edu>
Co-authored-by: Taylor Salo <tsalo006@fiu.edu>
Co-authored-by: Stefan Appelhoff <stefan.appelhoff@mailbox.org>
@eort
Copy link
Contributor Author

eort commented Mar 5, 2021

@tsalo Makes perfect sense! I adopted your suggestions.

@eort
Copy link
Contributor Author

eort commented Mar 11, 2021

According to ci/circlci, there seems to be a certificate issue for https://www.cognitiveatlas.org/task/id/trm_54e69c642d89b
I don't know what to do about it.

@sappelhoff
Copy link
Member

According to ci/circlci, there seems to be a certificate issue for https://www.cognitiveatlas.org/task/id/trm_54e69c642d89b
I don't know what to do about it.

that's nothing we can solve - we'll ignore it for now and revisit if it doesn't fix itself within a couple of weeks.

@rwblair
Copy link
Member

rwblair commented Mar 11, 2021

Sorry about that, cert should be renewed now.

@effigies
Copy link
Collaborator

Restarted the Circle job.

Copy link
Member

@tsalo tsalo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@sappelhoff sappelhoff merged commit 537e28a into bids-standard:master Mar 16, 2021
@sappelhoff
Copy link
Member

Thanks @eort

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants