FCP-INDI / C-PAC

Configurable Pipeline for the Analysis of Connectomes
https://fcp-indi.github.io/
GNU Lesser General Public License v3.0
64 stars 40 forks source link

:bug: Enable alff to run without nuisance #2015

Closed e-kenneally closed 10 months ago

e-kenneally commented 11 months ago

Fixes

Description

The current alff/fAlff workflow is set up so that if nuisance regression is in native space and alff is in template space, CPAC runs a nodeblock called warp_denoiseNofilt_to_T1template.

From cpac_pipeline.py:

Screenshot 2023-11-02 at 2 33 02 PM

From registration.py:

Screenshot 2023-11-02 at 2 32 05 PM

This nodeblock requires a file from nuisance regression (desc-denoisedNofilt_bold), so it crashes if nuisance regression is not enabled. Since we don't want alff and nuisance regression to be inter-dependent, I moved the transform nodes from their separate transform nodeblock into the template-space alff nodeblock. Now the transform step gets triggered only if desc-denoisedNofilt_bold is in the strat_pool.

Tests

I successfully ran fmriprep ingress + alff with and without nuisance regression.

Checklist

Developer Certificate of Origin

Developer Certificate of Origin ``` Developer Certificate of Origin Version 1.1 Copyright (C) 2004, 2006 The Linux Foundation and its contributors. 1 Letterman Drive Suite D4700 San Francisco, CA, 94129 Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. ```
e-kenneally commented 11 months ago

Is it true that desc-denoisedNofilt_bold only exists if 'Template' in target_space_alff and 'Native' in target_space_nuis, or is just checking for the existence desc-denoisedNofilt_bold a better condition for what we care about here?

desc-denoisedNofilt_bold only exists if nuisance regression is running (in native or template space). I made that the check because regardless of the space for nuisance regression, if the file isn't being produced then the template space transform step can't run.

shnizzedy commented 11 months ago

desc-denoisedNofilt_bold only exists if nuisance regression is running (in native or template space). I made that the check because regardless of the space for nuisance regression, if the file isn't being produced then the template space transform step can't run.

Makes sense. I was just wondering if desc-denoisedNofilt_bold will exist / we need to apply the transform if nuisance and ALFF are both in the same space?

e-kenneally commented 11 months ago

Makes sense. I was just wondering if desc-denoisedNofilt_bold will exist / we need to apply the transform if nuisance and ALFF are both in the same space?

Ohh I see! There's a template space version of that file too, so if nuisance runs in template space this won't be triggered. The transform is now only within the template space alff nodeblock, so the conditions that would trigger the transform step are still native nuisance + template alff