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

use bids-matlab to create derivatives filenames #32

Open
Remi-Gau opened this issue May 29, 2021 · 2 comments
Open

use bids-matlab to create derivatives filenames #32

Remi-Gau opened this issue May 29, 2021 · 2 comments

Comments

@Remi-Gau
Copy link
Collaborator

Quick FYI that I have added some functions in the dev branch of BIDS-matlab to help with derivatives filenames and JSON creation. And also to help "initializing" derivatives datasets.

See the Jupyter notebook demo: https://github.com/bids-standard/bids-matlab/blob/dev/examples/BIDS-Matlab_filenames-and-JSON.ipynb

One thing that would be nice to do from there is create a function (set of functions that can loop through the BIDS hierarchy of a dataset preprocessed with SPM and rename the files into something BIDSy).

fMRwhy does that. CPP_SPM will need to do that. I suspect there is a bazillion of other toolboxes that could benefit from having a repo with those functions.

Because it is SPM specific though, I don't want to put that in BIDS matlab, though BIDS matlab could have a more abstract overarching function that can help with this.

Let me know what you think

@jsheunis
Copy link
Owner

jsheunis commented Jun 1, 2021

This is really cool Remi, thanks for posting here!

I think helpers to create/update SPM-processed derivative data would be useful. There are some questions that jump to mind:

  • Like you mention, perhaps bids-matlab is not the best place for these to live. In the absence of anything else, I will (and have) implemented some basic functionality like this in fMRwhy. But do you think a separate package would be better?
  • There would have to be some consensus on how to name these derivatives, if it will be a single set of functions that are used widely. The SPM processed filenames are mostly easy to parse, and the bids structure is easy-ish to adhere to. We would just have to suggest a "standard" (e.g. using desc-sra_bold.nii for smoothed, realigned, slice-time corrected data [in reverse order]).

@Remi-Gau
Copy link
Collaborator Author

Remi-Gau commented Jun 1, 2021

* Like you mention, perhaps bids-matlab is not the best place for these to live. In the absence of anything else, I will (and have) implemented some basic functionality like this in fMRwhy. But do you think a separate package would be better?

yes a separate package or repo would be easier: easier for people to grab (fewer files and don't need to grab a whole pipeline and then ditch 99% of it) and add as library, but also to maintain and have people contribute back.

* There would have to be some consensus on how to name these derivatives, if it will be a single set of functions that are used widely. The SPM processed filenames are mostly easy to parse, and the bids structure is easy-ish to adhere to. We would just have to suggest a "standard" (e.g. using `desc-sra_bold.nii` for smoothed, realigned, slice-time corrected data [in reverse order]).

I would suggest we give some sensible defaults but make sure there is an easy way to map a certain prefixes into a series of sensible BIDS entity-label pairs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants