Skip to content

How to Run fMRIPrep once to generate 2 or more sets of results for fMRI data based on 2 more choices of a parameter at a middle point of the workflows without rerunning the entire pipeline again ? #2671

Open
@magicbrainresearch

Description

@magicbrainresearch

There are many options to choose when preprocessing fMRI data. For a research purpose, we may want to generate different sets of preprocessing results to study effects of the choices of some parameters on image quality. For example, we may want to generate two sets of preprocessed results with and without slice timing correction. The current version of fMRIPrep pipeline gives such a choice (with or skipping slice timing correction) to run. But it seems that we have to run the entire pipeline twice, one for yes and one for no, for the choice of the slice timing correction. Can we just run once to get the two sets of results ? We did not see a document to describe this. It may not be the documentation problem. The current version of the software has been implemented that way ?

I understand that fMRIPrep is implemented mainly based on nipype. From the guide of nipype, there is a mechanism, namely, iterables, to implement a loop. So, I am wondering, can I make some quick modifications of the scripts in fmriprep to implement such a loop function?

For example, if there is a pseudocode code to define a node of slice timing correction here:

SliceTimer - correct for slice wise acquisition

slicetimer = Node(SliceTimer(STC_choice=True,
interleaved=True,
output_type='NIFTI',
time_repetition=TR)),
name="slicetimer")

slice_timing_correction_choice_list = ['yes', 'no']
slicetimer.iterables = ("STC_choice", slice_timing_correction_choice_list )

By slightly modifying the interface code of SliceTimer such that it will simply return when the choice of STC_choice is no or will call the old codes when the choice is yes, then we imagine that we can finish such an implementation.

But we are afraid of that things may not be that simple. fMRIPrep is a great pipeline, but it is also very sophisticatedly complicated at the same time. It is far different from any previous software packages, like SPM, which we can debug into each code to do some simple modifications. So the best solution is to ask the experts from fMRIPrep group to teach us how to modify the codes to implement this function.

The slice timing choice is just an example for the purpose to describe the problems we have. We may need to implement such a loop function for other choices.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions