Closed mattcieslak closed 4 days ago
This looks like a really clean solution. Do you know what would happen if there were multiple transforms available?
there would be a crash. Probably better to exit with an error than let it crash downstream?
Oh I see that now:
Users would get a pretty clear error message. Something like:
More than one acpc_to_template_xfm found.
Files found:
/path/to/sub-01_from-ACPC_to-MNIInfant+1_mode-image_xfm.h5
/path/to/sub-01_from-ACPC_to-MNIInfant+2_mode-image_xfm.h5
Query: {'datatype': 'anat', 'from': ['T1w', 'T2w', 'ACPC'], 'to': 'MNI152NLin2009cAsym', 'mode': 'image', 'suffix': 'xfm', 'extension': '.h5'}
I'm happy with that error message!
Actually, since the to
value is set by QSIRecon as either MNI152NLin2009cAsym (default) or MNIInfant (infant mode), I think (1) you wouldn't get an error and (2) you won't catch MNIInfant+<cohort>
. Does that sound right?
Attention: Patch coverage is 46.66667%
with 8 lines
in your changes missing coverage. Please review.
Project coverage is 47.90%. Comparing base (
0b53f53
) to head (f63f7ea
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
🚨 Try these New Features:
In my local testing with the cohorts it still finds them
Oh... maybe that's related to how parse_file_entities
doesn't find the +<cohort>
in the entities?
Right, the query finds it while ignoring the cohort part
I worry that's more of a convenient bug than a feature, but I also think we'll have plenty of notice if pybids starts parsing these plus signs correctly and searching 'MNIInfant' stops finding 'MNIInfant+1' etc.
We'll definitely need to add a test for MNIInfant inputs, but it will be a big task to get simulated data that looks like HBCD
I think SDCFlows has a few tests where they just generate a dataset layout from a dictionary and make sure that the queries work as expected. We could probably add something like that just to make sure the collection steps are working.
The HBCD data will be registered to MNIInfant+cohort templates. We want to make sure these file names are used in the qsirecon scalar mappers