What are the BIDS validation issues?
Working on the fixes, but approx 250 subjects have .json and/or .nii.gz files that are empty. Which causes an MRIQC decoding error
One workaround to try is making a fake BIDS directory containing just symlinks/shortcuts with subject data you want to analyze, and then running MRIQC on that. That way it will not be taking up much extra space on your system (presumably a HPC if you have 10k subjects). Just make sure to bind the original and symlinked drives in Singularity.
Thanks for the recommendation, Steven! When you say “just make sure to bind the original and symlinked drives in singularity”, what do you mean by that? Sorry, semi-singularity newb.
singularity run -e -B ${original_bids_dir},${fake_bids_dir}
Basically, you will input your fake directory to be analyzed, but Singularity needs to be able to find the original data (i.e. the target of the shortcuts), so both drives need to be available.
Edit: I’m a bad reader and should feel bad. Sorry for the noise.
Created the symbolic links using:
for folder in $(find ${input}/${sub}/ses-${ses} -mindepth 1 -maxdepth 1 -type d -not -name "dwi" ) ; do ln -s "$folder" "${sub}/ses-${ses}/"; done; done
Got an error similar to when using the --participant-labels, e.g., mriqc: error: Querying BIDS dataset at </bids_dir> got an empty result. Please, check out your currently set filters. Retrying atm by removing the --session_id
Perhaps something wrong with my singularity command?
singularity run --cleanenv \
-B ${in_dir}:${bids_dir} \
-B ${bids_dir}:/bids_dir \
-B ${mriqc_in}:/output_dir \
-B ${work_dir}/work_dir/mriqc_v23_1_0_grp:/wd \
${sif_img} \
/bids_dir /output_dir group \
--session-id ses-2YearFollowUpYArm1 \
-vv \
-w /wd
Hi @mdemi,
Can you try running singularity shell
into your container (using the same -e
and -B
arguments) and do ls /bids_dir
and see if your BIDS folder shows up as expected?
Best,
Steven
Thanks – tried it and I get a list of subject directories as expected…
singularity shell --cleanenv \
-B ${in_dir}:${bids_dir} \
-B ${bids_dir}:/bids_dir \
-B ${mriqc_in}:/output_dir \
-B ${work_dir}/work_dir/mriqc_v23_1_0_grp:/wd \
${sif_img}
However, ls /bids_dir/sub-EXAMPLE/ses-EXAMPLE/anat
shows no files. Not sure if that is expected.
Which of your names arguments are the original and fake bids directories?
@Steven – The original of bids subject directories: in_dir. The fake sym linked of subject direcotirs: bids_dir
Ah so here’s the thing. Your symlinks may be pointing to something with full path of your original bids directory, BUT in the container, the path is renamed! Try not renaming your directories when you bind in your singularity command.
Thanks, @Steven ! So, do you recommend something like the below?
singularity run --cleanenv \
-B ${in_dir}:${bids_dir} \
-B ${mriqc_in}:/output_dir \
-B ${work_dir}/work_dir/mriqc_v23_1_0_grp:/wd \
${sif_img} \
/home/mdemiden/bids_dir /output_dir group \
-vv \
-w /wd
Remove the colon statements in your -B arguments, and replace /output_dir and /wd with their paths
singularity run --cleanenv \
-B ${real_bids_dir},${fake_bids_dir},${mriqc_dir},${work_dir} \
${sif_img} \
${fake_bids_dir} ${mriqc_dir} group \
-vv \
-w ${work_dir}
And if all of your important drives are all subdirectories of a more parent drive, you can just only bind the parent drive that contains all of them.
Hi @Steven
My question is that can I get both participant and group level reports while running mriqc?
For example, I specify both participant
and group
argument like this:
singularity run \
--cleanenv \
-B ${BIDS_DIR}:/data:ro \
-B ${OUTPUT_DIR}:/output \
-B ${WORK_DIR}:/work \
${MRIQC} /data /output \
participant group \
--participant-label "$subjectID" \
-w /work \
-vv \
--n_cpus 4 \
--mem 16000 \
--write-graph \
--fd_thres 0.2 \
--float32 \
Best,
Yunhong
A post was split to a new topic: MRIQC TypeError: ‘reversed’ is an invalid keyword argument for sort()
Hi @Steven
I run the mriqc participant
level first and then run group
level. However, the group report
does not present the interactive figure for me. It’s weird.
The group_bold.html
is here:
And the whole output of group analysis:
Best,
Yunhong