p1 <- SCpubr::do_DimPlot(sample = sample,
reduction = "diffusion",
colors.use = cluster_cols,
group.by = "Annotation",
font.size = 20,
raster = TRUE,
raster.dpi = 2048,
pt.size = 4,
legend.icon.size = 8,
legend.ncol = 2,
na.value = "grey50",
axis.title.face = "plain")
out <- SCpubr::do_DiffusionMapPlot(sample = sample,
input_gene_list = markers,
group.by = "Annotation",
colors.use = list("Annotation" = cluster_cols),
flavor = "Seurat",
font.size = 20,
interpolate = FALSE,
main.heatmap.size = 0.80,
axis.text.face = "plain",
legend.ncol = 1,
legend.length = 12,
legend.width = 0.5,
legend.framecolor = "grey50",
legend.tickcolor = "white",
legend.framewidth = 0.2,
legend.tickwidth = 0.2,
axis.title.face = "plain")
p2 <- out$DC_1
p3 <- out$DC_2
p2$labels$x <- "DC 1"
p3$labels$x <- "DC 2"
p2$labels$y <- "Gene set"
p3$labels$y <- "Gene set"
p2$guides$fill$title <- "Enrichment"
p3$guides$fill$title <- "Enrichment"
p2[[1]]$guides$fill$title <- ""
p3[[1]]$guides$fill$title <- ""
p2[[2]] <- p2[[2]] + ggplot2::theme(axis.title.y = ggplot2::element_text(angle = 90))
p3[[2]] <- p3[[2]] + ggplot2::theme(axis.title.y = ggplot2::element_text(angle = 90))
p2 <- p2 & ggplot2::theme(legend.key.size = ggplot2::unit(0.3, 'cm'))
p3 <- p3 & ggplot2::theme(legend.key.size = ggplot2::unit(0.3, 'cm'))
p2 <- p2 + patchwork::plot_annotation(theme = ggplot2::theme(plot.margin = ggplot2::margin(t = 0, r = 0, b = 0, l = 0)))
p3 <- p3 + patchwork::plot_annotation(theme = ggplot2::theme(plot.margin = ggplot2::margin(t = 0, r = 0, b = 0, l = 0)))