Closed jd690764 closed 6 years ago
Hi Janos,
Thanks for the clear bug report and example code! Good news: I believe this is just a matter of visualization. When I run your example code, I actually get two edges between a and d. You can see these in the Edge Table and if you change from the default visual style to something like "Directed".
The network I have in a data frame is directed and can have multiple edges between the same nodes.
E.g.:
nw <- data.frame(source= c('a', 'a', 'b', 'c'), target = c('d', 'd', 'y', 'x'), attr = c(1,2,3,4), stringsAsFactors = F)
After creating the network in cytoscape:
createNetworkFromDataFrames(edges = nw, title = 'test_network', collection = 'test_collection')
there are 2 edges between a and d, but they have the same attribute value = 2.
Creating a graph with igraph and using createNetworkFromIgraph gives the same result.
`sessionInfo() R version 3.4.1 (2017-06-30) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS High Sierra 10.13.4
Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] RCy3_2.1.2
loaded via a namespace (and not attached): [1] httr_1.3.1 compiler_3.4.1 magrittr_1.5 R6_2.2.2 parallel_3.4.1 tools_3.4.1 igraph_1.2.1
[8] curl_3.2 yaml_2.1.19 RJSONIO_1.3-0 BiocGenerics_0.24.0 pkgconfig_2.0.1 stats4_3.4.1 XML_3.98-1.11
[15] graph_1.56.0`
Thanks, Janos