Error running MRIQC with Singularity image on cluster

mriqc

#1

Hi all,

I’m trying to run MRIQC (v.0.14.2) on a cluster using a Singularity image. Here’s the command I sent MRIQC:

MRIQC=/home/groups/russpold/singularity_images/poldracklab_mriqc_0.14.2-2018-08-21-070e53b20a43.img
PROJECT_DIR=/scratch/groups/hyo/OPUS
BIDS_DIR=$PROJECT_DIR/BIDS_data
OUT_DIR=$BIDS_DIR/derivatives/mriqc
WORK_DIR=$PROJECT_DIR/work/mriqc
singularity run $MRIQC $BIDS_DIR $OUT_DIR participant \
    --participant-label sub-03 \
    -m T1w bold \
    -w $WORK_DIR -vvv

But I received this error:

2018-11-03 00:13:41,245 mriqc:IMPORTANT 
    Running MRIQC version 0.14.2:
      * BIDS dataset path: /scratch/groups/hyo/OPUS/BIDS_data.
      * Output folder: /scratch/groups/hyo/OPUS/BIDS_data/derivatives/mriqc.
      * Analysis levels: participant.
    
2018-11-03 00:13:41,246 mriqc:INFO Participant level started. Checking BIDS dataset...
2018-11-03 00:13:45,104 mriqc:CRITICAL MRIQC did not find any target image file under the given BIDS folder (/scratch/groups/hyo/OPUS/BIDS_data). Please ensure that the dataset is BIDS valid at http://incf.github.io/bids-validator/ .
2018-11-03 00:13:45,106 mriqc:WARNING The following BIDS entities were selected as filters: --participant-label sub-03, --modalities T1w bold. Please, check whether their combinations are possible.

I’m not sure that the issue is my data structure. I ran a relatively recent version of the BIDS validator (2018/5/19) on my dataset, and it spotted no problems, and I’ve managed to run fmriprep on these data with no issues. Based on previous threads, I tried binding /scratch (and other variations) using the -B flag, but I got the same error:

singularity -B /scratch/groups/hyo:/scratch/groups/hyo run $MRIQC $BIDS_DIR $OUT_DIR participant \
    --participant-label sub-03 \
    -m T1w bold \
    -w $WORK_DIR -vvv

2018-11-03 00:19:46,386 mriqc:IMPORTANT 
    Running MRIQC version 0.14.2:
      * BIDS dataset path: /scratch/groups/hyo/OPUS/BIDS_data.
      * Output folder: /scratch/groups/hyo/OPUS/BIDS_data/derivatives/mriqc.
      * Analysis levels: participant.
    
2018-11-03 00:19:46,386 mriqc:INFO Participant level started. Checking BIDS dataset...
2018-11-03 00:19:49,990 mriqc:CRITICAL MRIQC did not find any target image file under the given BIDS folder (/scratch/groups/hyo/OPUS/BIDS_data). Please ensure that the dataset is BIDS valid at http://incf.github.io/bids-validator/ .
2018-11-03 00:19:49,992 mriqc:WARNING The following BIDS entities were selected as filters: --participant-label sub-03, --modalities T1w bold. Please, check whether their combinations are possible.

Any advice? Thanks in advance!


#2

I would run singularity shell and find out whether the data directory is visible from within the container (i.e. /scratch/groups/hyo/OPUS/BIDS_data has all sub-* under).


#3

Thanks for the tip! I just tried this, and I can see all subject directories and image files from within the container. I still get the error, though. What would you suggest I try next?


#4

Then, from within the container (i.e. using singularity exec) I would run mriqc:

ls /scratch/groups/hyo/OPUS/BIDS_data/sub-03/{anat,func}
mriqc /scratch/groups/hyo/OPUS/BIDS_data /scratch/groups/hyo/OPUS/BIDS_data/derivatives/mriqc --participant-label sub-03 -w /scratch/groups/hyo/OPUS/work/mriqc -vvv

#5

Running ls within the container works:

singularity exec mriqc_0.14.2.img ls /scratch/groups/hyo/OPUS/BIDS_data/sub-03/anat
sub-03_T1w.nii.gz
singularity exec mriqc_0.14.2.img ls /scratch/groups/hyo/OPUS/BIDS_data/sub-03/func
sub-03_task-self_run-01_bold.json    sub-03_task-test_run-02_bold.json
sub-03_task-self_run-01_bold.nii.gz  sub-03_task-test_run-02_bold.nii.gz
sub-03_task-self_run-02_bold.json    sub-03_task-train_run-01_bold.json
sub-03_task-self_run-02_bold.nii.gz  sub-03_task-train_run-01_bold.nii.gz
sub-03_task-test_run-01_bold.json    sub-03_task-train_run-02_bold.json
sub-03_task-test_run-01_bold.nii.gz  sub-03_task-train_run-02_bold.nii.gz

But running mriqc doesn’t:

singularity exec mriqc_0.14.2.img mriqc /scratch/groups/hyo/OPUS/BIDS_data /scratch/groups/hyo/OPUS/BIDS_data/derivatives/mriqc participant --participant-label sub-03 -w /scratch/groups/hyo/OPUS/work/mriqc -vvv
2018-11-05 16:55:24,909 mriqc:IMPORTANT 
    Running MRIQC version 0.14.2:
      * BIDS dataset path: /scratch/groups/hyo/OPUS/BIDS_data.
      * Output folder: /scratch/groups/hyo/OPUS/BIDS_data/derivatives/mriqc.
      * Analysis levels: participant.
    
2018-11-05 16:55:24,910 mriqc:INFO Participant level started. Checking BIDS dataset...
2018-11-05 16:55:30,046 mriqc:CRITICAL MRIQC did not find any target image file under the given BIDS folder (/scratch/groups/hyo/OPUS/BIDS_data). Please ensure that the dataset is BIDS valid at http://incf.github.io/bids-validator/ .
2018-11-05 16:55:30,048 mriqc:WARNING The following BIDS entities were selected as filters: --participant-label sub-03, --modalities T1w bold T2w. Please, check whether their combinations are possible.

#6

Okay, sorry, can you give it a try without sub-?:

singularity -B /scratch/groups/hyo:/scratch/groups/hyo run \
    /home/groups/russpold/singularity_images/poldracklab_mriqc_0.14.2-2018-08-21-070e53b20a43.img \
    /scratch/groups/hyo/OPUS/BIDS_data \
    /scratch/groups/hyo/OPUS/BIDS_data/derivatives/mriqc \
    --participant-label 03 -w /scratch/groups/hyo/OPUS/work/mriqc -vvv

#7

That fixed it, thank you!