nipreps / mriqc

Automated Quality Control and visual reports for Quality Assessment of structural (T1w, T2w) and functional MRI of the brain
http://mriqc.readthedocs.io
Apache License 2.0
298 stars 132 forks source link

Group-level command shown in tutorial runs into error #832

Open tashrifbillah opened 4 years ago

tashrifbillah commented 4 years ago

Both the below commands run into errror: mriqc ~/INTRuST_BIDS_tb571/ ~/mriqc-out/ group

mriqc ~/INTRuST_BIDS_tb571/ ~/mriqc-out/ group --participant-label 003GNX007 003GNX012 003GNX021

Error:

2020-03-10 09:49:41,149 mriqc:IMPORTANT
    Running MRIQC version 0.15.2rc1+36.gf6c7066:
      * BIDS dataset path: ~/INTRuST_BIDS_tb571.
      * Output folder: /home/ek520/mriqc-out.
      * Analysis levels: group.

Traceback (most recent call last):
  File "/rfanfs/pnl-zorro/software/pnlpipe3/miniconda3/envs/pnlpipe3/bin/mriqc", line 11, in <module>
    load_entry_point('mriqc==0.15.2rc1+36.gf6c7066', 'console_scripts', 'mriqc')()
  File "/rfanfs/pnl-zorro/software/pnlpipe3/miniconda3/envs/pnlpipe3/lib/python3.6/site-packages/mriqc-0.15.2rc1+36.gf6c7066-py3.6.egg/mriqc/bin/mriqc_run.py", line 295, in main
Exception: No data found. No group level reports were generated.

However, participant level analysis runs fine:

mriqc ~/INTRuST_BIDS_tb571/ ~/mriqc-out/ participant --participant-label 003GNX007 003GNX012 003GNX021

So, am I not running group-level analysis right? I am following the commands shown here: https://mriqc.readthedocs.io/en/stable/running.html#running-mriqc

oesteban commented 4 years ago

Maybe MRIQC is not expanding the user shortcuts (~/) from some paths?

tashrifbillah commented 4 years ago

Maybe MRIQC is not expanding the user shortcuts (~/) from some paths?

And it is expanding for participant level?

Tried again with expanded paths, didn't help.

tashrifbillah commented 4 years ago

While trying to find a way around, the following seems to perform group level analysis:

mriqc ~/INTRuST_BIDS_tb571/ ~/mriqc-out/ participant

2020-03-24 22:54:56,030 mriqc:IMPORTANT 
    Running MRIQC version 0.15.2rc1+36.gf6c7066:
      * BIDS dataset path: /home/tb571/Downloads/INTRuST_BIDS/rawdata.
      * Output folder: /tmp/mriqc-ica.
      * Analysis levels: group, participant.

...
...
dfsp-spirit commented 4 years ago

I just run into the same issue when setting the analysis level to group, using the latest Docker version of mriqc, which currently is 0.15.2:

docker run -it --rm -v /home/myuser/data/mydataset_BIDS:/data:ro -v /home/myuser/mriqc_output:/out poldracklab/mriqc:latest /data /out group
Traceback (most recent call last):
 File "/usr/local/miniconda/bin/mriqc", line 10, in <module> sys.exit(main())
 File "/usr/local/miniconda/lib/python3.7/site-packages/mriqc/cli/run.py", line 113, in main
raise Exception("No data found. No group level reports were generated.")
Exception: No data found. No group level reports were generated.

However, the workaround mentioned by @tashrifbillah does not seem to work for me, the analysis runs, but is set to participant only (as I would expect from the command line, btw):

docker run -it --rm -v /home/myuser/data/mydataset_BIDS:/data:ro -v /home/myuser/mriqc_output:/out poldracklab/mriqc:latest /data /out participant --no-sub
200722-09:46:03,314 cli IMPORTANT:
Running MRIQC version 0.15.2:
  * BIDS dataset path: /data.
  * Output folder: /out.
  * Analysis levels: ['participant'].

My input is a BIDS folder of structural T1w scans (checked with the online BIDS Validator). I doubt it matters, but I am running Docker version 19.03.12 under Ubuntu Linux 20.04.

Any updates on this, or ideas what I may be doing wrong?

tashrifbillah commented 4 years ago

However, the workaround mentioned by @tashrifbillah does not seem to work for me, the analysis runs, but is set to participant only (as I would expect from the command line, btw):

@dfsp-spirit , do you have more than one case in /data?

tashrifbillah commented 4 years ago

Again, for what it's worth, my command runs on a bare-metal installation, not through docker container.

dfsp-spirit commented 4 years ago

Yes, I have > 700 cases in there. Could it be that I need to run the participant-level analysis first, and only then the group level analysis is gonna work? I am currently trying that, but it is still running since yesterday morning, so I can't tell yet.

I know that you are running bare metal, and I also noticed that we are using slightly different versions, which may also explain why it does not work for me.

UPDATE: The participant analysis crashed after 2 days with a very unspecific ProcessPool exception of one worker, and the whole run seemed to be stuck (terminal still blocked, but no more CPU usage). I am for now giving up on this.

PibeChorro commented 3 years ago

Hey, having the same problem here. I wanted to run MRIQC on my realigned functional data to see if it could "save" a critical subject that moved a lot. My realigned data set has the same structure as my raw data only missing some meta files (.json, tsv, README) so it worked on participant level. I thought it might be, because I have only functional data, so I played around with the -m flag. Setting it to "func instead of bold gave me the following *participant_label: ['01', '02' ... '24'] *session: None *run: None *task: None bids_type: ['func'] However I have 12 runs and one task (no session indeed). Maybe this helps