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

Find Larger Matches #36

Open
Matt-81 opened this issue May 19, 2023 · 0 comments
Open

Find Larger Matches #36

Matt-81 opened this issue May 19, 2023 · 0 comments

Comments

@Matt-81
Copy link

Matt-81 commented May 19, 2023

Dear @j6k4m8,
I am looking for a way to find matches that are larger than the input motif (possibly given a certain threshold).

For instance, given the following motif:

motif = nx.DiGraph()
motif.add_edge("n1", "n0", label="gen")
motif.add_edge("n2", "n0", label="gen")
motif.add_node("n0", label="class")
motif.add_node("n1", label="subclass")
motif.add_node("n2", label="subclass")

Finding matches in a given target graph G like:

("n1", "n0", label="gen")
("n2", "n0", label="gen")
("n1", "n3", label="rel")
("n2", "n4", label="rel")
("n0", label="class")
("n1", label="subclass")
("n2", label="subclass")
("n3", label="class")
("n4", label="class")

or

("n1", "n0", label="gen")
("n2", "n0", label="gen")
("n1", "n3", label="rel")
("n1", "n4", label="rel")
("n1", "n5", label="rel")
("n0", label="class")
("n1", label="subclass")
("n2", label="subclass")
("n3", label="class")
("n4", label="class")
("n5", label="class")

etc.

It should be a kind of inexact match where the input motif is always a subset of the output matches and we can select, for instance, the number of neighbor nodes to be considered in the output matches.

Thanks in advance for your help!

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

No branches or pull requests

1 participant