-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeployshinycellapp.R
28 lines (22 loc) · 1.02 KB
/
deployshinycellapp.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
setwd()
#Install shiny cell
reqPkg = c("data.table", "Matrix", "hdf5r", "reticulate", "ggplot2",
"gridExtra", "glue", "readr", "RColorBrewer", "R.utils", "Seurat")
newPkg = reqPkg[!(reqPkg %in% installed.packages()[,"Package"])]
if(length(newPkg)){install.packages(newPkg)}
# If you are using h5ad file as input, run the code below as well
reticulate::py_install("anndata")
#To install shiny cell dependencies
reqPkg = c("shiny", "shinyhelper", "data.table", "Matrix", "DT", "hdf5r",
"reticulate", "ggplot2", "gridExtra", "magrittr", "ggdendro")
newPkg = reqPkg[!(reqPkg %in% installed.packages()[,"Package"])]
if(length(newPkg)){install.packages(newPkg)}
# To install shiny cell
devtools::install_github("SGDDNB/ShinyCell")
# To launch rds file
library(Seurat)
library(ShinyCell)
seu = readRDS("C:/Users/Cristal/Downloads/Baylor/shinycellexample/example.rds")
scConf = createConfig(seu)
makeShinyApp(seu, scConf, gene.mapping = TRUE,
shiny.title = "DRG mouse atlas")