-
Notifications
You must be signed in to change notification settings - Fork 1
/
R2_foot_printing_cell_type.R
44 lines (37 loc) · 1.44 KB
/
R2_foot_printing_cell_type.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
pacman::p_load(Signac, Seurat,
scater, tidyverse, ggplot2,
patchwork, hrbrthemes, ggbeeswarm,
enrichR, UCell, RColorBrewer)
source('/media/AGFORTELNY/people/rohit/projects/neuroblastoma/styling_atac.R')
nb <-
readRDS(
#file = '/media/AGFORTELNY/people/rohit/projects/nblast_scopen_gene_activity_normalized.rds')
file = '/media/AGFORTELNY/people/rohit/projects/nblast_scopen_gene_activity_normalized_motifs_added.rds')
groups <- list(c('2', '3', '6', '15', '16'),
c('1', '4', '5', '11'),
c('7','12'),
c('8', '9', '10','13', '14'))
nb$group <- [email protected] %>%
dplyr::mutate(
group = dplyr::case_when(
orig.ident %in% groups[[1]] ~"C",
orig.ident %in% groups[[2]] ~"M",
orig.ident %in% groups[[3]] ~"A",
orig.ident %in% groups[[4]] ~"S")) %>%
pull(group)
nb$activ.ident <- [email protected]$group
# gather the footprinting information for sets of motifs
nb <- Footprint(
object = nb,
motif.name = c("JUNB", "NFE2", "ELF5",
"SPIB", "PHOX2B","PHOX2A" ),
genome = BSgenome.Hsapiens.UCSC.hg38
)
# plot the footprint data for each group of cells
p2 <- PlotFootprint(nb,
group.by = 'activ.ident',
features = c("GATA2")) &
theme_nb() &
scale_color_manual(values = c('navy', 'red', 'royalblue', 'green'))
p2 + patchwork::plot_layout(ncol = 1)
[email protected] %>% View()