Closed raph06 closed 3 years ago
Thanks for the bug report. We would really like to track this one down. The error message is suggesting that we are attempting to apply a visual style on a network that does not exist. As you point out, the problem is within the function, createNetworkFromDataFrames, on this line:
commandsPOST("vizmap apply styles="default"")
Theoretically, this line should "wait" until the network is created, but we think there is a synchronicity issue where Cytoscape says it's done, but it's not actually done yet. This minor delay could be due to a lot of factors, including network size and other resources running at the time, etc., so it is not surprizing that such an error would be hard to reproduce.
I'm tempted to introduce a hacky "pause" in the function is a development version just so folks have something that will work while we tackle the real issue (which is not in the RCy3 code). Would this be helpful to you?
See progress on CyREST issue: https://github.com/cytoscape/cyREST/issues/106
I will also look into this. My gut says that this is an issue with events in the Cytoscape model.
There were recently a few changes in the Cytoscape 3.8.1 release that may have inadvertently addressed this. I would suggest checking if that update solves the issue.
Checked 3.8.1 with troubleshooting script: same error.
Hi thank you for the explanation :+1:
Hello,
has this issue fixed? When using Cytoscape 3.8.2, I got error from R:
actors <- data.frame(name=c("Alice", "Bob", "Cecil", "David",
"Esmeralda"),
age=c(48,33,45,34,21),
gender=c("F","M","F","M","F"))
relations <- data.frame(from=c("Bob", "Cecil", "Cecil", "David",
"David", "Esmeralda"),
to=c("Alice", "Bob", "Alice", "Alice", "Bob", "Alice"),
same.dept=c(FALSE,FALSE,TRUE,FALSE,FALSE,TRUE),
friendship=c(4,5,5,2,1,1), advice=c(4,5,5,4,2,3))
ig <- graph_from_data_frame(relations, directed=TRUE, vertices=actors)
createNetworkFromIgraph(ig,"myIgraph")
**RCy3::commandsPOST, HTTP Error Code: 500
url=http://localhost:1234/v1/commands/vizmap/apply
body={
"styles": "default"
}
Error in commandsPOST("vizmap apply styles=\"default\"", base.url = base.url) :
No network views selected.**
Yes, this has been fixed with a temporary "pause" introduced into RCy3. Cytosacpe 3.8.2 does not fix the source problem; this fix will be attempted in 3.9 sometime mid-2021.
In the meantime, update to the latest RCy3 (2.10.0+) and you will have a working script. I tested your sample script 10 times and it completed without error each time.
Hi,
Thank you for this nice package. I'm facing an issue that I can't figure out.
This occurs when using the function createNetworkFromDataFrames(nodes, all_edges, title = title, collection = collection)
One time out of two, I get
This occurs when setting default style via commandsPOST("vizmap apply styles=\"default\"")
This has also been reported here : biostars.org/p/449025/
The fact that it occurs one time out of two let me believe that it's due to the parameters I set to make my network. Though it is not reproducible per se here is the sequence of commands I use, hope it might lead somewhere:
Remove duplicate networks
if custom style already created
if custom style not created
Selecting edges for arrow, color bypass
selectEdges()
setEdgeTargetArrowShapeBypass()
setEdgeSourceArrowShapeBypass()
clearSelection()
selectEdges(edgedata$SUID[which(edgedata$edgtype == "LONG_DASH")])
selectEdges(edgedata$SUID[which(edgedata$edgtype == "SINEWAVE")])
selectEdgesAdjacentToSelectedNodes()
setEdgeColorBypass(conds.ifs$edges, "#FED000")
clearSelection()
setEdgeColorBypass(conds.for$edges, "#ff6633")
clearSelection()
Create subnetwork if needed (bug occurs although no Subnetwork needs to be created)
Going back to main network
Collapsing groups
selecting and layout'in some nodes for user to move around
Would there be a way to reset default settings afterwards ? I tried to include
setCurrentView(nview) before the createNetwork command, with no luck.
Best Raphael