nilearn / nilearn

Machine learning for NeuroImaging in Python
http://nilearn.github.io
Other
1.19k stars 602 forks source link

Proposal: use ancpbids to handle BIDS datasets #3045

Open erdalkaraca opened 3 years ago

erdalkaraca commented 3 years ago

A while back in the discord bids channel some contributors discussed about a lightweight BIDS I/O library to integrate into nilearn. We have developed such a lightweight library at the ANCP lab and would like your to review it for an integration and/or give feedback.

https://github.com/ANCPLabOldenburg/ancp-bids

Benefits to the change

A more feature complete BIDS compliant I/O library.

Pseudocode for the new behavior, if applicable

layout = ancpbids.BIDSLayout(dataset_path)
events_files = layout.get(return_type='filenames', suffix=schema.SuffixEnum.events.name, extension='tsv', subject=sub_label, **filters)
erdalkaraca commented 2 years ago

Update: The ancpBIDS package is converging towards a stable 0.1.0 version.

There is an additional repo to show how ancpBIDS can be used in your own pipelines:

https://github.com/ANCPLabOldenburg/ancp-bids-apps

https://github.com/ANCPLabOldenburg/ancp-bids-apps/blob/main/ancpbidsapps/analysis/nilearn_first_level.py

I have replicated nilearn's first_level_from_bids() as a demo pipeline callable from command line.

Feel free to comment and give feedback.