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
299 stars 132 forks source link

FIX: Better fix to the multi-argument ``--participant-label`` issue #1026

Closed oesteban closed 2 years ago

oesteban commented 2 years ago

Indeed, when I was feeding the output of a python script within a bash loop, the --participant-label argument was picking several identifiers as a single input:

IFS=$'\n'; for i in $( python groups.py ); do mriqc /data/datasets/ds002790/ /data/derivatives/ds002790/mriqc-22.0.5 participant -m T1w --participant-label $i --nprocs 32 --omp-nthreads 16 --verbose-reports -w work --dsname AOMIC2 -vv --bids-database-dir /data/derivatives/ds002790/.bids/; done

The output of python groups.py is of this sort:

0117 0118 0119 0120
0121 0122 0123 0124
0125 0126 0127 0128
0129 0130 0131 0132
0133 0134 0135 0136
0137 0138 0139 0140
0141 0142 0143 0144

The idea is to run four subjects within each loop.

This bugfix is a more robust solution.

Revises: #1025.

/cc @mgxd @effigies