QSIPrep: no T1w images found for participant

Hi experts!

I’m working on implementing QSIprep, and am getting hung up on a seemingly simple error. The dataset passes the BIDs validation step and displays that T1w data is available in the initial table of available scans, but then throws this error when beginning code. Thanks for any suggestions!

Can you paste the outputs from the tree command on one of your subject folders?

Yes, included below! Thanks so much for any insight. It is kind of hard to tell with the text formatting, but the anat, dwi, fmap and scans.tsv are included within ses-shapesV1.

└── ses-shapesV1
β”œβ”€β”€ anat
β”‚ β”œβ”€β”€ sub-A228_ses-shapesV1_T1w.json
β”‚ β”œβ”€β”€ sub-A228_ses-shapesV1_T1w.nii.gz
β”‚ β”œβ”€β”€ sub-A228_ses-shapesV1_T2w.json
β”‚ └── sub-A228_ses-shapesV1_T2w.nii.gz
β”œβ”€β”€ dwi
β”‚ β”œβ”€β”€ sub-A228_ses-shapesV1_dwi.bval
β”‚ β”œβ”€β”€ sub-A228_ses-shapesV1_dwi.bvec
β”‚ β”œβ”€β”€ sub-A228_ses-shapesV1_dwi.json
β”‚ └── sub-A228_ses-shapesV1_dwi.nii.gz
β”œβ”€β”€ fmap
β”‚ β”œβ”€β”€ sub-A228_ses-shapesV1_acq-dwi_dir-AP_epi.json
β”‚ β”œβ”€β”€ sub-A228_ses-shapesV1_acq-dwi_dir-AP_epi.nii.gz
β”‚ β”œβ”€β”€ sub-A228_ses-shapesV1_acq-dwi_dir-PA_epi.json
β”‚ β”œβ”€β”€ sub-A228_ses-shapesV1_acq-dwi_dir-PA_epi.nii.gz
β”‚ β”œβ”€β”€ sub-A228_ses-shapesV1_acq-shapes_dir-AP_epi.json~
β”‚ └── sub-A228_ses-shapesV1_acq-shapes_dir-PA_epi.json~
β”œβ”€β”€ sub-A228_ses-shapesV1_scans.tsv
└── sub-A228_ses-shapesV1_scans.tsv~

hm, that looks fine to me. How about the command you are using to run QSIPrep, and a bit about how you’re running it (e.g. container vs python vs wrapper etc)?

I’m running it from a Singularity container on a high-performance cluster computing system (Linux). The command I’m using is this (within a bash script):

singularity run qsiprep-0.14.3.sif ${subjdir} ${outdir} participant --output_resolution=1 --fs-license-file='license.txt'

Thanks again!

what is the value of ${subjdir}? It should be the directory above sub-A228

Yes, it’s the directory containing sub-A228 and others. Is it possible this error might be specific to the singularity version? Perhaps I’ll see if I can get it running locally… thank you all!

Try this:
singularity run -B ${subjdir},${outdir} qsiprep-0.14.3.sif ${subjdir} ${outdir} participant --output_resolution 1 --fs-license-file license.txt

Also, replace license.txt with the full path to license.txt. Using singularity containers are like jumping into a new computer system temporarily. If you want to make your local data available, you have to explicitly specify what folders you want to bring along (done here with -B ${subjdir},${outdir}). Similarly, license.txt's full path should be specified, and if it is not somewhere in $subjdir, then the license should be bound to the container as well.

singularity run -B ${subjdir},${outdir} -B /PATH/TO/license.txt:/license.txt qsiprep-0.14.3.sif ${subjdir} ${outdir} participant --output_resolution 1 --fs-license-file /license.txt

Thank you so much for these suggestions! Unfortunately, I’m still encountering the same issues. The program does seem to run as expected when I use the --dwi_only flag, so seems like there might be some interference with the code that grabs the T1w file paths perhaps? Thank you again for any suggestions!

One other note is that I noticed the documentation for Singularity containers appears to be different on the β€˜Installation’ and β€˜Usage’ pages. Is one of these more correct? I built the container using the β€˜installation’ instructions (i.e. created a .sif, not .simg). Thanks so much!

Installation:

The easiest way to get a Sigularity image is to run:

$ singularity build qsiprep-.sif docker://pennbbl/qsiprep:

Usage:

Using qsiprep within a singularity container (qsiprep-.simg)

To run qsiprep with singularity, a singularity image must be built (see Installation). This is the preferred method for HPCs. For example

$ singularity run --cleanenv -B /data/:/home/$user/data qsiprep-.simg

the file extension of the container (e.g. .sif vs .simg) should not make a difference. Is QSIPrep recognizing your fieldmaps correctly? You can check the html file to see if susceptibility distortion correction was performed.

QSIPrep uses PyBIDS to query for files of specific modalities. I wonder, is there is something like a .bidsignore file that is preventing qsiprep from finding the T1w file?

Some text must not be appearing here, it should look like

$ singularity build qsiprep-0.14.3.sif docker://pennbbl/qsiprep:0.14.3

Thank you @mattcieslak @Steven for your help with this! Yes, sorry some text got cut off but the command you shared was the command I used. In case anyone else encounters this issue, I was eventually able to solve this by moving the subject directory to a new (less complex) filepath. I’m still not sure what was tripping the code up but doing that seems to have resolved the issue!

1 Like