MICA-MNI / micapipe

micapipe from the Multimodal imaging and connectome analysis lab (http://mica-mni.github.io) at the Montreal Neurological Institute. Read The Docs documentation below
http://micapipe.readthedocs.io
GNU General Public License v3.0
89 stars 31 forks source link

proc_surf does not fully run with externally processed fast/freesurfer #117

Open araikes opened 7 months ago

araikes commented 7 months ago

Hello,

When running micapipe v. 0.2.3 and using pre-run fast or freesurfer and then running -proc_surf, I get the following error:

[ INFO ]..... Creating proc_surf json file 
Image Exception : #63 :: No image files match: /xdisk/adamraikes/bids/derivatives/micapipe_0.2.3/fastsurfer/sub-xxx_ses-yy/mri/orig.mgz
No image files match: /xdisk/adamraikes/bids/derivatives/micapipe_0.2.3/fastsurfer/sub-xxx_ses-yy/mri/orig.mgz
Image Exception : #63 :: No image files match: /xdisk/adamraikes/bids/derivatives/micapipe_0.2.3/fastsurfer/sub-xxx_ses-yy/mri/orig.mgz
No image files match: /xdisk/adamraikes/bids/derivatives/micapipe_0.2.3/fastsurfer/sub-xxx_ses-yy/mri/orig.mgz

It's due to the following line where you are overwriting t1_2proc with the orig.mgz file and then attempting to run fslhd and mrinfo on that file instead of a NIFTI. This is different from the behavior when running fast or freesurfer within the container.

https://github.com/MICA-MNI/micapipe/blob/0a4315012128aafbe3dfeeeff969bd9b0f4abd15/functions/01_proc-surf.sh#L117

Recommend clarifying that when using preprocessed outputs, users must specify the T1w file that was used and then removing this line.

For clarity, I ran fastsurfer externally using the T1nativepro file but fastsurfer v. 2.2.0 with the output directory as ${out}/fastsurfer, so all of the outputs are there and where they are expected to be.