-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
renamed js log to cyjshiny_log to break conflict with igvShiny.R
- Loading branch information
1 parent
afcf807
commit 2e3a944
Showing
4 changed files
with
86 additions
and
47 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Package: cyjShiny | ||
Title: Cytoscape.js Shiny Widget (cyjShiny) | ||
Version: 1.0.34 | ||
Date: 2022-01-16 | ||
Version: 1.0.35 | ||
Date: 2022-05-27 | ||
Authors@R: c(person("Omar", "Shah", role = c("ctb")), | ||
person("Paul", "Shannon", email = "[email protected]", role = c("aut")), | ||
person("Augustin", "Luna", email = "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-5709-371X"))) | ||
|
@@ -27,4 +27,4 @@ Collate: | |
'graphsToJSON.R' | ||
'cyjShiny.R' | ||
VignetteBuilder: knitr | ||
RoxygenNote: 7.1.1 | ||
RoxygenNote: 7.2.0 |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
library(shiny) | ||
library(cyjShiny) | ||
library(htmlwidgets) | ||
library(graph) | ||
library(jsonlite) | ||
#---------------------------------------------------------------------------------------------------- | ||
tbl.nodes <- data.frame(id=c("A", "B", "C"), | ||
type=c("kinase", "TF", "glycoprotein"), | ||
lfc=c(-3, 1, 1), | ||
count=c(0, 0, 0), | ||
stringsAsFactors=FALSE) | ||
|
||
tbl.edges <- data.frame(source=c("A", "B", "C"), | ||
target=c("B", "C", "A"), | ||
interaction=c("phosphorylates", "synthetic lethal", "unknown"), | ||
stringsAsFactors=FALSE) | ||
|
||
graph.json <- toJSON(dataFramesToJSON(tbl.edges, tbl.nodes), auto_unbox=TRUE) | ||
#---------------------------------------------------------------------------------------------------- | ||
ui = shinyUI(fluidPage( | ||
|
||
cyjShinyOutput('cyjShiny'), | ||
width=10 | ||
) | ||
) | ||
#---------------------------------------------------------------------------------------------------- | ||
server = function(input, output, session) | ||
{ | ||
output$cyjShiny <- renderCyjShiny({ | ||
cyjShiny(graph=graph.json, layoutName="cola") | ||
}) | ||
|
||
} # server | ||
#---------------------------------------------------------------------------------------------------- | ||
runApp(shinyApp(ui=ui, server=server), port=9999) | ||
|
This file contains 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