-
I have two heterogeneous graphs (HeteroData) with disjoint node and edge classes that I need to merge into a single graph (to then create edges between the different type of nodes). Right now I have tried the following code:
However this does not work because How can I properly merge the two graphs? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
We currently don't provide any dedicated function for this, so this gets a bit cumbersome. How about new_graph = copy.copy(receptor_graph)
for type in ligrand_graph.node_types + ligrand_graph.edge_types:
for key, value in ligrand_graph[type].items():
new_graph[type][key] = value |
Beta Was this translation helpful? Give feedback.
-
This worked! |
Beta Was this translation helpful? Give feedback.
We currently don't provide any dedicated function for this, so this gets a bit cumbersome. How about