bids-standard / bidsutils

Utility functions for working with BIDS compatible datasets
3 stars 7 forks source link

Should this repo get 2nd life as bids-cmdline or smth like that? #6

Open yarikoptic opened 6 years ago

yarikoptic commented 6 years ago

For a while I felt the need, and at some point expressed it (but forgot where), to get a command line (or may be eventually some GUI) utility to manipulate a BIDS dataset. Quite often due to inherent redundancy, some trivial operations are not that trivial. E.g.

Ideally the tool should be aware of git and/or git-annex, i.e. that files might be under VCS and then should use corresponding VCS functions.

Originally I thought to propose this development within pybids, but per-se such utility (bids) does not have to (although likely will) be implemented using pybids. Some functionalities, which operate on BIDS-compliant datasets, could be achieved via re-layouting using pybids, but then it should also become capable to capture those under .heudiconv and sourcedata/ which is not strongly "prescribed" in BIDS (there is only a recommendation to follow BIDS naming there as well)

chrisgorgo commented 6 years ago

That would be a great tool. Happy to contribute!

tyarkoni commented 6 years ago

I think this kind of functionality could quite comfortably live inside of pybids. Note that per discussion in INCF/pybids#63, it's now possible to re-map entire file structures (both within BIDS and to/from other structures) in a pretty elegant way via grabbids/grabbit. The only thing we're missing is a set of output patterns that define all the valid BIDS paths.

This doesn't preclude a utility of the kind you're proposing, of course. From a UI standpoint, users don't want to have to muck around with project-wide remapping, they just want to call session_rename or something. But implementation-wise, I think it would be very nice from an abstraction and maintainability standpoint to implement these kinds of tools as wrappers around the existing grabbids/grabbit functionality.

yarikoptic commented 6 years ago

YES, definitely pybids/grabbids/grabbit should be used as much as possible! Although it sounds only logical, and makes many things easier, and precedents exist (nibabel providing nib-* utilites), I didn't dare to suggest it to live inside pybids, to not mud the purity of it:

but yeah, for a quick start could also be done within pybids -- so "to be decided" I guess ;)