bids-standard / bids-2-devel

Discussions and suggestions of backwards incompatible changes to BIDS
https://bids.neuroimaging.io/
Creative Commons Attribution 4.0 International
11 stars 1 forks source link

Revert to one directory per scan #37

Open tsalo opened 4 years ago

tsalo commented 4 years ago

The BIDS 1.x directory structure places scans within anat, func, dwi folders. Within each folder one can have multiple different scans. I propose to go back to the one scan per folder structure so as to keep a files for one scan together. This is especially useful for the derivatives folder where having multiple scans of the same type residing in one folder will quickly result in a potential mixing of derivatives. With properly named sequences on your scanner console it will then become trivial to place dicoms and subsequent niftis in new folders by stripping the folder name from the scanname.

BIDS 1.x

Proposal for BIDS 2.x

Original authors: Unknown

tsalo commented 4 years ago

Andrea Goldstein wrote:

This is actually a really critical point for me as well.

tsalo commented 4 years ago

@chrisgorgo wrote:

This is actually a really critical point for me as well.

Thank you for your feedback. Could you elaborate why is this feature critical for you?

tsalo commented 4 years ago

Andrea Goldstein wrote:

Thank you for your feedback. Could you elaborate why is this feature critical for you?

Hi Chris, Maybe I should have revised to say important rather than critical. I agree with the comment from the other document that it becomes a bit unwieldly to have all of the files associated with a specific task in the same folder as all other tasks.

As a side note, I also am working with a dataset of over 1000 previously acquired scanning sessions across 5-6 different studies on the same paradigms. I actually utilize the BIDS 2.0 proposed hierarchy already (but with different file names but exact same structure). So I may be a bit biased towards BIDS 2.0

Really appreciating the work you guys have put into this!

tsalo commented 4 years ago

Fidel A wrote:

I agree this is the way to go. Not only derivatives can be overwritten if different scans are in the same folder bur also having many different modalities in the same directory can be rather confusing.

Plus, what do we do with modalities like DfMRI (If someone manage to make it) or future modalities we have not even heard about?

tsalo commented 4 years ago

@chrisgorgo wrote:

Not only derivatives can be overwritten if different scans are in the same folder bur also having many different modalities in the same directory can be rather confusing.

What do you mean "derivatives can be overwritten if different scans are in the same folder"? Derivatives should never go into the same folder as the raw data (it really makes things messy!).

BTW if we switch to one folder per scan you potentially end up with even more confusing situation - all scan folders from all modalities will be under the same subject (or session) folder. Extra level of hierarchy ads a little structure.

I do agree that DfMRI would be hard to classify.

tsalo commented 4 years ago

Fidel A wrote:

"Derivatives should never go into the same folder as the raw data"

Sure, but it would be just logical that the directory structure of the derivatives should reflect the structure of the raw data. I would not expect the structure of the derivatives to be hugely different in the subject level.

"all scan folders from all modalities will be under the same subject (or session) folder. "

I think that the way to go would be one folder per modality, not per scan.

Etc.

At the end, we would only end with 8/10 directories at most?

tsalo commented 4 years ago

@chrisgorgo wrote:

This looks reasonable to me, although it would only help with clutter in anatomical folder (since if I understand your proposal correctly "tfMRI" folder would essentially include all of the files "func" folder includes now).

tsalo commented 4 years ago

Fidel A wrote:

Well, resting (in my opinion) is a completely different modality from task (There are no events, analysis is different...). That would also be separated in a different directory.

But yes, if there are many different task experiments they would all be under the same directory.

tsalo commented 4 years ago

@chrisgorgo wrote:

Overall this seems like a reasonable, but quite different proposal we are commenting on. Would you mind fleshing it out in the document? People might miss it if it's just in the comments.

tsalo commented 4 years ago

Fidel A wrote:

Sure. I'll go for it.

tsalo commented 4 years ago

Andrea Goldstein wrote:

I should also say I created a workaround to get it into the BIDS 1.0 format from my original structure (which maps on exactly to the proposed BIDS 2 structure) using symlinks.

tsalo commented 4 years ago

@marcelzwiers wrote:

I should also say I created a workaround to get it into the BIDS 1.0 format from my original structure (which maps on exactly to the proposed BIDS 2 structure) using symlinks.

I also feel that the 'anat','func', etc folders are somewhat artificial and very inflexible (i.e. not future-proof). Taking something like SeriesDescription as the foldername seems like the most logical thing to do. In that way, the foldername is descriptive, the semantics ('func', 'anat') should go into the json-files. And if not, at least the "extra_data" folder should be part of BIDS

tsalo commented 4 years ago

@edickie wrote:

I also feel that the 'anat','func', etc folders are somewhat artificial and very inflexible (i.e. not future-proof). Taking something like SeriesDescription as the foldername seems like the most logical thing to do. In that way, the foldername is descriptive, the semantics ('func', 'anat') should go into the json-files. And if not, at least the "extra_data" folder should be part of BIDS

I agree with the suggestion to potientially split tasks into separate folders under func, but it might be more useful (and scriptable) to allow certain tags to optionally effect the folder structure of derivatives (like "space")

tsalo commented 4 years ago

@jcohenadad wrote:

i agree with this, with some exceptions (e.g., mt folder (once accepted by the bids community) should include all the necessary files to compute mt-related metrics)

jbteves commented 4 years ago

Is there an existing conversation on why modalities are split to begin with? With proper naming it is straightforward to filter only the modality you're seeking, such as Bash:

ls *T1w*
ls | grep T1w

Python

files = os.listdir(path)
for f in files:
    if 'T1w' in f:
        print(f)

MATLAB

files = dir('*T1w*');

I would think that in some ways it could be useful to have all modalities together and offer explanations of how to filter, rather than maintain additional folders in the hierarchy which are redundant between subjects.