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

Automatically infer cohort only if infant output space is requested without cohort info #414

Open
tsalo opened this issue Dec 6, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@tsalo
Copy link
Contributor

tsalo commented Dec 6, 2024

A short summary of what you would like to see in NiBabies.

I think that the current approach in init_workflow_spaces will add MNIInfant with the appropriate cohort if no specific output spaces were requested by the user. I was thinking we could make this explicit in the output space specification, with something like MNIInfant (no cohort) or MNIInfant:cohort-auto (reserved value to infer the cohort).

That way you could have stuff like --output-spaces MNIInfant:cohort-1:cohort-auto MNI152NLin6Asym and it would still generate MNIInfant outputs with the age-appropriate cohort.

Do you have any interest in helping implement the feature?

Yes!

Add any additional information or context about the request here.

This has implications for other infant preprocessing pipelines, like QSIPrep (and maybe eventually ASLPrep).

@tsalo tsalo added the enhancement New feature or request label Dec 6, 2024
@mgxd
Copy link
Collaborator

mgxd commented Dec 6, 2024

IMO, the output spaces syntax is already quite complicated, so I'm a bit hesitant to add another special value (auto). I like using MNIInfant, though some some changes to the spaces api will be needed for this.

Though, I think cases where multiple cohorts are requested should refer to the age ranges (and we should probably make that displayed somewhere rendered nicely) and explicitly add the cohorts of interest - the autodetection implemented was only meant to lower the barrier to entry.

And this brings to light another problem - I don't know if we have a consistent way to specify the internal common space when two or more MNIInfant cohorts are requested. I believe this should just be the first MNIInfant template provided within --output-spaces, but need to verify this is actually the case

@tsalo
Copy link
Contributor Author

tsalo commented Dec 6, 2024

IMO, the output spaces syntax is already quite complicated, so I'm a bit hesitant to add another special value (auto).

For what it's worth, QSIPrep and QSIRecon need the ability to provide special values to output spaces. In their case, they need native-min and native-max options for resolution. @effigies proposed making it possible for applications to register spaces in nipreps/niworkflows#889, so additional special values would be managed on the BIDS App's side, not niworkflows'.

EDIT: The one issue with not using a special value is that it's a little harder to parse the output spaces. For example, if you want MNIInfant:cohort-1, MNIInfant:cohort-2 (this one's based on the age), and MNI152NLin6Asym outputs, --output-spaces MNIInfant:cohort-1:cohort-auto MNI152NLin6Asym is clearer than --output-spaces MNIInfant MNIInfant:cohort-1 MNI152NLin6Asym

I don't know if we have a consistent way to specify the internal common space when two or more MNIInfant cohorts are requested.

What is the "internal common space" in this scenario? The space used for figures like carpet plots?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants