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

πŸ› Spurious condition: (ref_resolution β‰Ÿ resolution_for_anat) β‰  is_monkey #2175

Open
1 task
shnizzedy opened this issue Jan 24, 2025 · 1 comment
Labels
bug improvement NHP Non-Human Primate data related

Comments

@shnizzedy
Copy link
Member

shnizzedy commented Jan 24, 2025

Related problem

This conditional block

if (
cfg.registration_workflows["anatomical_registration"]["registration"][
"FSL-FNIRT"
]["ref_resolution"]
== cfg.registration_workflows["anatomical_registration"]["resolution_for_anat"]
):
node, out = strat_pool.get_data("T1w-brain-template")
wf.connect(node, out, fsl, "inputspec.reference_brain")
node, out = strat_pool.get_data("T1w-template")
wf.connect(node, out, fsl, "inputspec.reference_head")
else:
node, out = strat_pool.get_data("FNIRT-T1w-brain-template")
wf.connect(node, out, fsl, "inputspec.reference_brain")
node, out = strat_pool.get_data("FNIRT-T1w-template")
wf.connect(node, out, fsl, "inputspec.reference_head")
seems to be conditioned on something spurious (
cfg.registration_workflows["anatomical_registration"]["registration"][
"FSL-FNIRT"
]["ref_resolution"]
== cfg.registration_workflows["anatomical_registration"]["resolution_for_anat"]
) to what the condition should actually be (
# Template to be used during registration.
# It is for monkey pipeline specifically.
)

Proposed feature

Update the condition to reflect the actual condition we should be checking, rather than a condition that probably corresponds to that condition.

Acceptance criteria

  • It's obvious which condition will be selected and why.
@shnizzedy shnizzedy added bug improvement NHP Non-Human Primate data related labels Jan 24, 2025
@shnizzedy shnizzedy changed the title ✨ [User-requested Feature] πŸ› Spurious condition: (ref_resolution β‰Ÿ resolution_for_anat) β‰  is_monkey Jan 24, 2025
@birajstha birajstha assigned birajstha and unassigned birajstha Jan 29, 2025
@shnizzedy
Copy link
Member Author

I think we want to add something like

pipeline_setup:
  # options: human, non-human primate, rodent
  organism: human

to the pipeline configuration and update

if (
cfg.registration_workflows["anatomical_registration"]["registration"][
"FSL-FNIRT"
]["ref_resolution"]
== cfg.registration_workflows["anatomical_registration"]["resolution_for_anat"]
):
to

    if cfg.pipeline_setup["organism"] != ["non-human primate"]:

, but I'm unsure:

  • if organism is the key we want,
  • if human, non-human primate, rodent is the controlled vocabulary we want or if we want to
    • also differentiate between children and adults (in humans and/or in other organisms), and/or
    • differentiate nhps and rodents more specifically than that, or
  • if we really need this information or if there's a simpler approach or refactor of the config to achieve the same clarity, or
  • what other places we want to use this option for a conditional instead of whatever's already there.

Also, the pipeline validation schema can be updated to make these

"FNIRT_T1w_brain_template": Maybe(str),
"FNIRT_T1w_template": Maybe(str),
required for nhp pipelines (and these
"T1w_brain_template": Maybe(str),
"T1w_template": Maybe(str),
might be optional for nhp pipelines? Or maybe all we need to do is get rid of the FNIRT_T1w* keys altogether and do

registration_workflows:
  anatomical_registration:
    T1w_brain_template: /cpac_templates/MacaqueYerkes19_T1w_1.0mm_brain.nii.gz
    T1w_template: /cpac_templates/MacaqueYerkes19_T1w_1.0mm.nii.gz

in the nhp pipelines?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug improvement NHP Non-Human Primate data related
Projects
Status: No status
Status: No status
Development

No branches or pull requests

2 participants