Is There A Way To Get The Commands Run Out of FMRIPREP?

Hey Guys:

After FMRIPREP runs successfully through participants is there a way to extract the exact commands run and the order in which they are run (or at least a facsimile of the commands without subject-specific information if that is too onerous)? So like, right at the beginning of my processing stream I see something called bold_split is run as

fslsplit /data/sub-S06V1A/func/sub-S06V1A_task-compound_run-01_bold.nii -t

so basically a sequence of re-creatable commands in the order in which they are performed.


I guess that would require just enabling nipype’s provenance tracking. Is that correct, @satra?

Please also mind that some of the processing done in FMRIPREP is not perform using command line tools but via python code.

Just some thoughts.
I’ve been exploring the files generated in the working directory and:

  1. Wow, this is an amazing piece of architecture you guys have put together. Like this is really really cool.
  2. In graph1.json (in the fmriprep_wf directory) I think essentially represents the order of commands.
  3. From there any of those folders with a ‘command.txt’ file - i.e. 19_skullstrip_first_pass (in my pipeline) - will have the actual command run in that text file.
  4. However there are some ‘nodes’ - i.e. 7_normalize_motion - that have no command associated with it in either a text file or in the report.rst file nor anywhere else I can see at first glance. Some of these nodes like ‘gen_ref’ seem to basically be copying files but some like the normalize_motion node may be doing more although I can’t say for certain (I’m just guessing from the name).
  5. @ChrisGorgolewski is python code not saved in the same way as the command line code is in command.txt? I can see the difficulty between running & saving command line code vs. doing the same for python code but I guess I just assumed there was a utility that would save python code in a similar way for reference.

I clearly have not solved the issue nor figured out what each node does yet but this is what I’ve discovered so far in case it helps anyone else. Obviously this going through folders/nodes one by one like this is not a tenable solution to the query and getting automatically-generated output of any sort would be optimal but this is more for getting my own sense of the technical pipeline than anything.

Thank you for the kind words!

It is not, but that could be potentially implemented in nipype if you have the resources.