How to combine two networks
4
1
Entering edit mode
16 months ago
mail2steff ▴ 60

Dear All, I have two networks. Both the networks have common nodes as well as unique nodes. Is there any way I can combine both and analyze??

network igraph cytoscape • 1.1k views
ADD COMMENT
2
Entering edit mode
16 months ago
zx8754 10k

Using R igraph union:

library(igraph)

net1 <- graph_from_literal(A-B:C:D, A-C, B-C)
net2 <- graph_from_literal(A-X:Y:Z, Z-Y)

par(mfrow = c(1, 3))
set.seed(1)
plot(net1, vertex.size = 50, main = "net1")
plot(net2, vertex.size = 50, main = "net2")
plot(union(net1, net2), , vertex.size = 50, main = "union of net1 and net2")
ADD COMMENT
1
Entering edit mode
16 months ago
scooter ▴ 450

Sure. Read both networks into Cytoscape, and then use the Network Merge tool to do a Union. The resulting network should be what you want.

-- scooter

ADD COMMENT
0
Entering edit mode
16 months ago
Asaf 8.6k

A couple of examples from the literature:

ADD COMMENT
0
Entering edit mode
16 months ago
pixie@bioinfo ★ 1.4k

If they are in the form of edge-lists, you can append the two edge lists one after another and make a common edgelist. Then load it in Cytoscape and there is an option to remove duplicate edges. Don"t forget to add node and/or edge attributes to know which gene/edge is unique or common. Based on this, you can color your nodes/edges differently. HTH.

ADD COMMENT

Login before adding your answer.

Traffic: 2444 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6