Detection of fs-subjects-dir in 20.0.2

I thought I should split questions up as I believe these are unrelated. I have pre-run Freesurfer and pointed fMRIprep to the directory, but the report still says “FreeSurfer reconstruction: Run by fMRIPrep”. However, in the log (attached), the section about reconall just says:

00310-19:11:22,508 nipype.workflow INFO:
	 [Node] Setting-up "fmriprep_wf.single_subject_CBPD0201_wf.anat_preproc_wf.surface_recon_wf.autorecon1" in "/tmp/9999965.1.all.q/fmriprep_wf/single_subject_CBPD0201_wf/anat_preproc_wf/surface_recon_wf/autorecon1".
200310-19:11:22,648 nipype.interface INFO:
	 recon-all complete : Not running
200310-19:11:22,648 nipype.workflow INFO:
	 [Node] Running "autorecon1" ("smriprep.interfaces.freesurfer.ReconAll"), a CommandLine Interface with command:
echo recon-all: nothing to do
200310-19:11:22,650 nipype.interface INFO:
	 recon-all complete : Not running
200310-19:11:23,527 nipype.workflow INFO:
	 [Node] Finished "fmriprep_wf.single_subject_CBPD0201_wf.anat_preproc_wf.surface_recon_wf.autorecon1".

I’m trying to figure out whether my pre-run Freesurfer was actually used and the report is wrong, or if it’s not finding the freesurfer_t1 directory. The timestamp on scripts/recon-all.done for this subject is earlier, making me think that the directory is being found but not documented.

My fmriprep command:

 /usr/local/miniconda/bin/fmriprep /mnt/ /mnt/derivatives/ participant --participant-label CBPD0162 --fs-license-file /home/utooley/license.txt --fs-subjects-dir /mnt/derivatives/freesurfer_t2 --bids-filter-file /mnt/derivatives/fmriprep/ses-02.json --output-spaces MNI152NLin6Asym T1w MNIPediatricAsym:res-1:cohort-2 --ignore slicetiming sbref -w /tmp/9999954.1.himem.q

log.txt (671.9 KB)

Probably @effigies will have a clearer structure in his mind to reply your question. If he confirms your hypothesis, then I guess we should add some log trace to make more clear when the --fs-subjects-dir kicks in.

My guess is that when we say “Run by fMRIPrep” we’re checking output/freesurfer, and that didn’t change when we added the --fs-subjects-dir option.

That makes sense, and is in line with what I’m seeing–I can confirm that when I check the working directories and open an issue if so.

Hi. I think this is a related question, so I hope it’s fine I’m continuing this thread.

I run the fMRIPrep, version 21.0.2, on the pre-run and manually corrected Freesurfer data, version 7.1.1. When looking at the reports I noticed that for half of my participants their report says “FreeSurfer reconstruction: Run by fMRIPrep”, while for the rest of them the freesurfer input was correctly detected.

I did some tests on a couple of participants and I got the impression that for those that have the “Run by fMRIPrep” text, it’s mainly the autorecon3 that was repeated, or at least it gives the following messages:

resume recon-all : recon-all -all -noskullstrip -subjid sub-13227 -sd /data/derivatives/sourcedata/freesurfer -nomotioncor -notalairach -nonuintensitycor -nonormalization -nogcareg -nocanorm -nocareg -nocalabel -nonormalization2 -nomaskbfs -nosegmentation -nofill -notessellate -nosmooth1 -noinflate1 -noqsphere -nofix -nowhite -nosmooth2 -noinflate2 -nocurvHK -nocurvstats -nosphere -nosurfreg -nojacobian_white -noavgcurv -nocortparc -nopial -noparcstats -nocortparc2 -noparcstats2 -nocortparc3 -noparcstats3 -nopctsurfcon -nocortribbon -nohyporelabel -noaparc2aseg -nosegstats -nowmparc -nobalabels
221221-15:54:36,102 nipype.workflow INFO:
[Node] Finished

&

resume recon-all : recon-all -autorecon3 -openmp 8 -subjid sub-13227 -sd /data/derivatives/sourcedata/freesurfer -nosphere -nosurfreg -nojacobian_white -noavgcurv -nocortparc -nopial -noparcstats -nocortparc2 -noparcstats2 -nocortparc3 -noparcstats3 -nopctsurfcon -nocortribbon -nohyporelabel -noaparc2aseg -nosegstats -nowmparc -nobalabels
221221-16:06:05,681 nipype.workflow INFO:
[Node] Running “autorecon3” (“smriprep.interfaces.freesurfer.ReconAll”), a CommandLine Interface with command:
recon-all -autorecon3 -openmp 8 -subjid sub-13227 -sd /data/derivatives/sourcedata/freesurfer -nosphere -nosurfreg -nojacobian_white -noavgcurv -nocortparc -nopial -noparcstats -nocortparc2 -noparcstats2 -nocortparc3 -noparcstats3 -nopctsurfcon -nocortribbon -nohyporelabel -noaparc2aseg -nosegstats -nowmparc -nobalabels
221221-16:06:05,682 nipype.interface INFO:
resume recon-all : recon-all -autorecon3 -openmp 8 -subjid sub-13227 -sd /data/derivatives/sourcedata/freesurfer -nosphere -nosurfreg -nojacobian_white -noavgcurv -nocortparc -nopial -noparcstats -nocortparc2 -noparcstats2 -nocortparc3 -noparcstats3 -nopctsurfcon -nocortribbon -nohyporelabel -noaparc2aseg -nosegstats -nowmparc -nobalabels
221221-16:06:07,60 nipype.workflow INFO:

Otherwise, recon-all seems not to be running (“recon-all: nothing to do” or “recon-all complete : Not running”). Have you encountered this before? I’d like to make sure fMRIPrep uses the correct GM and WM segmentations.

Hi @khat and welcome to neurostars!

This is a very old issue, so you should open a new issue under the “Software Support” category, making sure to fill in the information in the pre-populated template. Of note, your 7.1.1 inputs would likely work better with fMRIprep 22+, since it includes FreeSurfer v7 in the container. Please update to that version, try again, and if something is still not right please open the issue.

Best,
Steven

1 Like