Figure 2D

Code
# Inma Hernandez Lopez
# inmaculada.hernandez-lopez@ukr.de
# LIT -  Leibniz-Institute für Immunotherapie

# Enrique Blanco Carmona
# e.blancocarmona@kitz-heidelberg.de
# PhD Student – Clinical Bioinformatics
# Division of Pediatric Neurooncology (B062)
# DKFZ-KiTZ | Germany


sample <- readRDS("/omics/odcf/analysis/OE0145_projects/idh_gliomas/Figures_Science/revision/IDH_gliomas_book/datasets/primary_ATAC_OD.rds")
sample$relabelling[sample$relabelling == "RA"] <- "RE"
# Colors to use.
cluster_cols <- c("RE" = "#ECA809",
                  "OPC-like" = "#043362",                    
                  "T Cell" = "#009FF5",                   
                  "Oligodendrocytes" = "#BC5210",            
                  "Astrocytes" = "#279185",                  
                  "Microglia" = "#7EB356",                   
                  "Pericytes" = "#AC70FF",                  
                  "Mixed" = "#8d5d3f",                   
                  "Gradient" = "#D6D6D6",                    
                  "Neurons" = "#544B81",                   
                  "Endothelial" = "#da627d",                 
                  "Astro-like" = "#9A031E",               
                  "Cycling" = "#5F0F40")
Code
p <- SCpubr::do_DimPlot(sample = sample,
                        group.by = "relabelling",
                        font.size = 20,
                        raster = TRUE,
                        raster.dpi = 2048,
                        pt.size = 4,
                        colors.use = cluster_cols,
                        legend.icon.size = 8,
                        legend.ncol = 2,
                        na.value = "grey50")