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

♻️ Generalizing desc-ref_bold to desc-unifize_bold and fMRIprep style… #2180

Merged
merged 7 commits into from
Mar 14, 2025

Conversation

birajstha
Copy link
Contributor

@birajstha birajstha commented Jan 30, 2025

Fixes

Related to #2173 by @sgiavasis

Description

Refactored the FSL-AFNI subworkflow to improve modularity and ensure desc-unifized_bold is correctly generated when needed. Updated the coregistration_prep_fmriprep nodeblock to handle dependencies dynamically.

Technical details

  • FSL-AFNI subworkflow
    • Moved FSL-AFNI subworkflow from inside a bold_mask_fsl_afni nodeblock into a separate function.
    • Renamed desc-ref_bold created in this workflow to desc-unifized_bold.
    • coregistration_prep_fmriprep nodeblock now checks if desc-unifized_bold exists in the Resource Pool, if not it runs the FSL-AFNI subworkflow to create it.

Tests

Run CPAC with preconfig fmriprep-options
and
change the config for func_masking to FSL in the fmriprep-options preconfig and run this custom pipeline.

Screenshots

I made a custom pipeline with

func_masking: [FSL]
coregistration: 
  func_input_prep:
    input: [fmriprep_reference]

image

Before the fix
image

After the fix
image

Test config ran successfully after the fix.

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the develop branch of the repository.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added tests for the changes I made (if applicable).
  • I updated the changelog.
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.

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.

@birajstha birajstha marked this pull request as ready for review March 6, 2025 21:47
Copy link
Member

@shnizzedy shnizzedy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm!

Copy link
Collaborator

@sgiavasis sgiavasis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made a comment re: BIDS naming.
Also @shnizzedy - should we address the files marked by the linter in a separate PR or are these already resolved in another branch?

@shnizzedy
Copy link
Member

Also @shnizzedy - should we address the files marked by the linter in a separate PR or are these already resolved in another branch?

If it's just a few lines, I think it's fine to include here. If it's a lot, I'd do a separate PR just so the real changes here are easy to see.

@birajstha birajstha requested a review from sgiavasis March 14, 2025 20:50
@birajstha
Copy link
Contributor Author

Thanks for answering my questions, your review and suggestions. I have made the changes now.

Copy link
Collaborator

@sgiavasis sgiavasis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks @birajstha

@birajstha birajstha merged commit 0a0066f into develop Mar 14, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

🔧 Generalize desc-ref_bold and the niworkflows-style sbref sub-workflow
3 participants