Factorize copy BIDS files (PR 1)#1384
Factorize copy BIDS files (PR 1)#1384MaximeBICMTL wants to merge 4 commits intoaces:bids_staging_branchfrom
Conversation
534188a to
724c140
Compare
febe4c2 to
562e26f
Compare
e582a0a to
e6e57a7
Compare
9a21c3c to
38ffb61
Compare
There was a problem hiding this comment.
Not sure if it stems from this PR, but a session directory with bids_default_vl was created, but ses-V1 was not injected as an entity in the downstream file names (nor scans.tsv content).
Note: Ran with #1394 patch
38ffb61 to
df77d0a
Compare
|
Thanks for the catch @jeffersoncasimir ! The first bug with the missing session label for sessionless datasets was introduced in this PR, my bad! I added a commit that fixes both of these bugs, and makes the renaming logic more robust in general. |
|
Another good catch of yours @jeffersoncasimir, I looked at the file name but forgot to look at the whole path... I pushed another commit that fixes this bug. I can confirm that this bug is also present in main/27.0 (basically the Anyway, I'll add it to my list of follow-ups:
|
There was a problem hiding this comment.
Probably the final issue.
The chunks folder created does not contain the injected default session: sub-ABC0035_task-resting_eeg.chunks, and the chunks are created, but this line triggers the following error:
ERROR: Chunk creation failed, directory '/data/Loris-MRI/data/bids_imports/EEGManyLabs_Resting_State_Dataset_Eimer1996_BIDSVersion_1.9.0_chunks/sub-ABC0035_ses-V1_task-resting_eeg.chunks' does not exist.
|
Okay @jeffersoncasimir, I managed to reproduce the bug. I really should have tested more with the default session label, sorry for that... Anyway, I can confirm you that the bug is solved by merging #1395. The reason is simple: before #1395, the chunks path was determined from the input file name (which was an oopsie form my part), whereas after it is determined with the LORIS file name. EDIT: Actually I went ahead and merged #1395 and rebased this branch. I tested a sessionless dataset and it now works as expected. |
63ad0ce to
816096d
Compare


Extracted from #1335
Description
Factorize the "get BIDS file path in LORIS" and "copy BIDS file to LORIS" operations in the
lib.import_bids_dataset.copy_files, and adopt these factorizations in theEegclass. The goal of this PR is to be able to share the same logic/function across all modalities (MRI / EEG / MEG) once the other PRs land.Notes
inheritanceparameter to theEeg.copy_file_to_loris_bids_dirbut it was actually never used.