Why is fMRIprep combining anatomical images even though I'm using the "--longitudinal" argument?

Hi all!

I have an issue with getting fMRIprep to separately preprocess my anatomical images from two different sessions. My study has two sessions that take place several months apart so we are hypothesizing anatomical changes between sessions and thus it’s important that the two T1 images are preprocessed separately. I’m running fMRIprep with the following call:

apptainer run --cleanenv fmriprep_container.sif /home/user/bids/participants/sub-1001 /home/user/bids/participants/fmriprep/sub-1001_fprep participant --participant-label sub-1001 --fs-license-file /home/user/fmriprep/license.txt --skip-bids-validation --nthreads 8 --omp-nthreads 4 --output-spaces MNI152NLin6Asym:res-2 MNI152NLin2009cAsym --write-graph --longitudinal

As can be seen the --longitudinal argument is also being passed. However my outputs are creating a single folder with the anatomical preprocessed data whereas I had assumed that if the T1 images are preprocessed independently then there should be two separate anatomical files with independent anatomical images for the two sessions.

In other words the output folder sub-1001_fprep/sub-1001/anat contains 52 files for a single preprocessed anatomical image, whereas the output folders sub-1001_fprep/sub-1001/ses-01/anat and sub-1001_fprep/sub-1001/ses-02/anat only contain a single .txt file each.

Is there somthing wrong with the way I’m running fMRIprep or is there something else that I’m overlooking here?

Many thanks in advance for your help!

The longitudinal flag creates an unbiased anatomical image across sessions, rather than processing each session separately. See here.

To process each session separately, you’ll need to create BIDS filter files selecting the session and run fMRIPrep separately for each session-specific filter file.

Thank you for your response. Does anyone know if there are any guidelines on what is the correct approach for a given analysis? For example, when comparing structural changes across longitudional sessions, or when looking at changes in resting state connectivity across longitudional sessions? I can’t find much detaild information about this online.

Hi @scanner101 you should use the longitudinal freesurfer pipeline if you’re interested in structural changes. The longitudinal template can be passed on to fmriprep if you add the —fs-no-resume flag. I would say you would only want to completely separate anatomical images if there’s been a lot of brain change between subsequent sessions (e.g., a child vs adult).

Best,
Steven

1 Like

Thanks. Where can I learn more? Do you know, will it affect the results a pre vs post connectivity analysis if I register ses-01 and ses-02 to the same T1 image (eg the ses-01 or the unbiased image) or if register them to two different T1 images?

Hi @scanner101,

https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/LongitudinalTutorial

It depends on how different the images are, and if the warps to standard space are such that one voxel in standard space will map to meaningfully different places in the two original images.

Best,
Steven

Thank you for your thoughts :slight_smile: