I posted in another thread but I did not clearly state my initial issue, and the thread got off track. I am posting again with hopes of some clarification regarding using pre-run Freesurfer outputs from multiple sessions in fMRIPrep.
The Study:
We are conducting a multiple session study (two timepoints), and expecting GM change and functional change between each subject’s sessions.
The Data:
We have pre-run Freesurfer for each subject’s session, processed cross-sectionally (i.e. not using Freesurfer longitudinal pipeline).
The Desired behavior:
We would like to use our pre-run and QC’d Freesurfer output at each subject’s session to separately process fMRI data at each subject’s related session.
That is, we want each session’s fMRIPrep functional pre-processing to use the corresponding pre-run QC’d Freesurfer output.
For example,
Subject 1: FS Session 1 for fMRIprep Session 1; FS Session 2 for fMRIPres Session 2.
Subject 2: FS Session 1 for fMRIprep Session 1; FS Session 2 for fMRIPres Session 2.
The problem:
When placing pre-run Freesurfer outputs in /out/freesurfer/sub-1 we can only place one session’s pre-run Freesurfer outputs.
This is because Freesurfer’s outputs (folder names: label, mri, scripts, stats, surf, tmp, touch, trash) are the same for each session.
So, when I copy those outputs into /out/freesurfer/sub-999 there is a duplicate naming issue.
The question:
Does fMRIPrep allow for the use of two separate Freesurfer inputs for a single participant?
I have tried splitting the freesurfer folder (/out/freesurfer/sub-999) into sessions (/sub-1/ses-1 and /sub-1/ses-2) according to BIDS, but that caused an error.
Fmriprep expects Freesurfer folder to contain one folder per subject. So you can have one folder called FS_ses1, for example, and put all ses1 FS outputs there. Do the same with FS_ses2. Then you can specify the session you want to run with a bids filter file, and specify where you want fmriprep to look for FS outputs (fs-subjects-dir).
Hi @Steven - I have the same question as the OP. I’m processing the NKI RS dataset session-wise through fastsurfer (a DL implementation of freesurfer; the outputs dir structure is exactly like freesurfer) and then I’d like fmriprep to use the pre-computed fastsurfer outputs for the a given session. I’m considering doing what you’ve suggested above but I want to make sure I understand the proposed workflow correctly.
Run Freesurfer on every session within a subject and organize the outputs as
Since the dataset has a maximum of 4 sessions so I’ll need four different bids filter files in total. Am I understanding the suggested workflow correctly?
No, that would not work. fMRIprep expects outputs to be in folders as SUBJECTS_DIR/sub-xx/. It does not expect session organized freesurfer inputs and will not look in them. What you would need to do is something like
Thanks for the quick response @Steven that clarifies things a great deal!! I’ll try it out.
A couple follow up questions: Would processing subjects with multiple sessions “cross-sectionally” cause within subject registration inconsistencies? Or would all sessions be registered to a default template? If so, what’s the default template used for registration?
Default is MNI152NLin2009cAsym and you can specify other with the --output-spaces argument.
There may be inconsistencies based on the quality of T1s at each time point and time between them (i.e., if sessions were separated by years, during which there could be plausible brain change).