[Solved] Datasink omit subdirectories

Is there a way to have DataSink omit creating subdirectories in the output. For example if I am smoothing multiple runs then datasink creates subdirectories in the output, e.g. under smoothed I also get _smooth0, _smooth1, etc. for run1, run2 etc. It would be lovely if they would all be written under smoothed. Can I achieve this with substitutions? If so, how?

Hi,

http://nipype.readthedocs.io/en/latest/users/grabbing_and_sinking.html

Parameterization

The parameterization input parameter controls whether the data stored using DataSink is in a folder structure hat contains this iterable information or not

Setting datasink = pe.Node(interface=nio.DataSink(parameterization=False), name=‘Sink’) should do the trick

Joerg

2 Likes

Hi Joerg,

Thanks for the tip. I tried it and I got the following error:

for src in filename_to_list(files):
TypeError: 'NoneType' object is not iterable
Interface DataSink failed to run. 

When I run it without the parametrization it works.

Edit: Nevermind, it works. I spelled the word parameterization wrong. Now it works like a charm! Thanks!