Skip to content

Instantly share code, notes, and snippets.

@fkgruber
Last active January 23, 2017 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fkgruber/bfab532519f00fb11a259aeb54911d80 to your computer and use it in GitHub Desktop.
Save fkgruber/bfab532519f00fb11a259aeb54911d80 to your computer and use it in GitHub Desktop.
bug in RCy3 when combining Rule and Direct commands
deleteAllWindows(CytoscapeConnection())
cw <- CytoscapeWindow ('setNodeColorDirect.test', graph=makeSimpleGraph(), overwriteWindow=T)
displayGraph (cw)
layoutNetwork (cw, 'force-directed')
setNodeColorDirect (cw, 'A', '#880000')
setNodeColorDirect (cw, c('A', 'C'), c('#88FF00', '#880000'))
setNodeBorderColorDirect(cw, getAllNodes(cw), "#000000")
setNodeBorderColorRule(cw, "type",control.points=as.character(nodeData(cw@graph,attr="type")), colors=c('#FF0000', '#00FF00', '#0000FF'), mode="lookup")
setNodeColorDirect (cw, getAllNodes(cw), '#FFFFFF')
redraw(cw)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment