MRIQC crashes at segmentation/spatial normalization steps

mriqc

#1

Hello!

I’m very new to docker and MRIQC and am getting some errors when trying to run it in Windows.

My dataset is BIDS validated but MRIQC ‘crashes’ for each subject in the segmentation and spatial normalization steps.
I’ve pasted examples of the error logs below.

I’m sorry if the solution is super obvious! I’d be very grateful for any suggestions.

Louise


Node: workflow_enumerator.anatMRIQCT1w.segmentation
Working directory: /tmp/work/workflow_enumerator/anatMRIQCT1w/in_file…data…sub-304…anat…sub-304_T1w.nii.gz/segmentation

Node inputs:

args =
bias_iters =
bias_lowpass =
environ = {‘FSLOUTPUTTYPE’: ‘NIFTI_GZ’}
hyper =
img_type = 1
in_files = [’/tmp/work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/in_file…data…sub-304…anat…sub-304_T1w.nii.gz/sstrip_orig_vol/sub-304_T1w_conformed_calc.nii.gz’]
init_seg_smooth =
init_transform =
iters_afterbias =
manual_seg =
mixel_smooth =
no_bias =
no_pve =
number_classes =
other_priors =
out_basename = segment
output_biascorrected =
output_biasfield =
output_type = NIFTI_GZ
probability_maps =
segment_iters =
segments = True
use_priors =
verbose =

Traceback (most recent call last):
File “/usr/local/miniconda/lib/python3.6/site-packages/nipype/pipeline/plugins/multiproc.py”, line 69, in run_node
result[‘result’] = node.run(updatehash=updatehash)
File “/usr/local/miniconda/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py”, line 471, in run
result = self._run_interface(execute=True)
File “/usr/local/miniconda/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py”, line 555, in _run_interface
return self._run_command(execute)
File “/usr/local/miniconda/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py”, line 635, in _run_command
result = self._interface.run(cwd=outdir)
File “/usr/local/miniconda/lib/python3.6/site-packages/nipype/interfaces/base/core.py”, line 521, in run
runtime = self._run_interface(runtime)
File “/usr/local/miniconda/lib/python3.6/site-packages/nipype/interfaces/base/core.py”, line 1033, in _run_interface
self.raise_exception(runtime)
File “/usr/local/miniconda/lib/python3.6/site-packages/nipype/interfaces/base/core.py”, line 970, in raise_exception
).format(**runtime.dictcopy()))
RuntimeError: Command:
fast -t 1 -o segment -g -S 1 /tmp/work/workflow_enumerator/anatMRIQCT1w/in_file…data…sub-304…anat…sub-304_T1w.nii.gz/segmentation/sub-304_T1w_conformed_calc.nii.gz
Standard output:

Standard error:
Killed
Return code: 137

An example of the error log for the spatial normalization step is here:

Node: workflow_enumerator.anatMRIQCT1w.SpatialNormalization.SpatialNormalization
Working directory: /tmp/work/workflow_enumerator/anatMRIQCT1w/SpatialNormalization/in_file…data…sub-304…anat…sub-304_T1w.nii.gz/SpatialNormalization

Node inputs:

compress_report = auto
explicit_masking = True
flavor = fast
float = False
initial_moving_transform =
lesion_mask =
moving = T1
moving_image = /tmp/work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/in_file…data…sub-304…anat…sub-304_T1w.nii.gz/inu_n4/sub-304_T1w_conformed_corrected.nii.gz
moving_mask = /tmp/work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/in_file…data…sub-304…anat…sub-304_T1w.nii.gz/binarize/sub-304_T1w_conformed_calc_thresh.nii.gz
num_threads = 1
orientation = RAS
out_report = report.svg
reference = T1
reference_image =
reference_mask = /niworkflows_data/mni_icbm152_nlin_asym_09c/2mm_brainmask.nii.gz
settings =
template = mni_icbm152_nlin_asym_09c
template_resolution = 2

Traceback (most recent call last):
File “/usr/local/miniconda/lib/python3.6/site-packages/nipype/pipeline/plugins/multiproc.py”, line 69, in run_node
result[‘result’] = node.run(updatehash=updatehash)
File “/usr/local/miniconda/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py”, line 471, in run
result = self._run_interface(execute=True)
File “/usr/local/miniconda/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py”, line 555, in _run_interface
return self._run_command(execute)
File “/usr/local/miniconda/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py”, line 635, in _run_command
result = self._interface.run(cwd=outdir)
File “/usr/local/miniconda/lib/python3.6/site-packages/nipype/interfaces/base/core.py”, line 521, in run
runtime = self._run_interface(runtime)
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/interfaces/mni.py”, line 190, in _run_interface
‘Robust spatial normalization failed after %d retries.’ % (self.retry - 1))
RuntimeError: Robust spatial normalization failed after 1 retries.


#2

Looking at your error, it looks like you’re getting Return Code 137. From the Docker documentation, it seems that the container is running out of memory.

Not having enough memory with Docker on Windows is pretty common with the initial set-up. There are ways to increase the default memory allocation, which will hopefully resolve your issue !


#3

https://mriqc.readthedocs.io/en/stable/docker.html