Dwipreproc - eddy options

Dear MRtrix community,
I am facing a problem with -eddy-options when passing more than one option:
-eddy_options="–slm=linear --repol"
It works with only one input either slm or repol, but doesn’t recognise the second option when giving 2 of them. I thought to enter the options separately like this :
i.e. -eddy_options="–slm=linear " -eddy_options="–repol " , but I am not sure if the output would be over-written in this way ?
Could you please help me to fix the problem.

Hi there,

Perhaps the error is due to mentioning -eddy_options=

This is a small difference in syntax between FSL and MrTrix, only FSL uses the equal to sign after the option (for some commands). So I guess removing the equal to sign after eddy_options should fix it. Also leave a space after your opening inverted comma (I use single rather than double) with the eddy commands.

example script:

dwipreproc rpe_none pe_dir PA eddy_options ’ --slm=linear --repol’ IN OUT

Hope this helps!

Hi Nic,

Thanks a lot for your reply.
I removed the equal = sign and used single comma but this time getting the error :
eddy_options : expected one argument
So it still does not accept two inputs.
Here is the code I use:
dwipreproc sub-020_denoised.mif sub-020_PP.mif -rpe_pair -pe_dir RL -se_epi sub-020_b0s.mif -eddy_options ’ --slm=linear --repol’

Do you have any suggestions ?


Hi Suzi,

The script looks good to me. Usually you can rerun it with the -debug option to see the detailed output and where it might be failing. But this seems to be an issue with the FSL eddy command.

Could you try running this directly with eddy? If you go to the temporary directory that was created when you ran dwipreproc, you can convert the .mif files to nifti using mrconvert and then run eddy like so:

eddy_openmp --imain=eddy_in.nii --mask=eddy_mask.nii --acqp=eddy_config.txt --index=eddy_indices.txt --bvecs=bvecs --bvals=bvals --slm=linear --repol --out=dwi_post_eddy

If this works, maybe the -debug option will give you more information about why the dwipreproc script was failing. And if it doesn’t then it’s likely an FSL issue.



Hi Suzi,

Can you try using a combination of double inverted commas, and inclusion of the extra space after the opening quote?

So precisely this:

-eddy_options " --slm=linear --repol"

The occasional necessity for the extra space is a weird glitch in the Python argparse module that I never fully figured out, but it’s really irritating…

Hi Robert,

Thanks for your help but still it gives the same error:-(
Error: argument -eddy_options: expected one argument

I am using “Massive” and guess the problem is linked to how FSL and MRtrix are installed in Massive environment. There are pretty organised directories for previous versions of Matrix on Massive, but unfortunately not for the latest version. It seems that MRtrix/3.0_rc3 version is built as an encapsulated singularity container in Massive, so the contents can’t be easily viewed and as a result not editable.
I will install MRtrix/3.0_rc3 on personal laptop and try the suggested solutions.
Again thanks for your support.

Error: argument -eddy_options: expected one argument

This error indicates that the -eddy_options command-line option has been specified more than once in the dwipreproc invocation. This command-line options needs to appear no more than once; hence why the double inverted commas are necessary to encapsulate multiple command-line options that you wish to propagate down to eddy into a single string.

Can you provide precisely the command string that you are attempting to execute?