Running MRIQC on multiecho data

Hi all!

As the title suggests, I’m trying to figure out how to run MRIQC on our ME data. We are running MRIQC to asses the general quality of the data and create metrics for our exclusion criteria. I’m quite new to working with ME data – my original assumption was that MRIQC is somehow able to figure out that the 4 echoes from one scan are indeed one scan, and run its pipeline on that. I recently realised that this is not the case, and that each echo is treated as a separate scan.

My question is, what’s the typical pipeline for pushing ME data through MRIQC?

  • Is it standard to process all echoes, and look through all of them?
  • Or perhaps only base metrics on the MRIQC outputs of the 1st echo?
  • Would it be appropriate to run MRIQC on already combined data (either optimally combined directly through fMRIPrep without denoising, or tedana)? I assume in this case, we would need to run MRIQC outside of our main BIDS directory, or creating a temporary one only filled with combined data.

I tried to search through the MRIQC documentation and other blog posts, however I wasn’t able to find much up to date information on this, and just wanted to ask directly to make sure I don’t overlook anything that is common knowledge.

The question stems from my initial attempt to run MRIQC, which resulted in an error.

I am using MRIQC 24.0.2. Here’s the command I’m currently running (participant-level MRIQC):

singularity run --cleanenv \
  --bind /share:/share \
  --bind "${SLURM_TMPDIR}:/tmp" \
  "${SINGIMG}" \
  "${BIDS_DIR}" "${OUT_DIR}" \
  participant \
    --participant-label "${SubjectID}" \
    --nprocs 6 --mem 46 --verbose-reports --fft-spikes-detector \
    -w "${WORK_DIR}"

which produces the following error:

Traceback (most recent call last):
  File "/opt/conda/lib/python3.11/site-packages/nipype/interfaces/base/traits_extension.py", line 129, in validate
    value = Path(value)  # Use pathlib's validation
            ^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/pathlib.py", line 871, in __new__
    self = cls._from_parts(args)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/pathlib.py", line 509, in _from_parts
    drv, root, parts = self._parse_args(args)
                       ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/pathlib.py", line 493, in _parse_args
    a = os.fspath(a)
        ^^^^^^^^^^^^
TypeError: expected str, bytes or os.PathLike object, not list

I’m not sure if the error is related specifically to the command I’m running, or the fact that I’m not understanding how MRIQC treats multiecho data in general. According to the documentation and the Github, a similar error was an issue in MRIQC 24.0.0 (TypeError: expected str, bytes or os.PathLike object, not list · Issue #1282 · nipreps/mriqc · GitHub) and was fixed in later releases (i.e., 24.0.2 shouldn’t have the following error, although maybe simply adding --no-datalad-get would solve it without creating any other issues).

Sorry for the lengthy post and thank you in advance for any insights you can provide!! I really appreciate it.

Nikita

Hi @nsossounov,

There is no explicit support for multi-echo yet, there are open issues for this on MRIQC github (e.g., Compute only one set of IQMs and files for multi-echo dataset · Issue #1184 · nipreps/mriqc · GitHub). My intuition would be to run everything through fMRIPrep and base QC decisions on the combined data. You’ll just have to adjust thresholds, (e.g., preprocessed data will probably have higher SNR, and also more smoothness if they are spatially normed).

Regarding your error, you can see on MRIQC github that this is addressed in 25.0.0 release candidate (FIX: Decode bytes to produce a string by oesteban · Pull Request #1371 · nipreps/mriqc · GitHub), so you can give that a try.

Best,
Steven

1 Like

One person who has been investigating MRIQC + ME-EPI is @Melanie_Garcia, who might have some thoughts on appropriate combination methods and thresholds.