Open JohannesWiesner opened 1 year ago
It looks like we've got existing tests (https://github.com/nipy/nipype/blob/75796d554394271f1c7cd710b2a1ce8b499989ba/nipype/interfaces/tests/test_io.py#L459-L487), so I would say if you can come up with a patch that implements this that doesn't break those expectations (or those expectations are incidental), that would be fine.
It might be easier just to write your own DataSink that does what you want.
Summary
I have a feature request: It would be nice if it was possible to replace one regex-match with another one from the same input string for the the
regexp_substitutions
argument ofnipype.interfaces.io.Datasink
. Then one wouldn't have to define one substitution for every possible case. E.g. when the parameterization puts out something like this:and I would like to have the folders like this:
Then I currently have to do this:
It would be nice if one could use regex groups to something like (pseudo-code!):