FSL scripting: error in execution of FSL FEAT

I am running a first-level analysis in FSL-FEAT. I have already ran my preprocessing with fmri-prep and am just running the Statistics in FSL. I have set it up running over a single participant and am trying to script the settings over multiple participants. Essentially, the bash script copies the settings into the subject folder and changes the subject number in the .fsf file. However, I get this error when running it. Has anyone encountered this or know of a solution?

child process exited abnormally
    while executing
"fsl:exec "${FSLDIR}/bin/feat_model design" $fmri(featModelOpts) -N feat0_model -l logs "
    (procedure "firstLevelMaster" line 43)
    invoked from within
"firstLevelMaster $session"
    invoked from within
"if { $done_something == 0 } {

    if { ! $fmri(inmelodic) } {
       if { $fmri(level) == 1 } {
	      for { set session 1 } { $session <= $fmri(mult..."
    (file "/usr/local/fsl/bin/feat" line 390)

Hi @aftonnelson ,

I’m not well-versed in FSL FEAT’s error messages; however, I think to successfully run FEAT using fmriprep output, you still need to run all of 1st level FEAT, not just the Statistics section. I believe this is the case because FEAT still expects all the folders/files from running all of FEAT. This is fine because FEAT doesn’t apply certain steps (e.g. registration) until the 2nd level. If you haven’t already, I’d highly recommend checking out @Jeanette_Mumford’s blog post on using FSL FEAT with fmriprep outputs.

Hope this helps a bit.

@dlevitas Thanks for the tip! I remember reading this somewhere before and noting it down but I couldn’t remember why I had done so! Thank you!!

@Jeanette_Mumford I am looking through your very helpful tutorial! Thank you for sharing! I do have one question about running the full analysis on the first level… You mention the settings (6DoF) for the registration, but what about the pre-stats tab? All of this preprocessing has already been done in fmri-prep… is it fine to shut the settings off in this section, or will it also be affective when trying to run the higher level anaylses?

@aftonnelson ,

Yes, you can turn off the pre-stats steps that fmriprep has already done for you, for example, motion correction. You may wish to keep spatial smoothing on, as fmriprep doesn’t perform this step.

@dlevitas Okay, good to know that this shouldn’t be effective for the formatting of later steps.
Also, I found that if you run ICA-aroma, fmri-prep does perform a 6mm spatial smoothing.

Two additional questions/issues:

  1. I am a bit unclear about the application of the registration… So, I have followed her tutorial and ran the full analysis at the first level, in which I turned off the pre-stats settings and ran the registration. I then replaced the registration and accounted for the interpolation. But where does the application of my registration that I obtained from fmri-prep in the higher level analysis of FSL occur?

  2. I have made the adjustments to run the full analysis, and I now try scripting again for additional participants. However, I end up with the same error as in my initial post…

Good catch, I had forgotten about that

Regarding your two points:

1). Although you have to set the registration up in the 1st level of FEAT, it’s not actually applied until the 2nd level. What the blog post helps you do is feed FEAT an identity matrix, so that when registration is performed at the 2nd level, it’s functionally doing nothing; the final result is just your fmriprep data.

2). Are you able to share your FEAT file (.fsf)? That may make debugging a bit easier.

  1. Ah, that makes more sense! I was missing the point that it essentially doesn’t do anything but still needs the identity matrix. Thank you for elaborating!

  2. I have found the error and have made it work. In my case, it was an issue of renaming the paths in the .fsf file. The template from Andy’s Brain Book assumes only the replacement of ‘sub-xx’. However, long paths that include the subject number were also be changed but to the incorrect path. I had to find all of the occasions where the subject number was used and replace the sub-id including the neighbor characters with sed. Now, it seems to work for me.

1 Like

MANAGED BY INCF