Entering edit mode
Enter the body of text here
Code should be placed in three backticks as shown below
library(dittoSeq)
library(scater)
library(patchwork)
library(cowplot)
library(viridis)
## UMAP colored by cell type and expression - dittoDimPlot
p1 <- dittoDimPlot(spe,
var = "celltype",
reduction.use = "UMAP_mnnCorrected",
size = 0.2,
do.label = TRUE) +
scale_color_manual(values = metadata(spe)$color_vectors$celltype) +
theme(legend.title = element_blank()) +
ggtitle("Cell types on UMAP, integrated cells")
p2 <- dittoDimPlot(spe,
var = "Ecad",
assay = "exprs",
reduction.use = "UMAP_mnnCorrected",
size = 0.2,
colors = viridis(100),
do.label = TRUE) +
scale_color_viridis()
p1 + p2
# include your problematic code here with any corresponding output
# please also include the results of running the following in an R session
Error in .var_OR_get_meta_or_gene(target, object, assay, slot, adjustment) :
celltype is not a metadata or gene nor equal in length to ncol('object')
sessionInfo( )