Track immediate `Sources` when possible
What would you like to see added in fMRIPrep?
- Standard-space and T1w-space outputs do not include
Sources.- The
Sourcesshould probably be the boldref-space outputs, when those are requested. Otherwise, they should include the original data, the HMC transforms, the coreg transforms, the ref2anat transform, and the anat2std transform.
- The
- Echo-wise outputs do not include
Sources.- The echo-wise datasinks are wrapped in a MapNode. DerivativesDataSinks cannot iterate over metadata fields (e.g.,
Sources), so we need to compile themeta_dictbeforehand. This has come up a lot in XCP-D, so I've been working on an interface that can handle it (see GenerateMetadata in https://github.com/PennLINC/xcp_d/pull/1104).
- The echo-wise datasinks are wrapped in a MapNode. DerivativesDataSinks cannot iterate over metadata fields (e.g.,
- Surface files don't seem to include
Sources.
Do you have any interest in helping implement the feature?
Yes
Additional information / screenshots
No response
@effigies do you think it would be worth it to try incorporating the TemplateFlow templates into the DatasetLinks and Sources?
Yes, I think including templateflow would be very helpful both for sources and spatial references.
Want to note that from-orig_to-boldref_mode-image_desc-hmc_xfm.txt isn't in the Sources.
from-boldref_to-auto00000_mode-image_xfm.txt isn't either, but I can't tell if that's accounted for by including from-boldref_to-T1w_mode-image_xfm.txt in the Sources. @effigies do you know? If orig-to-boldref, boldref-to-fmap and boldref-to-T1w are all strung together, then I think boldref-to-T1w might be mislabeled.
Each of these is an atomic transform. orig-to-boldref + boldref-T1w are strung together to get the individual volume there, but boldref-to-fmap is used to transform the fieldmap into the boldref space and calculate a voxel-shift-map. We do not save the VSM, so it would be appropriate to include both the fieldmap and the transform as inputs. The exact provenance would be better modeled using prov.jsonld.
Ah, thanks! I think SDCFlows will need to pass its fmap file from its derivatives workflow in order to use it as a source in fMRIPrep.
I'd forgotten about this and opened #3534. I made it a sub-issue so it's linked prominently.