Running MRIQC with docker

Hi, Im new to docker and new to MRIQC.

I would like to use MRIQC on data that we are currently collecting and I have two main questions about efficient and proper uses of this BIDS app:

  1. I encountered errors when using the docker commands on the MRIQC documentation website that run the Poldrack lab MRIQC image/container (apologies for my unfamiliarity with correct lingo here). But the docker commands provided on GitHub that run the BIDS-App version from the BIDS/mriqc container work well. How can I identify the version I am using from the BIDS-App version, and how do I ensure that this same version is used for MRIQC on the remaining participants in my study?

  2. My study collects multiple fMRI scans across a period of time. If I chose to run MRIQC on the data from session 1 before collecting the remaining sessions, is there a way for MRIQC to skip sessions that already have QC metrics written in the specified output directory (when I run MRIQC on subsequent sessions)? Currently, it reruns all sessions in the subject’s BIDS directory.

Thanks!
-Kim

You can run

docker run -it --rm bids/mriqc --version

and

docker run -it --rm poldracklab/mriqc --version

However, if you copied here your errors, maybe we can find an explanation (or at the very least, what are the actual commands you are trying?).

If you keep the work directory intact, MRIQC will try to rerun all sessions but find the first one cached (and it will not be processed).

Alternatively, there is the input argument --session-id that will allow you to filter out sessions (was merged here https://github.com/poldracklab/mriqc/pull/612).

Thanks @oesteban for the quick reply!

I gave the poldracklab container another shot and its currently running. Being a docker newbie, I didn’t realize I needed to use the full path to my data regardless of my current working directory.

Best

I’m also having an issue with the MRIQC docker image.

$ docker pull bids/mriqc
Using default tag: latest
latest: Pulling from bids/mriqc
...
Digest: sha256:1e438615ed5bbc1dd2c049ee9b7203088a81d42374df9b3baa6eec4c81f47609
Status: Downloaded newer image for bids/mriqc:latest
$ docker run bids/mriqc -v
standard_init_linux.go:195: exec user process caused "no such file or directory"

No matter what combination of input arguments I use to the bids/mriqc image, I always get the same error.

macOS 10.13.1
Docker version

Client:
 Version:      17.11.0-ce-rc2
 API version:  1.34
 Go version:   go1.8.4
 Git commit:   d7062e5
 Built:        Wed Nov  1 22:08:25 2017
 OS/Arch:      darwin/amd64

Server:
 Version:      17.11.0-ce-rc2
 API version:  1.34 (minimum version 1.12)
 Go version:   go1.8.5
 Git commit:   d7062e5
 Built:        Wed Nov  1 22:14:52 2017
 OS/Arch:      linux/amd64
 Experimental: true

Could you try poldracklab/mriqc instead?

poldracklab/mriqc works. (Or at least it doesn’t error out immediately; I haven’t tried to run it on any data yet.)

$ docker pull poldracklab/mriqc
Using default tag: latest
latest: Pulling from poldracklab/mriqc
...
Digest: sha256:2c825d7ae0d200fd97086831dde69ee6e2a207b5bb710deb29692d56e5ec8287
Status: Downloaded newer image for poldracklab/mriqc:latest
$ docker run --rm poldracklab/mriqc --version
mriqc v0.9.10
2017-11-15 13:57:09,908 interface:INFO Closing display (if virtual)
1 Like

Hello all,

I have followed the instructions on running mriqc through docker and am getting an error:

mriqc: error: argument analysis_level: invalid choice: ‘poldracklab/mriqc:latest’ (choose from ‘participant’, ‘group’)

Based on the instructions "Run mriqc with docker’ I don’t see any need for analysis_level. Am I missing something? My understanding is that analysis_level is a positional argument for using the command line method of running mriqc. Here is the exact command used:

docker run -it --rm -v /m/InProcess/3T/NABM/fMRI/BIDS:/data:ro -v /m/InProcess/3T/NABM/fMRI/BIDS/MRI_QC_Out:/out poldracklab/mriqc:latest /data /out poldracklab/mriqc:latest /data /out participant --participant_label 215

Also, I am using version ‘v0.15.0’

Thanks as always.

Hi @atersakyan, as a quick observation, I noticed poldracklab/mriqc:latest /data /out is repeated in your command, would the below command work?

docker run -it --rm \
-v /m/InProcess/3T/NABM/fMRI/BIDS:/data:ro \
-v /m/InProcess/3T/NABM/fMRI/BIDS/MRI_QC_Out:/out \
poldracklab/mriqc:latest /data /out participant --participant_label 215

Best,
James

@jdkent Thank you for your observation. Removing the repetition solved the issue and mriqc is now running.

1 Like

Hi all,
I have also issues with the image, i used poldracklab/mriqc but i still have this:
docker run -it --rm -v Users/csaba/OneDrive/Documents/Data quality team TCWF/OpenNeuro_exmpl_data:/data:ro -v Users/csaba/OneDrive/Documents/Data quality team TCWF/OpenNeuro_exmpl_data/output:/out poldracklab/mriqc:latest /data /out participant --participant_label 10159
Unable to find image ‘quality:latest’ locally
docker: Error response from daemon: pull access denied for quality, repository does not exist or may require ‘docker login’: denied: requested access to the resource is denied.
See ‘docker run --help’.

Looks like a classic “spaces in the folder name issue”. You need to escape the “Data quality team” folder name. Something like:

docker run -it --rm -v "/Users/csaba/OneDrive/Documents/Data quality team TCWF/OpenNeuro_exmpl_data":/data:ro -v "/Users/csaba/OneDrive/Documents/Data quality team TCWF/OpenNeuro_exmpl_data/output:/out":/output:ro …etc

would probably work.