Fmriprep output directory structure problem


Running into an odd problem with fmriPrep. Everything seems to be working correctly (no obvious error messages), but the output directory structure is wrong.

Each subject is scanned at two separate sessions, with standard T1s taken only at one of the two sessions. The directory structure after BIDS conversion looks correct, with the modality folders (anat, func, dwi, etc.) contained with the session folders.

However, after running fMRIprep on the same subject (only non-standard option specified is to turn off freesurfer), two separate anat directories are created. The first is a sub-directory of the session directory, but this only contains the affine transform text file. The second is created at the same level as the session directories and contains all of the output image files from fmriprep (brainmask, tissue maps, and preprocessed).

Nothing obvious is leaping out when checking the log files, so we are not sure what might be going wrong. All of the functional images contained in the func directories are being put in the correct level under the session directories.

Thanks in advance,


This correct and expected behavior. FMRIPREP takes all T1w images (in your case one) and uses them to create participant-specific templates that are later used for coregistration. This means that there will always be one T1w output independent of the number of sessions or runs. A decision was thus made to always output this template on the level of sub- (even if there is a ses- level).

Hi Chris,

Thanks for the quick response. Glad to know that something isn’t going wrong.



A good way to check if everything is ok is to open the HTML report and see if there are any errors listed in the “Errors” section.