poldracklab / tacc-openneuro

0 stars 1 forks source link

ds002237-mriqc: "zran_read returned error: ZRAN_READ_FAIL" #49

Open jbwexler opened 1 year ago

jbwexler commented 1 year ago

For about half the subjects:

Node: mriqc_wf.funcMRIQC.non_steady_state_detector Working directory: /scratch1/03201/jbwexler/work_dir/mriqc/ds002237_sub-11/mriqc_wf/funcMRIQC/_infile..scratch1..03201..jbwexler..openneuro_derivatives..derivatives..mriqc..ds002237-mriqc..sourcedata..raw..sub-11..func..sub-11_task-loc_bold.nii.gz/non_steady_state_detector

Node inputs:

in_file = /scratch1/03201/jbwexler/openneuro_derivatives/derivatives/mriqc/ds002237-mriqc/sourcedata/raw/sub-11/func/sub-11_task-loc_bold.nii.gz

Traceback (most recent call last): File "/opt/conda/lib/python3.9/site-packages/mriqc/engine/plugin.py", line 60, in run_node result["result"] = node.run(updatehash=updatehash) File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py", line 524, in run result = self._run_interface(execute=True) File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py", line 642, in _run_interface return self._run_command(execute) File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py", line 750, in _run_command raise NodeExecutionError( nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node non_steady_state_detector.

Traceback (most recent call last): File "/opt/conda/lib/python3.9/site-packages/nipype/interfaces/base/core.py", line 398, in run runtime = self._run_interface(runtime) File "/opt/conda/lib/python3.9/site-packages/nipype/algorithms/confounds.py", line 986, in _run_interface in_nii.dataobj[:, :, :, :50].mean(axis=0).mean(axis=0).mean(axis=0) File "/opt/conda/lib/python3.9/site-packages/nibabel/arrayproxy.py", line 397, in getitem return self._get_scaled(dtype=None, slicer=slicer) File "/opt/conda/lib/python3.9/site-packages/nibabel/arrayproxy.py", line 358, in _get_scaled scaled = apply_read_scaling(self._get_unscaled(slicer=slicer), scl_slope, scl_inter) File "/opt/conda/lib/python3.9/site-packages/nibabel/arrayproxy.py", line 339, in _get_unscaled return fileslice(fileobj, File "/opt/conda/lib/python3.9/site-packages/nibabel/fileslice.py", line 790, in fileslice arr_data = read_segments(fileobj, segments, n_bytes, lock) File "/opt/conda/lib/python3.9/site-packages/nibabel/fileslice.py", line 679, in read_segments bytes = fileobj.read(length) File "/opt/conda/lib/python3.9/site-packages/nibabel/openers.py", line 159, in read return self.fobj.read(*args, **kwargs) File "indexed_gzip/indexed_gzip.pyx", line 797, in indexed_gzip.indexed_gzip._IndexedGzipFile.readinto indexed_gzip.indexed_gzip.ZranError: zran_read returned error: ZRAN_READ_FAIL (file: /scratch1/03201/jbwexler/openneuro_derivatives/derivatives/mriqc/ds002237-mriqc/sourcedata/raw/sub-11/func/sub-11_task-loc_bold.nii.gz)

effigies commented 1 year ago

This indicates /scratch1/03201/jbwexler/openneuro_derivatives/derivatives/mriqc/ds002237-mriqc/sourcedata/raw/sub-11/func/sub-11_task-loc_bold.nii.gz is corrupted. Try:


python -c "import nibabel as nb; nb.load('/scratch1/03201/jbwexler/openneuro_derivatives/derivatives/mriqc/ds002237-mriqc/sourcedata/raw/sub-11/func/sub-11_task-loc_bold.nii.gz').get_fdata()"`
effigies commented 1 year ago

Note: Use this dataset to check performance of validator adding a seek-to-end check.

effigies commented 1 year ago
from pathlib import Path

dataset = Path("/path/to/dataset")
for fname in dataset.glob("**/*.nii.gz"):
    nb.load(fname).get_fdata()