Skip to content

MRIqc Intermittent process completion of T1 images using Apptainer #1392

@SLReeser

Description

@SLReeser

What happened?

MRIqc Processing of T1 and T2 files completes for some participants (1/3) and runs but does not complete for 2/3 participants.

What command did you use?

Called from bash script. 

#!/bin/bash

if [ $# -lt 1 ]; then
   # Prompt proper calling format
   echo " bash Q1_mriqc.sh subjects.txt"
   exit
fi

# Save input SubID
SUBJECTS=`cat ${1}`

TRUE_PATH=$(pwd -P) # Use this so that shortcuts from your home directory aren't an issue
CODE_DIR=$(dirname $TRUE_PATH)
PROJECT_HOME=$(dirname $CODE_DIR)

input_dir=${PROJECT_HOME}/nifti
output_dir=${PROJECT_HOME}/derivatives/MRIqc_anal
container_loc=/projects3/singularity_images/MRIqc/mriqc-24.0.2.sif

for ID in ${SUBJECTS}; do

	apptainer run --cleanenv --bind ${input_dir}:/data --bind ${output_dir}:/out ${container_loc} /data /out participant --participant-label ${ID} --no-sub --species human --participant-label ${ID} --modalities T1w T2w --float32 --bids-database-wipe --no-datalad-get --crashfile-format txt --notrack --verbose-reports -vvv; \

	echo "end ${ID}"
	date
done

What version of the software are you running?

24.0.2

How are you running this software?

Singularity

Is your data BIDS valid?

Yes

Are you reusing any previously computed results?

No

Please copy and paste any relevant log output.

Node: mriqc_wf.anatMRIQC.ComputeIQMs.measures
Working directory: /gnostic/CUBS/BIDS/code/bin/work/mriqc_wf/anatMRIQC/ComputeIQMs/a0542ad50094f68cf7a39436b6c383c65e23ea40/measures

Node inputs:

air_msk = /gnostic/CUBS/BIDS/code/bin/work/mriqc_wf/anatMRIQC/AirMaskWorkflow/a0542ad50094f68cf7a39436b6c383c65e23ea40/ArtifactMask/sub-CUBS702291_ses-01_acq-QALAS_run-01_T1w_conformed.nii_air.nii.gz
artifact_msk = /gnostic/CUBS/BIDS/code/bin/work/mriqc_wf/anatMRIQC/AirMaskWorkflow/a0542ad50094f68cf7a39436b6c383c65e23ea40/ArtifactMask/sub-CUBS702291_ses-01_acq-QALAS_run-01_T1w_conformed.nii_art.nii.gz
head_msk = /gnostic/CUBS/BIDS/code/bin/work/mriqc_wf/anatMRIQC/HeadMaskWorkflow/a0542ad50094f68cf7a39436b6c383c65e23ea40/GradientThreshold/clipped_corrected_enhanced_grad_gradmask.nii.gz
human = True
in_bias = /gnostic/CUBS/BIDS/code/bin/work/mriqc_wf/anatMRIQC/synthstrip_wf/a0542ad50094f68cf7a39436b6c383c65e23ea40/post_n4/clipped_bias.nii.gz
in_file = /gnostic/CUBS/BIDS/code/bin/work/mriqc_wf/anatMRIQC/a0542ad50094f68cf7a39436b6c383c65e23ea40/conform/sub-CUBS702291_ses-01_acq-QALAS_run-01_T1w_conformed.nii.gz
in_fwhm = [2.49778, 2.92776, 2.88157]
in_noinu = /gnostic/CUBS/BIDS/code/bin/work/mriqc_wf/anatMRIQC/ComputeIQMs/a0542ad50094f68cf7a39436b6c383c65e23ea40/harmonize/clipped_corrected_harmonized.nii.gz
in_pvms = ['/gnostic/CUBS/BIDS/code/bin/work/mriqc_wf/anatMRIQC/brain_tissue_segmentation/a0542ad50094f68cf7a39436b6c383c65e23ea40/segmentation/segment_01.nii.gz', '/gnostic/CUBS/BIDS/code/bin/work/mriqc_wf/anatMRIQC/brain_tissue_segmentation/a0542ad50094f68cf7a39436b6c383c65e23ea40/segmentation/segment_02.nii.gz', '/gnostic/CUBS/BIDS/code/bin/work/mriqc_wf/anatMRIQC/brain_tissue_segmentation/a0542ad50094f68cf7a39436b6c383c65e23ea40/segmentation/segment_03.nii.gz']
in_segm = /gnostic/CUBS/BIDS/code/bin/work/mriqc_wf/anatMRIQC/brain_tissue_segmentation/a0542ad50094f68cf7a39436b6c383c65e23ea40/segmentation/segment.nii.gz
in_tpms = <undefined>
mni_tpms = ['/gnostic/CUBS/BIDS/code/bin/work/mriqc_wf/anatMRIQC/SpatialNormalization/a0542ad50094f68cf7a39436b6c383c65e23ea40/tpms_std2t1w/mapflow/_tpms_std2t1w0/tpl-MNI152NLin2009cAsym_res-01_label-CSF_probseg_trans.nii.gz', '/gnostic/CUBS/BIDS/code/bin/work/mriqc_wf/anatMRIQC/SpatialNormalization/a0542ad50094f68cf7a39436b6c383c65e23ea40/tpms_std2t1w/mapflow/_tpms_std2t1w1/tpl-MNI152NLin2009cAsym_res-01_label-GM_probseg_trans.nii.gz', '/gnostic/CUBS/BIDS/code/bin/work/mriqc_wf/anatMRIQC/SpatialNormalization/a0542ad50094f68cf7a39436b6c383c65e23ea40/tpms_std2t1w/mapflow/_tpms_std2t1w2/tpl-MNI152NLin2009cAsym_res-01_label-WM_probseg_trans.nii.gz']
rot_msk = /gnostic/CUBS/BIDS/code/bin/work/mriqc_wf/anatMRIQC/AirMaskWorkflow/a0542ad50094f68cf7a39436b6c383c65e23ea40/RotationMask/sub-CUBS702291_ses-01_acq-QALAS_run-01_T1w_conformed_rotmask.nii.gz

Traceback (most recent call last):
  File "/opt/conda/lib/python3.11/site-packages/mriqc/engine/plugin.py", line 64, in run_node
    result['result'] = node.run(updatehash=updatehash)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run
    result = self._run_interface(execute=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface
    return self._run_command(execute)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/nipype/pipeline/engine/nodes.py", line 771, in _run_command
    raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node measures.

Traceback:
	Traceback (most recent call last):
	  File "/opt/conda/lib/python3.11/site-packages/nipype/interfaces/base/core.py", line 397, in run
	    runtime = self._run_interface(runtime)
	              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	  File "/opt/conda/lib/python3.11/site-packages/mriqc/interfaces/anatomical.py", line 116, in _run_interface
	    raise RuntimeError(
	RuntimeError: Input inhomogeneity-corrected data seem empty. MRIQC failed to process this dataset.

Additional information / screenshots

Other items that may be relevant:
o T1w and T2 files are synthetically generated from QALAS scans.
o Participants are newborn so atlas mismatch may be an issue
o Multiple runs exist for some of the participants (this one has two QALAS runs and a standard T2w image)
o This participant ran when I only had one of the QALAS T1w/T2w set, however it did not process the second standard T2w image.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions