-
Notifications
You must be signed in to change notification settings - Fork 0
Defining sub graph as a view
Aditya Ramesh edited this page Dec 23, 2021
·
1 revision
-
We are using multi- directed graphs(multiDiGraphs) in networkx->https://networkx.org/documentation/stable/reference/classes/multidigraph.html
-
We are restricted to use this because we have various types of edges(chemical, assymetric gap etc...) that can be present between the same nodes and each path is directed.
Based on the main graph we construct, we can find various different types of view depending on the kind of filters we want to apply
- Filter sub-graph based on nodes list -
- We pass a list of nodes that needs to be present in the sub-graph
-
Filter sub-graphs based on edges list
- We pass a list of edges that are to be present in the sub-graph
- Use this link to refer to how to get the relevant details of the edges that are needed
- Since there can be multiple edges between the same nodes, networkX indexes them. we need to include all of them in our sub-graphs
- Create a sub VIEW based on nodes and edges present
- just creates a view based on the nodes and edges comparison function passed