Nipype recalculates preprocessing

@Jonathan_R_Williford
The preprocessing is imported within that script.

A little info on how nipype handles rerunning:

Nipype will always search the node’s working directory when rerunning. If this isn’t found, the node will fully run through. If it is found, the node has a hash value for each input provided - by default, this hash is made from the file’s size and modification time. This method is much quicker to compute than checking the full file content, and generally will catch any changes.

If every calculation performed during a workflow is handled through nodes, the default hashing isn’t likely to run into problems. However, one of nipype’s features is connection string functions (like this one), which pass data from a node, to a helper function, to another node. These helper functions avoid the hash checking that node’s go through, so they are always rerun at runtime. If the helper functions are just selecting the nth index of a list, rerunning the workflow will always return the same file. But, if a helper function is writing out data to a file (as we saw in this post), the modification time of the file will change, causing nipype to treat the newly produced file as changed inputs. This can be avoided by either A) assigning the connection string function to a node or B) setting the hash method config setting to content. I recommend the former, since depending on the size of files you are working with, hashing may take quite a bit.