[ENH] add MultipleLabels IntendedFor method#851
Open
octomike wants to merge 3 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #851 +/- ##
=======================================
Coverage 83.24% 83.24%
=======================================
Files 42 42
Lines 4404 4429 +25
=======================================
+ Hits 3666 3687 +21
- Misses 738 742 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a suggestion for yet another IntendedFor method. We had some success using
PlainAcquisitionLabelmerged a while back, but there are a number of cases where our site-wide heuristic requires more than that.We often get duplicated files using the prescan normalization method of our scanner. Currently we name it
rec-norm(I'm aware of this beast, we decided to use rec to be bids valid for now). The issue with this however is that we cannot base our IntendedFor matching decision solely onacq, because we have two groups now:and
And as I understand, fmaps with
rec-normare intended only for the corresponding functionals withrec-norm.We could introduce a second label
acq-senormand use that, however, the entity modification withrec-happens way after our protocol modifications (we heavly rely onreproin.fix_dbic_protocol()and a set of regexes.Using a combination of
acqandrecas they key would help us out here. I decided to create a slightly more generic approach with this PR, instead of just introducingPlainAcquisitionRecLabelor something similar.Using
MultipleLabels, a heuristic user can now base the decision on one ore more entities, configurable with a new paramterparameter_optsinPOPULATE_INTENDED_FOR_OPTS. (I added an example to the docs)It's mildly invasive, because we have to carry these options along in
bids.py- however, I tried to make sure that nothing breaks withreproinor any other heuristic that is unaware of this new option.