Remove trivial affects generalization rules#84
Merged
Conversation
- Remove four AMIE rules where activity or abundance directly imply activity_or_abundance. - Avoid synthesizing redundant inferred ARAGORN edges when direct source edges can bind to the broader query edge. - Fixes NCATSTranslator/Feedback#1182.
Codecov Report✅ All modified and coverable lines are covered by tests. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
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.
Summary
activityorabundanceaffects edges imply the broaderactivity_or_abundanceaffects edge.Issue
The removed rules are logically true but trivial: the more specific qualifier set on the left-hand side already implies the broader
activity_or_abundancequalifier set on the right-hand side. Underlying data-source edges withactivityorabundancecan be bound directly to anactivity_or_abundancequery edge, so Shepherd should not create an additional inferred edge supported only by those direct edges.This fixes https://github.com/NCATSTranslator/Feedback/issues/1182.
Testing
jq '[.[] | length] | add' workers/aragorn_lookup/rules_with_types_cleaned_finalized.jsonjq '[.. | objects | .Rule? // empty | select(. == "?a increased_activity_biolink:affects ?b => ?a increased_activity_or_abundance_biolink:affects ?b" or . == "?a increased_abundance_biolink:affects ?b => ?a increased_activity_or_abundance_biolink:affects ?b" or . == "?a decreased_activity_biolink:affects ?b => ?a decreased_activity_or_abundance_biolink:affects ?b" or . == "?a decreased_abundance_biolink:affects ?b => ?a decreased_activity_or_abundance_biolink:affects ?b")] | length' workers/aragorn_lookup/rules_with_types_cleaned_finalized.jsonuv run --with-requirements test-requirements.txt pytest tests/unit/aragorn/test_aragorn_lookup.py tests/unit/test_merge_message_helpers.py