-
Notifications
You must be signed in to change notification settings - Fork 52
BIDS importer refactor #1325
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
base: main
Are you sure you want to change the base?
BIDS importer refactor #1325
Conversation
e1895a8 to
0712a7a
Compare
e387a28 to
0850687
Compare
|
484a4a2 to
de1d73b
Compare
de1d73b to
d2390c6
Compare
d2390c6 to
55d4303
Compare
2af7b5b to
55d4303
Compare
bids session dataclass bids participants dataclass factorize combination iteration fix layout ignore skip files already inserted wip fix mri path join rebase commit migrate to new database abstraction rewrite optional dataset_description.json return an error on unknown scan types fix wrong counter and memory use
f959945 to
f708365
Compare
ea87fee to
97307c8
Compare
97307c8 to
915f2b4
Compare
|
Current status: awaiting discussion on the modularization of LORIS Python (#1339) to decide how to merge this PR. I would personally like to merge the modularization first and then the BIDS importer refactor. |
Replaces #1211
BIDS dataset import script rewrite
List of new features
--create_candidateor--create_sessionoptions are now transactional. Either all candidates and sessions are created without error, or none is created if an error occurs (due to incorrect input data).--create_candidateoption now looks for sites and projects using both names and aliases, in that order.List of breaking changes
bids_import.pytoimport_bids_dataset.py. This should better follow the LORIS-MRI scripts naming conventions.--type=derivativesor--no_copyoptions are used. It seems to me that the current code was not tested and probably not working, so it is better to have a hard error rather than an untested and potentially wrong implementation IMO.--idsvalidationoption has been removed. This option allowed to validate the BIDS directory name according to apscid_candid_blablablaformat. This is obviously esoteric and overly-specific as BIDS dataset can contain several participants, and their identifiers should be retrieved from the subject directory names or theparticipants.tsvfile instead.--create_candidateoption no longer tries to find the site by matching site aliases against participants IDs. This approach can give false positives if a similar (and not even necessarily equal) alias as a project. Thesiteparticipants.tsvcolumn is now mandatory to create candidates.List of major architectural changes
Note that these changes only apply to the generic BIDS import code (subjects and sessions), and the MRI import code. It does not apply to EEG import code.
print.lib.import_bids_datasetmodule.lib.imaging_libmodule to replace the oldlib.imagingmodule. Unlikelib.imaging, the new module is fully typed, uses the new ORM database abstraction, and is divided into submodules related to different kinds of imaging data (BIDS, DICOM, file parameters...).Future works