VisCello Shiny app code for hosting snRNA-seq data

I am trying to set up VisCello shiny app for hosting some of our single cell data, analyzed in Seurat:

github.com/qinzhu/VisCello

I am using the following code though running into a problem, the app launches however I dont see the umaps and when I click over to differential expression the app goes dark altogether. Below is my code:

library(VisCello)
library(Matrix)
library(Biobase)
library(irlba)
library(Seurat)

Data.Combined <- readRDS("/Users/rbronste/Desktop/Jesse files/Single Cell Analysis/Previous Analyses/6Samples2.rds")

fmeta <- data.frame(symbol = rownames(Data.Combined)) 
rownames(fmeta) <- fmeta$symbol
eset <- new("ExpressionSet",
            assayData = assayDataNew("environment", exprs=Data.Combined@assays$RNA@counts, 
                                     norm_exprs = Data.Combined@assays$RNA@data),
            phenoData =  new("AnnotatedDataFrame", data = Data.Combined@meta.data),
            featureData = new("AnnotatedDataFrame", data = fmeta))

#transferring embeddings to table for VisCello input
umap = Embeddings(object = Data.Combined, reduction = "umap")
write.table(umap, file="/Users/rbronste/Desktop/VisCello/umap.csv", sep = ",", quote = F, row.names = F, col.names = T)

#If you already computed your dimension reduction result and wants to make a cello for it, use following R code:
cello <- new("Cello", name = "My cell subset", idx = 1:ncol(eset))  # cell_index is which cells from ExpressionSet are used for the dimension reduction
my_umap_proj <- read.table("/Users/rbronste/Desktop/VisCello/umap.csv") # You can put in as many dimension reduction result as you want
cello@proj <- list("My UMAP [2D]" = my_umap_proj) # Put a 2D or 3D in the name to tell VisCello if you want to visualize this as a 2D plot or as a 3D rotatable plot, if 2D there must be 2 columns for each dimension, if 3D there must be 3 columns.

clist <- list()
clist[["Global dataset"]] <- cello
saveRDS(clist, "/Users/rbronste/Desktop/VisCello/clist.rds") 

#running VisCello
cello(data_path = "/Users/rbronste/Desktop/VisCello")

I think maybe its something to do with how I am creating a table from the Seurat embedding but Im not sure, any help really appreciated. Thanks.

Read more here: Source link