Open adam-coates opened 1 month ago
Leaving this here for anyone who's working with sub mm data. If using -hires
flag in recon-all (pre-run) before fMRIprep then T1.mgz will not be downsampled to 1mm isotropic and instead T1.mgz will still be the same voxel sizes as the input. fMRIprep does not automatically assume that the MNI output space should be resampled (i.e. if T1.mgz is not 1mm then specifying the MNI outputspace will cause fMRIprep to fail at autorecon1) . Instead it seems possible to specify and define non-standard spaces e.g. an MNI space with 0.6mm isotropic voxel sizes.
For now the above command runs with only --output-spaces T1w
What happened?
Running fMRIprep with pre-computed freesurfer output using -hires and -expert options flag in recon-all makes fMRIprep crash at autorecon1 stage
What command did you use?
What version of fMRIPrep are you running?
23.2.3
How are you running fMRIPrep?
Docker
Is your data BIDS valid?
Yes
Are you reusing any previously computed results?
FreeSurfer
Please copy and paste any relevant log output.
Additional information / screenshots
Node: fmriprep_23_2_wf.sub_1181001_wf.anat_fit_wf.surface_recon_wf.autorecon1 Working directory: /scratch/fmriprep_23_2_wf/sub_1181001_wf/anat_fit_wf/surface_recon_wf/autorecon1
Node inputs:
FLAIR_file =
T1_files = ['/scratch/fmriprep_23_2_wf/sub_1181001_wf/anat_fit_wf/anat_template_wf/anat_merge/sub-1181001_ses-1_acq-highres_T1w_noise_corrected_template.nii.gz']
T2_file =
args =
big_ventricles =
brainstem =
directive = autorecon1
environ = {}
expert =
flags = ['-noskullstrip', '-noT2pial', '-noFLAIRpial']
hemi =
hippocampal_subfields_T1 =
hippocampal_subfields_T2 =
hires = True
mprage =
mri_aparc2aseg =
mri_ca_label =
mri_ca_normalize =
mri_ca_register =
mri_edit_wm_with_aseg =
mri_em_register =
mri_fill =
mri_mask =
mri_normalize =
mri_pretess =
mri_remove_neck =
mri_segment =
mri_segstats =
mri_tessellate =
mri_watershed =
mris_anatomical_stats =
mris_ca_label =
mris_fix_topology =
mris_inflate = -n 50
mris_make_surfaces =
mris_register =
mris_smooth =
mris_sphere =
mris_surf2vol =
mrisp_paint =
openmp = 3
parallel =
steps =
subject_id = sub-1181001
subjects_dir = /sub-dir
talairach =
use_FLAIR =
use_T2 =
xopts =
Traceback (most recent call last): File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node result["result"] = node.run(updatehash=updatehash) File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run result = self._run_interface(execute=True) File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface return self._run_command(execute) File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 771, in _run_command raise NodeExecutionError(msg) nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node autorecon1.
Traceback: Traceback (most recent call last): File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 735, in _run_interface runtime.cmdline = self.cmdline File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/smriprep/interfaces/freesurfer.py", line 130, in cmdline cmd += self._prep_expert_file() File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/interfaces/freesurfer/preprocess.py", line 1660, in _prep_expert_file if not isdefined(self.inputs.xopts) and self._get_expert_file() == contents: File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/interfaces/freesurfer/preprocess.py", line 1681, in _get_expert_file return fobj.read() File "/opt/conda/envs/fmriprep/lib/python3.10/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 10: invalid continuation byte