Created
July 2, 2020 16:11
-
-
Save rpkyle/247c631e4bf58feff5c930e380dae8d9 to your computer and use it in GitHub Desktop.
dashCytoscape Demo for R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dash) | |
library(dashCytoscape) | |
library(dashHtmlComponents) | |
app <- Dash$new() | |
app$layout( | |
cytoCytoscape( | |
id='cytoscape-elements-boolean', | |
layout = list(name = 'preset'), | |
style = list(width = '100%', height = '400px'), | |
elements=list( | |
list( | |
data = list(id = 'one', label = 'Locked'), | |
position = list(x = 75, y = 75), | |
locked = TRUE | |
), | |
list( | |
data = list(id = 'two', label = 'Selected'), | |
position = list(x = 75, y = 200), | |
selected = TRUE | |
), | |
list( | |
data = list(id = 'three', label = 'Not Selectable'), | |
position = list(x = 200, y = 75), | |
selectable = FALSE | |
), | |
list( | |
data = list(id = 'four', label = 'Not Grabbable'), | |
position = list(x = 200, y = 200), | |
grabbable = FALSE | |
), | |
list( | |
data = list(source = 'one', target = 'two') | |
), | |
list( | |
data = list(source = 'two', target = 'three') | |
), | |
list( | |
data = list(source = 'three', target = 'four') | |
), | |
list( | |
data = list(source = 'two', target = 'four') | |
) | |
) | |
) | |
) | |
app$run_server() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Julia version: https://gist.github.com/rpkyle/230086c112da16ea3118a7c04e69717a
Python version: https://gist.github.com/rpkyle/d9e31ce7a5c43baa766679064011f6a3