Make sure celltypes don't contain characters that could interfere with downstream analyses. For example, the R package MAGMA.Celltyping cannot have spaces in celltype names because spaces are used as a delimiter in later steps.
fix_celltype_names(
celltypes,
replace_chars = "[-]|[.]|[ ]|[//]|[\\/]",
make_unique = TRUE
)
Fixed celltype names.
ct <- c("microglia", "astryocytes", "Pyramidal SS")
ct_fixed <- fix_celltype_names(celltypes = ct)