Skip to content

Commit

Permalink
Fix bug on the "clusters (interactive)" tab of run_app() for stitched…
Browse files Browse the repository at this point in the history
… data.

I used this code to debug things:

```R
library("HDF5Array")

spe <- loadHDF5SummarizedExperiment('/Users/leocollado/Dropbox/Code/_libdcode/visiumStitched_brain/code/05_shiny/spe')
vars <- colnames(colData(spe))

run_app(
    spe,
    sce_layer = NULL,
    modeling_results = NULL,
    sig_genes = NULL,
    title = "visiumStitched_brain",
    spe_discrete_vars = c(
        "ManualAnnotation",
        vars[grep("^precast_k[248]$", vars)],
        "scran_quick_cluster"
    ),
    spe_continuous_vars = c(
        "sum_umi",
        "sum_gene",
        "expr_chrM",
        "expr_chrM_ratio"
    ),
    default_cluster = "precast_k2",
    docs_path = "/Users/leocollado/Dropbox/Code/_libdcode/visiumStitched_brain/code/05_shiny/www",
    is_stitched = TRUE
)
```
  • Loading branch information
lcolladotor committed Jul 26, 2024
1 parent ace59fa commit c82c789
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions R/app_server.R
Original file line number Diff line number Diff line change
Expand Up @@ -682,8 +682,7 @@ app_server <- function(input, output, session) {

## Add the reduced dims
if (reduced_name != "") {
red_dims <-
reducedDim(spe, reduced_name)[spe$sample_id == sampleid, ]
red_dims <- reducedDim(spe_sub, reduced_name)
colnames(red_dims) <-
paste(reduced_name, "dim", seq_len(ncol(red_dims)))
d <- cbind(d, red_dims)
Expand Down

0 comments on commit c82c789

Please sign in to comment.