Skip to content
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

♻️bids2table library for BIDS utils in CPAC, replacing and abstracting chunky utility functions #2116

Open
birajstha opened this issue May 22, 2024 · 0 comments · Fixed by #2121, #2124, #2125, #2126 or #2127
Assignees
Labels

Comments

@birajstha
Copy link
Contributor

birajstha commented May 22, 2024

User interface changes

bids2table is a python library for efficiently indexing large Neuroimaging datasets. It can be used in CPAC to replace some of these functions in order to provide abstraction and much cleaner looking code.

Project sub-parts and estimates

  1. Mapping the functions in CPAC/utils/bids_utils.py and finding out which ones can be replaced or reimplemented.
  2. Functions that could be replaced
    • collect_bids_files_configs
    • bids_gen_cpac_sublist

update

  • RPool object in engine.py is built directly from BIDSTable
  • The subject and session rows are grouped and then passed to the engine with a for loop.
  • Previous data_config_file is replaced the BIDSTable.
  • For each row in the BIDSTable a Resource object is initialized with attributes similar and in addition to the BIDSFile, BIDSEntity dataclasses. In future may be inherit from these classes.

To do

  • add write_to_disk(path) method to the Resource or the ResourcePool class
  • Implement StratPool

Timeline notes

No response

Timesink notes

No response

Frustration notes

No response

Design decisions and notes

image

  • Planning to add Resource and StratPool classes to abstract the bids data.
  • Looked into BIDSEntity , BIDSFile etc. classes in the bids2table library. It looks like Resource class can inherit one of these classes and we can add more methods to it like for e.g. write_to_disk(path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment