Question: taking intersection between 6 networks by graph.intersect
0
gravatar for Angel
2.9 years ago by
Angel40
Berlin
Angel40 wrote:

 

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

ADD COMMENTlink modified 2.9 years ago by Paul Shannon370 • written 2.9 years ago by Angel40
Answer: taking intersection between 6 networks by graph.intersect
2
gravatar for Paul Shannon
2.9 years ago by
Paul Shannon370
Paul Shannon370 wrote:

Angel,

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

 - Paul

ADD COMMENTlink written 2.9 years ago by Paul Shannon370

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 REPLYlink written 2.9 years ago by Angel40
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 161 users visited in the last hour