SGDDNB / ShinyCell

Shiny Interactive Web Apps for Single-Cell Data
GNU General Public License v3.0
155 stars 57 forks source link

Subscript out of bounds possibly seurat v5 compatibility #89

Open rbutleriii opened 2 months ago

rbutleriii commented 2 months ago

Hi all,

Previously I haven't had an issue building the app, but the latest set I have is Seurat v5, which uses layers not assays. When I try to build it, get the following error:

makeShinyApp(seu,
  scConf,
  gene.mapping = TRUE,
  shiny.title = "T41B C31 snRNAseq counts"
)
# Error in drMat[sc1meta$sampleID, ] : subscript out of bounds
traceback()
# 2: makeShinyFiles(obj = obj, scConf = scConf, gex.assay = gex.assay[1],
#        gex.slot = gex.slot[1], gene.mapping = gene.mapping, shiny.prefix = "sc1",
#        shiny.dir = shiny.dir, default.gene1, default.gene2, default.multigene,
#        default.dimred)
# 1: makeShinyApp(seu, scConf, gene.mapping = TRUE, shiny.title = "T41B C31 snRNAseq counts")

When I back-convert Seurat v5 to v3, it runs successfully, but going forward there may need to be an update to accommodate the new structure:

# convert a v5 assay to a v3 assay
seu[["RNA"]] <- as(object = seu[["RNA"]], Class = "Assay")
rbutleriii commented 2 months ago

Hmm, actually, that is not correct, even the v3 assay shows subscript out of bounds