We need to implement a new function check_spe() similar to check_sce(). I think that we can copy the code, then remove anything check_spe() doesn't need that the older function needed.
## Use the appropriate one from below:
# library("spatialLIBD")
# devtools::load_all()
dir <- system.file(file.path("extdata", "10xVisium"),
package = "SpatialExperiment")
sample_ids <- c("section1", "section2")
samples <- file.path(dir, sample_ids)
(ve_test <- read10xVisium(samples, sample_ids, type="sparse", data="raw",
images = c("lowres"), load = TRUE))
## Beyond SpatialExperiment for spatialLIBD
ve_test$key <- paste0(ve_test$Barcode, '-', ve_test$sample_id)
rowData(ve_test)$gene_search <- paste0(rownames(ve_test), "; ", rowData(ve_test)$symbol)
Once we have this function, we can update run_app() to use it internally.
Something we need to decide is whether to expect any names in reducedDim(spe). I think that run_app() will not work without any reducedDim() info, so it might be good to add this requirement in check_spe() OR we might have to consider making run_app() and all the shiny code more flexible.
Hi Brenda,
We need to implement a new function
check_spe()
similar tocheck_sce()
. I think that we can copy the code, then remove anythingcheck_spe()
doesn't need that the older function needed.It'll be good to check what else might be missing that we have in the
spe
object at https://github.com/LieberInstitute/spatialDLPFC/blob/main/analysis/03_try_shiny.R that might be missing from say the examplespe
object (calledve_test
below) that we can create with the data in theSpatialExperiment
package.Once we have this function, we can update
run_app()
to use it internally.Something we need to decide is whether to expect any names in
reducedDim(spe)
. I think thatrun_app()
will not work without anyreducedDim()
info, so it might be good to add this requirement incheck_spe()
OR we might have to consider makingrun_app()
and all the shiny code more flexible.Let's keep talking about this! ^^
Best, Leo