Closed psadil closed 2 months ago
Unless, perhaps that field aims to pick up a different transformation -- not the boldref-auto##### generated during typical use of pepolar with fmriprep?
Yes, I think you're right. And I think the boldref2anat
also needs to be updated.
Would you mind opening a PR against the maint/24.1.x
branch?
Yes, can do. Just to make sure I understand how this is supposed to work, is the idea that when I run a command like
fmriprep --derivatives boldref2fmap=sourcedata/boldref2fmap [...] "${INPUT}" "${OUTPUT}" participant
where sourcedata/boldref2fmap
looks like
sourcedata
└── boldref2fmap
└── sub-travel2
└── ses-NS
└── func
├── sub-travel2_ses-NS_task-rest_run-01_from-boldref_to-auto00000_mode-image_xfm.json
└── sub-travel2_ses-NS_task-rest_run-01_from-boldref_to-auto00000_mode-image_xfm.txt
then that xfm
and json
will be copied into ${OUTPUT}
and used by the relevant nodes?
Not necessarily that it will be copied into the output, but that its generation will be skipped. I do not think we are 100% consistent on whether a precomputed file will be copied to output or not.
I think there might be a couple of other issues
init_bold_fit_wf
expects the precomputed files to be underneath a key "transforms" https://github.com/nipreps/fmriprep/blob/73189de5ee576ffc73ab432b7419304d44ce5776/fmriprep/workflows/bold/fit.py#L249-L252 but collect_derivatives
puts them at the top level (e.g., underneath a field called "boldref2fmap": https://github.com/nipreps/fmriprep/blob/73189de5ee576ffc73ab432b7419304d44ce5776/fmriprep/utils/bids.py#L78)**q
vs **query
)https://github.com/nipreps/fmriprep/blob/73189de5ee576ffc73ab432b7419304d44ce5776/fmriprep/utils/bids.py#L71-L75 and so all xfms are associated with each input boldShould I break those into separate issues and pull requests, or just do them together?
Feel free to fix together.
What happened?
fMRIPrep generates rigid xfms between the boldref and the fieldmap that have names like
sub-{subject}_ses-{session}_task-{task}_run-{run}_from-boldref_to-{fieldmap_id}_mode-image_xfm.txt
.I am trying to supply precalculated xfms with the
--derivatives
flag, but it doesn't seem like they are being picked up.What command did you use?
What version of fMRIPrep are you running?
24.1.0
How are you running fMRIPrep?
Docker
Is your data BIDS valid?
Yes
Are you reusing any previously computed results?
FreeSurfer
Please copy and paste any relevant log output.
Additional information / screenshots
I guess the issue is that the searched for pattern uses
"from": "orig",
?As in, below, I would have expected "boldref" to work but not "orig"
FWIW, I'm trying to supply these xfms as a way to troubleshoot the issue described here: https://neurostars.org/t/poor-fieldmap-functional-registration-in-fmriprep-highly-variable-step/30397, which I mention shamelessly to get more eyes on it ;)