taking intersection between 6 networks by graph.intersect
1
0
Entering edit mode
Angel ▴ 40
@angel-7981
Last seen 7.0 years ago
Berlin

 

hi,

I have 6 networks derived from different algorithms like below

head(mycountsaracne[,1:4])

      AT1G01060 AT1G01170 AT1G01260 AT1G01380

AT1G01060 0 0 0 0

AT1G01170 0 0 0 0

AT1G01260 0 0 0 0

AT1G01380 0 0 0 0

AT1G01490 0 0 0 0

AT1G01500 0 0 0 0

dim(mycountsaracne)

[1] 2857 2857

library(igraph)

adj_1 <- as.matrix(mycountsaracne)

g_1 <- graph.adjacency(adj_1, mode="undirected", weighted=NULL, diag=TRUE)

adj_2 <- as.matrix(mycountsclr)

g_2 <- graph.adjacency(adj_2, mode="undirected", weighted=NULL, diag=TRUE)

g_sim <- graph.intersection(g_1, g_2, byname = "auto", keep.all.vertices = FALSE)

adj_3 <- as.matrix(pcor.dyn)

g_3 <- graph.adjacency(adj_3, mode="undirected", weighted=T, diag=F)

g_sim <- graph.intersection(g_sim,g_3, byname = "auto", keep.all.vertices = FALSE)

adj_4 <- as.matrix(mycountsGENEI3)

g_4 <- graph.adjacency(adj_4, mode="undirected", weighted=NULL, diag=TRUE)

g_sim <- graph.intersection(g_sim,g_4, byname = "auto", keep.all.vertices = FALSE)

adj_5 <- as.matrix(mycountssilencing)

g_5 <- graph.adjacency(adj_5, mode="undirected", weighted=NULL, diag=TRUE)

g_sim <- graph.intersection(g_sim,g_5, byname = "auto", keep.all.vertices = FALSE)

adj_6 <- as.matrix(mycountsdeconvolution)

g_6 <- graph.adjacency(adj_6, mode="undirected", weighted=NULL, diag=TRUE)

g_sim <- graph.intersection(g_sim,g_6, byname = "auto", keep.all.vertices = FALSE)

adj_sim <- get.adjacency(g_sim,type="both")

g_araclr <- graph.adjacency(adj_sim,mode = "undirected",weighted = T)

edge_araclr <- get.data.frame(g_araclr,what = "edges")

but I only could take intersection between the the third first networks and by adding the forth one theedge_araclr is empty

please help me

thank you

igraph software error adjacency matrix • 1.2k views
ADD COMMENT
2
Entering edit mode
Paul Shannon ▴ 470
@paul-shannon-5944
Last seen 22 months ago
United States

Angel,

I'd be glad to help.  Can you provide a small, focused and reproducible example?   

 - Paul

ADD COMMENT
0
Entering edit mode

thank you so much Paul for your kindness

I think I detected the problem

I should take adjacency and the graph.adjacency before getting each intersection separately 

thanks again

ADD REPLY

Login before adding your answer.

Traffic: 484 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