Fmriprep: Errors running resting state data w/cifti output ds002372

Created on 14 Sep 2020  路  3Comments  路  Source: nipreps/fmriprep

I'm trying to process the Yale single-subject dataset with the latest version of fmriprep and with cifti output but running into some errors. I think some of these errors might stem from missing and corrupted files in the dataset, but can't figure out which files in particular if that is the case.

What version of fMRIPrep are you using?

20.2.0rc0

What kind of installation are you using? Containers (Singularity, Docker), or "bare-metal"?

Singularity container

What is the exact command-line you used?

singularity run -B /scratch,/om,/om2 --cleanenv fmriprep-latest.simg \
  /om2/user/jsmentch/data/datalad/ds002372 /om2/user/jsmentch/data/datalad/ds002372/derivatives \
participant \
  --participant-label RTC01 --task-id rest --cifti-output --nthreads 30 -w /scratch/Fri/jsmentch/cache \
--omp-nthreads 30 --skip_bids_validation --ignore slicetiming \
--fs-license-file /om2/user/jsmentch/data/freesurfer_license.txt

Have you checked that your inputs are BIDS valid?

It is valid but there are a number of warnings. See here: https://openneuro.org/datasets/ds002372/versions/1.0.0. I've corrected warning 1, echo timing.

Did fMRIPrep generate the visual report for this particular subject? If yes, could you share it?


sub-RTC01.html.gz

Can you find some traces of the error reported in the visual report (at the bottom) or in crashfiles?

There were 10 errors, of three different types. One is that 3 of the resting state run 1 nifti files are corrupted or damaged which I will contact the dataset uploader about. Here are examples of the other two types of errors which come from sessions with seemingly valid nifti files and I can't figure out:

Node Name: fmriprep_wf.single_subject_RTC01_wf.func_preproc_ses_func12_task_rest_run_01_wf.initial_boldref_wf.gen_ref

File: /om2/user/jsmentch/data/datalad/ds002372/derivatives/fmriprep/sub-RTC01/log/20200911-130644_c271ec54-d88f-44c8-a583-8d2656fef202/crash-20200911-132728-jsmentch-gen_ref-65812abd-b85e-45ba-a788-d37ff03097f2.txt
Working Directory: /scratch/Fri/jsmentch/cache/fmriprep_wf/single_subject_RTC01_wf/func_preproc_ses_func12_task_rest_run_01_wf/initial_boldref_wf/gen_ref
Inputs:
in_file:
mc_method: AFNI
multiecho: False
sbref_file:
Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
    result["result"] = node.run(updatehash=updatehash)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 516, in run
    result = self._run_interface(execute=True)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 635, in _run_interface
    return self._run_command(execute)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 741, in _run_command
    result = self._interface.run(cwd=outdir)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 419, in run
    runtime = self._run_interface(runtime)
  File "/usr/local/miniconda/lib/python3.7/site-packages/niworkflows/interfaces/registration.py", line 491, in _run_interface
    ref_im += nb.four_to_three(nib_i)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nibabel/funcs.py", line 172, in four_to_three
    arr = np.asanyarray(img.dataobj)
  File "/usr/local/miniconda/lib/python3.7/site-packages/numpy/core/numeric.py", line 553, in asanyarray
    return array(a, dtype, copy=False, order=order, subok=True)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nibabel/arrayproxy.py", line 391, in __array__
    arr = self._get_scaled(dtype=dtype, slicer=())
  File "/usr/local/miniconda/lib/python3.7/site-packages/nibabel/arrayproxy.py", line 358, in _get_scaled
    scaled = apply_read_scaling(self._get_unscaled(slicer=slicer), scl_slope, scl_inter)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nibabel/arrayproxy.py", line 337, in _get_unscaled
    mmap=self._mmap)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nibabel/volumeutils.py", line 534, in array_from_file
    getattr(infile, 'name', 'object')))
OSError: Expected 1397550000 bytes, got 1325698720 bytes from object
 - could the file be damaged?





File: /om2/user/jsmentch/data/datalad/ds002372/derivatives/fmriprep/sub-RTC01/log/20200911-130644_c271ec54-d88f-44c8-a583-8d2656fef202/crash-20200911-134421-jsmentch-_n4_correct26-07e82f25-25ed-4894-bed1-9fbf139db777.txt
Working Directory: /scratch/Fri/jsmentch/cache/fmriprep_wf/single_subject_RTC01_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct26
Inputs:
args:
bias_image:
bspline_fitting_distance:
bspline_order:
convergence_threshold:
copy_header: True
dimension: 3
environ: {'NSLOTS': '1'}
histogram_sharpening:
input_image: /scratch/Fri/jsmentch/cache/fmriprep_wf/single_subject_RTC01_wf/anat_preproc_wf/anat_template_wf/t1w_conform/mapflow/_t1w_conform26/sub-RTC01_ses-func27_T1w_ras.nii.gz
mask_image:
n_iterations:
num_threads: 1
output_image:
rescale_intensities: False
save_bias: False
shrink_factor:
weight_image:
Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.7/shutil.py", line 557, in move
    os.rename(src, real_dst)
FileNotFoundError: [Errno 2] No such file or directory: '/scratch/Fri/jsmentch/cache/fmriprep_wf/single_subject_RTC01_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct26/_0x3b871ea37d37983c4c154bbc0f2c04ed_unfinished.json' -> '/scratch/Fri/jsmentch/cache/fmriprep_wf/single_subject_RTC01_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct26/_0x3b871ea37d37983c4c154bbc0f2c04ed.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
    result["result"] = node.run(updatehash=updatehash)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 531, in run
    shutil.move(hashfile_unfinished, hashfile_unfinished.replace("_unfinished", ""))
  File "/usr/local/miniconda/lib/python3.7/shutil.py", line 571, in move
    copy_function(src, real_dst)
  File "/usr/local/miniconda/lib/python3.7/shutil.py", line 257, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/local/miniconda/lib/python3.7/shutil.py", line 120, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/scratch/Fri/jsmentch/cache/fmriprep_wf/single_subject_RTC01_wf/anat_preproc_wf/anat_template_wf/n4_correct/mapflow/_n4_correct26/_0x3b871ea37d37983c4c154bbc0f2c04ed_unfinished.json'

Are you reusing previously computed results (e.g., FreeSurfer, Anatomical derivatives, work directory of previous run)?

no

bug

Most helpful comment

I was actually pulling the dataset down to check your hypothesis. Will report back when done.

All 3 comments

I'm thinking these other errors must be due to other corrupt files and not an issue with fmriprep. I'm going to try to ensure all of the files are readable and try to run again after, will close this for now

I was actually pulling the dataset down to check your hypothesis. Will report back when done.

@oesteban I'm curious if you found anything out? I'm having a similar issue to @jsmentch 馃檪

Was this page helpful?
0 / 5 - 0 ratings