-
Notifications
You must be signed in to change notification settings - Fork 10
Using Hints
Jordan Matelsky edited this page Mar 18, 2021
·
1 revision
GrandIso optionally accepts an argument hints
which is a list of valid partial mappings to use to seed the search. For example, in this code:
host = nx.DiGraph()
nx.add_path(host, ["A", "B", "C", "A"])
motif = nx.DiGraph()
nx.add_path(motif, ["a", "b", "c", "a"])
find_motifs(motif, host)
There are three valid mappings (because each of A
, B
, and C
can map to a
, b
, or c
).
We can declare that node A
maps to node a
or b
like this:
host = nx.DiGraph()
nx.add_path(host, ["A", "B", "C", "A"])
motif = nx.DiGraph()
nx.add_path(motif, ["a", "b", "c", "a"])
find_motifs(
motif, host,
hints=[{"A": "a"}, {"A", "b"}]
)
If this tool is helpful to your research, please consider citing it with:
# https://doi.org/10.1038/s41598-021-91025-5
@article{Matelsky_Motifs_2021,
title={{DotMotif: an open-source tool for connectome subgraph isomorphism search and graph queries}},
volume={11},
ISSN={2045-2322},
url={http://dx.doi.org/10.1038/s41598-021-91025-5},
DOI={10.1038/s41598-021-91025-5},
number={1},
journal={Scientific Reports},
publisher={Springer Science and Business Media LLC},
author={Matelsky, Jordan K. and Reilly, Elizabeth P. and Johnson, Erik C. and Stiso, Jennifer and Bassett, Danielle S. and Wester, Brock A. and Gray-Roncal, William},
year={2021},
month={Jun}
}