Fmriprep-docker fieldmap correction

I have trying to us fmriprep-docker on a data set with TOPUP (AP, PA) fieldmap correction. I have run bids-validator on my data set (single subject at this moment) and everything looks ok. My json files for the two AP and PA acquisitions are

cat sub-34P1030fmap_acq-rest_dir-AP_epi.json
{
“PhaseEncodingDirection”: “j-”,
“TotalReadoutTime”: 0.079,
“IntendedFor”: “func/sub-34P1030fmap_task-rest_bold.nii.gz”
}

and

cat sub-34P1030fmap_acq-rest_dir-AP_epi.json
{
“PhaseEncodingDirection”: “j-”,
“TotalReadoutTime”: 0.079,
“IntendedFor”: “func/sub-34P1030fmap_task-rest_bold.nii.gz”
}

respectively. Unfortunately, I encounter a problem very quickly into the processing. The crash report in the HTML report is at the end of this post. It looks as if the input file for the merge node is not being treated as an array but as a string. This results in the filename being split into individual characters. At least that is my interpretation of what is going on.

Any suggestions on how to fix this problem? Basically, I just want to run a functional data set with a TOPUP distortion correction.

Thanks in advance for your help.

Bob

Node Name: fmriprep_wf.single_subject_34P1030_wf.func_preproc_task_rest_wf.pepolar_unwarp_wf.prepare_epi_matching_wf.merge
File: crash-20170721-203045-root-merge-472715c2-90c1-43cc-b840-034b1a4937ee.pklz
Working Directory: /scratch/fmriprep_wf/single_subject_34P1030_wf/func_preproc_task_rest_wf/pepolar_unwarp_wf/prepare_epi_matching_wf/merge
Inputs:
args:
auto_detect_sensitivity: True
average_metric:
environ: {‘SUBJECTS_DIR’: ‘/opt/freesurfer/subjects’}
fixed_timepoint: True
ignore_exception: False
in_files:
in_intensity_scales:
initial_timepoint: 1
initial_transforms:
intensity_scaling: True
no_iteration: True
out_file: template.nii.gz
outlier_sensitivity:
scaled_intensity_outputs:
subjects_dir: /opt/freesurfer/subjects
subsample_threshold: 200
terminal_output: stream
transform_outputs:
Traceback (most recent call last):
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/plugins/multiproc.py”, line 301, in send_procs_to_workers
jobid].hash_exists()
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py”, line 244, in hash_exists
hashed_inputs, hashvalue = self.get_hashval()
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py”, line 407, in get_hashval
self.get_inputs()
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py”, line 467, in get_inputs
self.set_input(key, deepcopy(output_value))
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py”, line 223, in set_input
setattr(self.inputs, parameter, deepcopy(val))
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/interfaces/base.py”, line 2076, in validate
value = super(MultiPath, self).validate(object, name, newvalue)
File “/usr/local/miniconda/lib/python3.6/site-packages/traits/trait_types.py”, line 2336, in validate
return TraitListObject( self, object, name, value )
File “/usr/local/miniconda/lib/python3.6/site-packages/traits/trait_handlers.py”, line 2313, in init
raise excp
File “/usr/local/miniconda/lib/python3.6/site-packages/traits/trait_handlers.py”, line 2305, in init
value = [ validate( object, name, val ) for val in value ]
File “/usr/local/miniconda/lib/python3.6/site-packages/traits/trait_handlers.py”, line 2305, in
value = [ validate( object, name, val ) for val in value ]
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/interfaces/traits_extension.py”, line 92, in validate
self.info_text, value))
traits.trait_errors.TraitError: The trait ‘in_files’ of a RobustTemplateInputSpec instance is an existing file name, but the path ‘/’ does not exist.
Error setting node input:
Node: merge
input: in_files
results_file: /scratch/fmriprep_wf/single_subject_34P1030_wf/func_preproc_task_rest_wf/pepolar_unwarp_wf/prepare_epi_matching_wf/split/result_split.pklz
value: [’/’, ‘s’, ‘c’, ‘r’, ‘a’, ‘t’, ‘c’, ‘h’, ‘/’, ‘f’, ‘m’, ‘r’, ‘i’, ‘p’, ‘r’, ‘e’, ‘p’, '
’, ‘w’, ‘f’, ‘/’, ‘s’, ‘i’, ‘n’, ‘g’, ‘l’, ‘e’, '
’, ‘s’, ‘u’, ‘b’, ‘j’, ‘e’, ‘c’, ‘t’, '
’, ‘3’, ‘4’, ‘P’, ‘1’, ‘0’, ‘3’, ‘0’, '
’, ‘w’, ‘f’, ‘/’, ‘f’, ‘u’, ‘n’, ‘c’, '
’, ‘p’, ‘r’, ‘e’, ‘p’, ‘r’, ‘o’, ‘c’, ‘’, ‘t’, ‘a’, ‘s’, ‘k’, '’, ‘r’, ‘e’, ‘s’, ‘t’, ‘’, ‘w’, ‘f’, ‘/’, ‘p’, ‘e’, ‘p’, ‘o’, ‘l’, ‘a’, ‘r’, '’, ‘u’, ‘n’, ‘w’, ‘a’, ‘r’, ‘p’, ‘’, ‘w’, ‘f’, ‘/’, ‘p’, ‘r’, ‘e’, ‘p’, ‘a’, ‘r’, ‘e’, '’, ‘e’, ‘p’, ‘i’, ‘’, ‘m’, ‘a’, ‘t’, ‘c’, ‘h’, ‘i’, ‘n’, ‘g’, '’, ‘w’, ‘f’, ‘/’, ‘s’, ‘p’, ‘l’, ‘i’, ‘t’, ‘/’, ‘m’, ‘a’, ‘p’, ‘f’, ‘l’, ‘o’, ‘w’, ‘/’, ‘_’, ‘s’, ‘p’, ‘l’, ‘i’, ‘t’, ‘0’, ‘/’, ‘v’, ‘o’, ‘l’, ‘0’, ‘0’, ‘0’, ‘0’, ‘.’, ‘n’, ‘i’, ‘i’, ‘.’, ‘g’, ‘z’]

This looks like a bug where a string is being treated as a list. Could you open an issue on the GitHub page for this?

Absolutely. I will post in a few minutes.

1 Like

I bet FMRIPREP expects IntendedFor to be a list of strings, but according to BIDS it’s perfectly ok that it’s a single string.

1 Like