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

Propose QEdge.exclude #306

Open
wants to merge 1 commit into
base: 1.3
Choose a base branch
from
Open

Propose QEdge.exclude #306

wants to merge 1 commit into from

Conversation

edeutsch
Copy link
Collaborator

@edeutsch edeutsch commented Dec 1, 2021

No description provided.

Copy link
Collaborator

@vdancik vdancik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QEdge.exclude does not indicate what is excluded. I think QEdge.excluded_predicates is a better choice.

@edeutsch
Copy link
Collaborator Author

edeutsch commented Jan 5, 2022

QEdge.exclude does not indicate what is excluded. I think QEdge.excluded_predicates is a better choice.

I don't understand what you mean that it does not indicate what is excluded. The documentation states "If set to true, then all subgraphs that could contain this edge are excluded from the final results."

It seems to me that QEdge.excluded_predicates is a different idea than what is proposed here. Consider:

A[disease] <- B[gene], "biolink:related_to"
C[small molecule] -> B[gene], "biolink:related_to"
C[small module] -> A[disease], exclude "biolink:contraindicated_for"

"Find all small molecules related to genes that are related to disease A, except for the small molecules (C) that are contraindicated for disease A"

I don' think this scenario can be expressed with QEdge.excluded_predicates, but can be with QEdge.exclude

I think these two proposals are not equivalent. I think:

QEdge.excluded_predicates should be simply thought of as QEdge.omitted_predicates from the predicates set
while
QEdge.exclude should be be thought of as QEdge.exclude_subgraph_if_this_edge_is_possible

@colleenXu
Copy link
Contributor

I'm wondering why we can't use predicate mixins to avoid specific predicates?

The logic here seems to be a "NOT predicate X". However, I think it's somewhat complicated to do this, especially since it involves navigating the hierarchy "NOT predicate X and its descendants".


Also, a note for the example above:

BTE would consider the situation above a "cycle" (we disregard edge directions when making this decision). To find small molecules contraindicated for disease A, we'd probably want another node: Disease A -> Gene -> SmallMolecule <-(everything not contraindicated)- Disease A

@kennethmorton
Copy link

From the Operations and Workflow group - It was asked if this could be addressed in a workflow.

Currently the answer is no, however a workflow operation could be developed to serve as a filter. After further discussion, it was decided that even with a suitable workflow operation, the group would recommend that this information also be contained in the query.

@edeutsch
Copy link
Collaborator Author

Adding a link to this discussion, which is relevant:
RTXteam/RTX#1766

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants