Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track immediate Sources when possible #3261

Open
tsalo opened this issue Mar 25, 2024 · 5 comments
Open

Track immediate Sources when possible #3261

tsalo opened this issue Mar 25, 2024 · 5 comments

Comments

@tsalo
Copy link
Collaborator

tsalo commented Mar 25, 2024

What would you like to see added in fMRIPrep?

  1. Standard-space and T1w-space outputs do not include Sources.
    • The Sources should 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.
  2. Echo-wise outputs do not include Sources.
  3. 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 added a commit that referenced this issue Mar 27, 2024
References #3261.

## Changes proposed in this pull request

- Track `Sources` for standard-space outputs

---------

Co-authored-by: Chris Markiewicz <effigies@gmail.com>
@tsalo
Copy link
Collaborator Author

tsalo commented Mar 28, 2024

@effigies do you think it would be worth it to try incorporating the TemplateFlow templates into the DatasetLinks and Sources?

effigies pushed a commit that referenced this issue Mar 29, 2024
Related to #3261.

## Changes proposed in this pull request

- Add an outputnode to `init_ds_volumes_wf` with the saved `bold` path.
- Add `sources` field to `init_bold_surf_wf`'s inputnode.
- Infer Sources for functional GIFTI outputs.
- If the user has requested T1w-space outputs, then this should be
`bold` from the associated `ds_volumes_wf` and `fsnative2t1w_xfm`
- If the user didn't want T1w-space volumetric outputs, then this should
be the raw BOLD file, `motion_xfm`, `boldref2anat_xfm`,
`fsnative2t1w_xfm`.
@effigies
Copy link
Member

Yes, I think including templateflow would be very helpful both for sources and spatial references.

@tsalo
Copy link
Collaborator Author

tsalo commented Apr 1, 2024

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.

@effigies
Copy link
Member

effigies commented Apr 1, 2024

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.

@tsalo
Copy link
Collaborator Author

tsalo commented Apr 1, 2024

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.

effigies pushed a commit that referenced this issue Apr 1, 2024
References #3261.

## Changes proposed in this pull request

- Add the TemplateFlow base directory to the DatasetLinks.
- Add the template used for normalization to the Sources for
standard-space volumetric outputs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants