Closed jonaszierer closed 5 years ago
Fixed in 2.2.6. Will be updated at bioconductor within 48 hours. Available now via github:
install.packages("devtools")
library(devtools)
install_github('cytoscape/RCy3', build_vignettes=TRUE)
library(RCy3)
Thanks for the quick fix! There still seems to be a problem in large networks. If there are too many multi-edges (haven't quite found out how many) some edge attributes are lost. Try this:
require(igraph)
require(RCy3)
set.seed(1)
nn <- 100
t <- 4
graph <- erdos.renyi.game(n = nn, p = 0.1)
E(graph)$type <- sample(letters, length(E(graph)), replace = T)
graph <- add_edges(graph, sample(1:nn, size = nn*t*2, replace = T), attr = list(type = sample(letters, nn*t, replace = T)))
createNetworkFromIgraph(graph, "graph")
Thank you both for the additional tests. I can reproduce this.
Fixed in upcoming 2.4.0. Available now via github:
install.packages("devtools")
library(devtools)
install_github('cytoscape/RCy3', build_vignettes=TRUE)
library(RCy3)
Updated solution tested with examples above. See https://github.com/cytoscape/RCy3/issues/115
When creating a multigraph (i.e. a graph with multiple edges between the same pair of vertices) edge attributes are not transferred correctly to Cytoscape. Specifically, all edges between one pair of nodes will have the same edge attributes. for instance:
Both edges will have
type = E2
in cytoscape. When you i.e. try to colour edges by type all of them will have the same colour.