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

Add additional wildcard entities #69

Merged
merged 2 commits into from
Apr 26, 2023
Merged

Add additional wildcard entities #69

merged 2 commits into from
Apr 26, 2023

Conversation

kaitj
Copy link
Collaborator

@kaitj kaitj commented Apr 26, 2023

Proposed changes

Resolves #59. Adds additional wildcard entities - namely acquisition and run. Also added in direction for diffusion data. Are there any others that should be added?

Also reverts a change to correct for the singularity container uris.

Types of changes

What types of changes does your code introduce? Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you are unsure about any of the choices, don't hesitate to ask!

  • Changes have been tested to ensure that fix is effective or that a feature works.
  • Changes pass the unit tests
  • Code has been run through the poe quality task
  • I have included necessary documentation or comments (as necessary)
  • Any dependent changes have been merged and published

Notes

All PRs will undergo the unit testing before being reviewed. You may be requested to explain or make additional changes before the PR is accepted.

- add acquisition, direction (dwi), and run entities
- fix uri to singularity containers
@kaitj kaitj added the enhancement New feature or request label Apr 26, 2023
@kaitj kaitj changed the title add extra wildcard entities Add additional wildcard entities Apr 26, 2023
@kaitj kaitj added maintenance Updates or improvements that do not change functionality of the code and removed enhancement New feature or request labels Apr 26, 2023
@tkkuehn
Copy link
Collaborator

tkkuehn commented Apr 26, 2023

Are there any others that should be added?

Looking through the spec, the following could be options:

For T1w:

  • ce (Not sure if SCATTR would handle contrast-enhanced images)
  • rec (I think we may as well include this as a wildcard, I don't think we care)
  • part (I need to look into whether snakebids allows you to specify something like "if part is defined, we only want mag" I think we just need to include it as a wildcard and filter it to mag)

For dwi: rec and part (see above)

For mask:

  • space
    • Slight rabbit hole here... The section about masks says this should be orig if there hasn't been a transformation. The definition of the space entitity says this must come from one of the modality specific lists in this appendix. The appendix says that images not registered to a template can be either individual, study, or scanner (default, but space should just be omitted in this case). The spatial references section sees to support the definition of the space entity.
    • Ultimately I guess this should be excluded or filtered to something like [orig, scanner, individual]?
  • res (I think this should be a wildcard)
  • den (I don't really understand why this applies to image masks)
  • label (Can be filtered out I think -- these are brain masks right?)

@kaitj
Copy link
Collaborator Author

kaitj commented Apr 26, 2023

T1w

  • In theory it could handle contrast-enhanced, but in practice the registration would likely fail. I'd leave this out for (unless we end up incorporating something to remove the contrast enhancement
  • Agree about rec and part (also for diffusion)

Mask

  • I think we can leave out den (as this would be more relevant for surface processing, which we don't do here)
  • label again I think we can leave out, given these are whole brain masks as you noted
  • Agree about res
  • space gets tricky as i feel like this isn't really followed. I think we can include this with the filters you suggested, but also include T1w (selfishly, this is used in a lot of the datasets that we are using, and what we are expecting currently).

@tkkuehn
Copy link
Collaborator

tkkuehn commented Apr 26, 2023

Sounds good on all counts -- will approve once you've made those changes.

@kaitj
Copy link
Collaborator Author

kaitj commented Apr 26, 2023

Added in the additional entities, with the caveat that part is causing the workflow to fail as it expected the entity to exist if it is included in filters

@kaitj
Copy link
Collaborator Author

kaitj commented Apr 26, 2023

Will merge this in, and fix the part wildcard / filtering in a separate PR.

@kaitj kaitj merged commit c8f2bac into main Apr 26, 2023
@kaitj kaitj deleted the pybids_inputs branch April 26, 2023 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Updates or improvements that do not change functionality of the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make pybids_inputs more permissive
2 participants