-
Notifications
You must be signed in to change notification settings - Fork 532
Improved alternate DataGrabber interface #623
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
Conversation
|
||
>>> from nipype import SelectFiles, Node | ||
>>> dg = SelectFiles(infields=["subject_id"], | ||
... templates={"T1": "{subject_id}/struct/T1.nii", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we simply do it with templates
and no infields
? and use anything the person provides in {} to create dynamic inputs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this was actually my original idea and then I forgot. I will implement this.
Improved alternate DataGrabber interface
This alternate approach to the DataGrabber uses the {}-based string format syntax instead of the %-based syntax of the previous version. Because it is totally backwards incompatible with the original DataGrabber, I wrote it as as second class.
Please don't merge with the
DataGrabber2
name, that is just a placeholder. Suggestions for other names are welcome. We could go with a name that distinguishes it from DataGrabber (e.g.FormatGrabber
, although that doesn't make a lot of sense), or just a synonym (e.g.SelectFiles
). I'd probably lead towards the latter.I think this approach should cover (at least) as many use cases as the existing DataGrabber, but please let me know if there's something obvious I've left out.