FMRIPREP work_dir outputs

Hi all,

This may be painfully obvious, but how does fmriprep store all the processing outputs into work_dir in the organized way where each workflow/node inherits the working directory of the parent? I was playing around with nipype here and the top level workflow directory nuisance_regression_wf is in the right spot, but the other sub-workflows pop up in the directory I run the script from and all the nodes execute in /tmp. More pointedly, how do I get workflows/nodes to inherit base_dir have them make a directory and store results/other directories within it.

Thank you all for your help/wisdom,

In general the work_dir is only used for debugging and nipype does not provide much in terms of customizing it. To save a particular node output in a specific folder under a specific file name you should use a DataSink.

Thank you Chris, I’ll look into saving more outputs with DataSink.