ME-ICA / fmripost-tedana

A BIDS App for the tedana workflow
MIT License
1 stars 0 forks source link

Include ability to ingress ICA derivatives #5

Open tsalo opened 3 months ago

tsalo commented 3 months ago

Particularly useful for chaining ICA-based denoising methods (e.g., ICA-AROMA, FSL FIX, GIFT).

Related to https://github.com/nipreps/fmripost-aroma/issues/35 and https://github.com/nipreps/fmripost-phase/issues/5.

tsalo commented 2 months ago

I was playing with using fMRIPost-AROMA ICA outputs with tedana today (successfully, I might add). Two things to note:

  1. fMRIPost-AROMA's mixing matrix doesn't have column headers, so we need to restructure the files before passing them along to tedana.
  2. The metrics file (which is a tedana creation) is necessary to combine classifications from multiple trees. We can't just use the "confounds" file, since that only has the rejected components in it. The workflow probably needs to go:
    1. Collect any mixing matrices and metrics files from --derivatives. This could involve multiple mixing matrices from different datasets.
    2. Check that the mixing matrices are the same. Something like numpy.allclose should be enough. Not sure if it's worth it to try to support cases where the mixing matrices are the same, but components are reordered.
    3. Check that the metrics files all have the right number of components and that they all have the "classification" column.
    4. Run tedana using the mixing matrix.
    5. Take the classifications from tedana and any other provided datasets, and take the union of the classifications. Generate a modified metrics file.
      • Do we want to support multiple combination strategies? E.g., "any-reject", "all-reject", "majority"?
    6. Run ica-reclassify with the updated metrics file.