fMRIPrep is a robust and easy-to-use pipeline for preprocessing of diverse fMRI data. The transparent workflow dispenses of manual intervention, thereby ensuring the reproducibility of the results.
From Neurostars #2656, the aparcaseg derivatives may have different labels across subjects. This would appear to be a failure of selection in the following lines:
Possibly a more future-durable approach would be to assume any number of parcellations might be present, and perform a string comparison:
if segmentation.startswith('aparc'):
if segmentation == 'aparc_aseg':
def _sel(x): return [parc for parc in x if 'aparc+' in parc][0]
elif segmentation == 'aparc_a2009s':
def _sel(x): return [parc for parc in x if 'a2009s+' in parc][0]
elif segmentation == 'aparc_dkt':
def _sel(x): return [parc for parc in x if 'DKTatlas+' in parc][0]
segmentation = (segmentation, _sel)
From Neurostars #2656, the
aparcaseg
derivatives may have different labels across subjects. This would appear to be a failure of selection in the following lines:https://github.com/poldracklab/fmriprep/blob/c05b7bb7cf26ebd47be7b1a9c17f8ed937cb1133/fmriprep/workflows/anatomical.py#L1137-L1144
Currently the code assumes that the order of files is lexical, i.e.:
0)
mri/aparc+aseg.mgz
1)mri/aparc.a2009s+aseg.mgz
2)mri/aparc.DKTatlas+aseg.mgz
The reported behavior is consistent with unsorted outputs of
FreeSurferSource
. The simplest patch would be:Possibly a more future-durable approach would be to assume any number of parcellations might be present, and perform a string comparison: