-
Notifications
You must be signed in to change notification settings - Fork 11
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
qualifiers in meta knowledge graph #610
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far so good, but a few notes:
qualifier_type_id
should have thebiolink:
prefix stripped and re-added to ensure it's present and non-duplicated- applicable_values should have
biolink:
prefix stripped, and only added if thequalifier_type_id
includes"predicate"
Regarding your question about supportedLookups()
:
supportedLookups()
should add the complete qualifier set from the given template (provided the template has qualifiers) to each supported lookup it generates. In controllers/meta_knowledge_graph.js
, the step that calls supportedLookups()
should use this new qualifier information alongside the subject/predicate/object to attempt to match to an existing edge. If it matches, add the knowledge type inferred to that edge, otherwise make a new edge with just knowledge type inferred and the information from the supported lookup.
@tokebe Can you give a sample template file. I don't see it in the bte trapi repo but maybe I'm missing it? |
Follow the imports: You'll need to edit the function in template_lookup.js as well to actually grab the qualifier sets. |
Oh I was looking for the json file in the wrong repo... |
Should be fixed, also a new PR on query graph handler |
I have a question specific to the With the current PR code, two separate MetaEdges are made. I saw these two:
|
Regarding
|
And I changed the title because I assumed we meant "qualifiers". I'm done with my quick testing of the "qualifiers functionality" for #595. I posed my two questions / chunks of feedback above, and I guess we'll wait to hear about the "qualifier-set merging" from the TRAPI team / Translator (and we'll track that discussion in the issue). It looks great overall! |
Association has been moved into its own PR. Will address Colleen's comments in that PR |
We want edges that are exactly the same other than |
Should be fixed |
…into knowledge-graph-update
Fix currently has inferred duplicating on some edges, like below: {
"subject": "biolink:SmallMolecule",
"predicate": "biolink:affects",
"object": "biolink:Gene",
"qualifiers": [
{
"qualifier_type_id": "biolink:causal_mechanism_qualifier",
"applicable_values": [
"inverse_agonism"
]
},
{
"qualifier_type_id": "biolink:object_aspect_qualifier",
"applicable_values": [
"activity"
]
},
{
"qualifier_type_id": "biolink:object_direction_qualifier",
"applicable_values": [
"decreased"
]
},
{
"qualifier_type_id": "biolink:qualified_predicate",
"applicable_values": [
"biolink:causes"
]
}
],
"knowledge_types": [
"lookup",
"inferred",
"inferred"
]
}, |
(Also, I merged the latest from main, you'll have to update your workspace by cloning this repo fresh and using |
Shoudl be fixed |
Hmmm....What is shown above is actually "incorrect" because we wouldn't actually run creative-mode on a QEdge if all those qualifiers were specified as constraints on that QEdge. I think some logic may be needed to figure out when a Some thoughts I have:
|
@colleenXu I'm not convinced this logic is necessary... based on the way the poll is going, it's looking like Translator want the more general "all possible qualifiers" option, in which case such ambiguity is expected. It wouldn't be read as "we support creative mode on this edge with these qualifiers", so much as "we support creative mode on this edge with some subset of these qualifiers" and then we have no duty to be more clear. |
Looks like this is almost ready to go -- I'm noticing a couple cases of duplicate "inferred" in some of the metaEdges, however:
|
#595
Qualifiers are just read from the existing qualifiers in yaml.
Currently doesn't merge edges with same input/output/predicate but different qualfiers in the meta knowledge graph.