openMetadataInitiative / bids2openminds

A tool to generate openMINDS metadata from BIDS datasets
MIT License
1 stars 3 forks source link

file bundle registration #49

Closed lzehl closed 5 months ago

lzehl commented 6 months ago

should result in 6 hierarchy-based file bundles :

lzehl commented 6 months ago

let's ignore concept-based file bundles for the first version

apdavison commented 5 months ago

Should file-bundle_sub-01 also contain the bundles file-bundle_sub-01_anat and file-bundle_sub-01_func ?

apdavison commented 5 months ago

If we have:

- sub-01
  - ses-01 
    - anat
      - sub-01_ses-01_anat_file
    - func
      - sub-01_ses-01_func_file

which file bundles should we have? i.e. should we have a bundle for each directory, or do we collapse directories that only contain another directory (like sub-01 containing ses-01)?

Peyman-N commented 5 months ago

Should file-bundle_sub-01 also contain the bundles file-bundle_sub-01_anat and file-bundle_sub-01_func ?

The relationship is done through reverse linkage. Meaning both file-bundle_sub-01_anat and file-bundle_sub-01_func have file-bundle_sub-01 as isPartOf property. I should mention that the linkage in File is reversed too, so the file schema defines it is part of witch file bundles.

which file bundles should we have? i.e. should we have a bundle for each directory, or do we collapse directories that only contain another directory (like sub-01 containing ses-01)?

Curent implementation creates a file bundle for each folder.

apdavison commented 5 months ago

The relationship is done through reverse linkage. Meaning both file-bundle_sub-01_anat and file-bundle_sub-01_func have file-bundle_sub-01 as isPartOf property. I should mention that the linkage in File is reversed too, so the file schema defines it is part of witch file bundles.

yes, I know. Sorry, my question wasn't clear. I was referring to the way Lyuba expressed the issue description, which leaves it unclear whether file-bundle_sub-01_anat and file-bundle_sub-01_func should have file-bundle_sub-01 as isPartOf property or not.

apdavison commented 5 months ago

Curent implementation creates a file bundle for each folder.

I saw that, but I also saw a comment from @lzehl on #51 where I wasn't sure if she was suggesting this should not be the case. My questions were really intended to elicit a clearer definition of the expected behaviour for file bundles, as without this I cannot properly review #51

lzehl commented 5 months ago

Let's stick to the following:

Besides registering a flat list of files to the file repo (each file links at least to the file repo), file bundles are created according to the folder structure.

This means for the following example:

- sub-01
  - ses-01 
    - anat
      - sub-01_ses-01_anat_file
    - func
      - sub-01_ses-01_func_file

2 files

sub-01_ses-01_anat_file

sub-01_ses-01_func_file

4 file bundles

sub-01 file bundle

sub-01/ses-01 file bundle

sub-01/ses-01/anat file bundle

sub-01/ses-01/func file bundle

lzehl commented 5 months ago

@Peyman-N @apdavison expected file bundle number according to the convention above for the test datasets (should be double checked):

"ds003": 39 (13 sub-X folders, 13 sub-X/anat folders, 13 sub-X/func folders) "ds000247": 36 (6 sub-X folders, 15 sub-X/ses-X folders, 5 sub-X/ses-X/anat folders, 10 sub-X/ses-X/meg folders) "eeg_cbm": 40 (20 sub-X folders, 20 sub-X/eeg folders) "asl001": 3 (1 sub-X folder, 1 sub-X/anat folder, 1 sub-X/perf folder)

"eeg_rest_fmri":

Peyman-N commented 5 months ago

ds000247 had some folder in the meg folder which was ended with .ds. apparently they are not data files but folders, so I adjusted the numbers accordingly. (for example: ds000247/sub-0002/ses-0001/meg/sub-0002_ses-0001_task-rest_run-01_meg.ds)