5. DEG

suppressPackageStartupMessages({
library(reticulate)
library(Seurat)
library(dplyr)
library(ggpubr)
library(sceasy)
library(future)
})

# utilities

o<- function(w,h) options(repr.plot.width=w, repr.plot.height=h)

manycolors=c('#e6194b', '#3cb44b', '#ffe119', '#4363d8', '#f58231',
             '#911eb4', '#46f0f0', '#f032e6', '#bcf60c', '#fabebe',
             '#008080', '#e6beff', '#9a6324', '#fffac8', '#800000',
             '#aaffc3', '#808000', '#ffd8b1', '#000075', '#808080',
             '#4f34ff', '#f340F0')


covid.color.table= c(
    'B'="#FFF3B0", 'Plasma'='#E09F3E',
    'T'='#2F6D9D',
    'T CD4'='#68BDDF',
    'T CD8'='#FF046E',
    'CD8 cytotoxic T'='#9D2A2B',
    'T cycling'='#ADA7FF',
    'Treg'='#493A9D',
    'NKT'='#3300FF',
    'NK'='#D543FF',
    'gdT'='#6A24FF',
    'Neu'='#312697',
    'macrophage'='#429783',
    'Mast'='#FF6B3E',
    'cDC1'='#FF8F39',
    'cDC2'='#E7FF3F',
    'moDC'='#FFBCE1',
    'pDC'='#FF72DB',
    'DC'='#FF0022',
    'Mye'='#19C3BE'
)

heca.color.table=c(
    'B cell'='#FFF3B0',
    'CD8 T cell'='#FF046E',
    'Dendritic cell'='#FF0022',
    'Macrophage'='#429783',
    'Mast cell'='#FF6B3E',
    'Megakaryocyte'='gray',
    'Monocyte'='#429753',
    'Myeloid cell'='#19C3BE',
    'NK cell'='#D543FF',
    'Neutrophilic granunocyte'='#312697',
    'Plasma B cell'='#E09F3E',
    'T cell'='#2F6D9D'
)

load data

load COVID data

load("./nCoV.integrated.annotated.rda")
o(9,8)
DimPlot(immune.combined, group.by='persample_ann', label=T, repel=T, cols=covid.color.table) + ggtitle(
    "COVID19 lung immune cells")&
theme(axis.title = element_blank(),
      axis.text = element_blank(),
      axis.ticks=element_blank())

cairo_pdf(filename = 'covid19.umap.pdf', width = 9,height = 8)
DimPlot(immune.combined, group.by='persample_ann', label=T, repel=T, cols=covid.color.table) + ggtitle(
    "COVID19 lung immune cells")&
theme(axis.title = element_blank(),
      axis.text = element_blank(),
      axis.ticks=element_blank())
dev.off()
png: 2output_4_1.png
mac.covid  = subset(immune.combined, persample_ann=='macrophage')
cd8t.covid = subset(immune.combined, persample_ann=='T CD8'| persample_ann=='CD8 cytotoxic T')
nk.covid   = subset(immune.combined, persample_ann=='NK')
dc.covid   = subset(immune.combined, persample_ann=='DC'|persample_ann=='pDC'|
                               persample_ann=='moDC'|persample_ann=='cDC1'|
                               persample_ann=='cDC2')

load hECA data

load("./heca.integrated.annotated.rda")
o(10,10)
DimPlot(heca.integrated, group.by='ann',label=T,cols = heca.color.table)
output_8_0.png
mac.heca  = subset(heca.integrated, ann=='Macrophage')
cd8t.heca = subset(heca.integrated, ann=='CD8 T cell')
nk.heca   = subset(heca.integrated, ann=='NK cell')
dc.heca   = subset(heca.integrated, ann=='Dendritic cell')
mac.heca[['group']]  <- mac.heca@meta.data$study_id
cd8t.heca[['group']] <- cd8t.heca@meta.data$study_id
nk.heca[['group']]   <- nk.heca@meta.data$study_id
dc.heca[['group']]   <- dc.heca@meta.data$study_id

combind COVID data and raw hECA data

mac  = merge(mac.covid, mac.heca)
cd8t = merge(cd8t.covid, cd8t.heca)
nk   = merge(nk.covid, nk.heca)
dc   = merge(dc.covid, dc.heca)

cobind COVID data with integrated hECA data

seu.covid = mac.covid#
seu.heca  = mac.heca #

mat.covid = seu.covid@assays$RNA@data
mat.heca  = seu.heca@assays$integrated@data

common.gene= intersect(rownames(mat.covid),rownames(mat.heca))

mat = cbind(mat.covid[common.gene, ],mat.heca[common.gene, ])
seu.int = CreateSeuratObject(mat)
seu.int@meta.data$group <- c(seu.covid@meta.data$group,  seu.heca@meta.data$group)

mac.int <- seu.int #
seu.covid = nk.covid#
seu.heca  = nk.heca #

mat.covid = seu.covid@assays$RNA@data
mat.heca  = seu.heca@assays$integrated@data

common.gene= intersect(rownames(mat.covid),rownames(mat.heca))

mat = cbind(mat.covid[common.gene, ],mat.heca[common.gene, ])
seu.int = CreateSeuratObject(mat)
seu.int@meta.data$group <- c(seu.covid@meta.data$group,  seu.heca@meta.data$group)

nk.int <- seu.int #
seu.covid = cd8t.covid#
seu.heca  = cd8t.heca #

mat.covid = seu.covid@assays$RNA@data
mat.heca  = seu.heca@assays$integrated@data

common.gene= intersect(rownames(mat.covid),rownames(mat.heca))

mat = cbind(mat.covid[common.gene, ],mat.heca[common.gene, ])
seu.int = CreateSeuratObject(mat)
seu.int@meta.data$group <- c(seu.covid@meta.data$group,  seu.heca@meta.data$group)

cd8t.int <- seu.int #
seu.covid = dc.covid#
seu.heca  = dc.heca #

mat.covid = seu.covid@assays$RNA@data
mat.heca  = seu.heca@assays$integrated@data

common.gene= intersect(rownames(mat.covid),rownames(mat.heca))

mat = cbind(mat.covid[common.gene, ],mat.heca[common.gene, ])
seu.int = CreateSeuratObject(mat)
seu.int@meta.data$group <- c(seu.covid@meta.data$group,  seu.heca@meta.data$group)

dc.int <- seu.int #

compute original DEG

Idents(mac.covid)<-'group'
mac.deg = FindMarkers(mac.covid, assay = 'RNA', ident.1='S', ident.2='HC')
mac.deg= mac.deg %>% filter(p_val_adj<0.05) %>%arrange(desc(avg_log2FC))
Idents(cd8t.covid)<-'group'
cd8t.deg = FindMarkers(cd8t.covid, assay = 'RNA', ident.1='S', ident.2='HC')
cd8t.deg= cd8t.deg %>% filter(p_val_adj<0.05) %>%arrange(desc(avg_log2FC))
Idents(nk.covid)<-'group'
nk.deg = FindMarkers(nk.covid, assay = 'RNA', ident.1='S', ident.2='HC')
nk.deg = nk.deg %>% filter(p_val_adj<0.05) %>%arrange(desc(avg_log2FC))
Idents(dc.covid)<-'group'
dc.deg = FindMarkers(dc.covid, assay = 'RNA', ident.1='S', ident.2='HC')
dc.deg = dc.deg %>% filter(p_val_adj<0.05) %>%arrange(desc(avg_log2FC))
cd8t.deg %>% filter(abs(avg_log2FC)>1)
A data.frame: 185 × 5
p_valavg_log2FCpct.1pct.2p_val_adj
<dbl><dbl><dbl><dbl><dbl>
IFITM11.155489e-1354.1546560.9910.2692.763469e-131
IFI27 6.417450e-624.0388610.6540.051 1.534797e-57
MTRNR2L12 2.895080e-913.9151040.7850.000 6.923873e-87
GNLY 9.419786e-393.6594410.5400.079 2.252836e-34
IFITM3 3.911152e-913.5031930.8140.040 9.353911e-87
MT-ND4L5.590826e-1193.4672460.9570.2691.337102e-114
MT2A 6.650069e-913.2644480.8880.209 1.590431e-86
TAOK1 1.720060e-993.2448490.8970.107 4.113695e-95
MT-ATP8 2.994307e-913.0704560.8190.055 7.161186e-87
CCL2 2.796737e-272.9864700.3420.000 6.688677e-23
PTPRCAP 5.388279e-922.9805490.7880.000 1.288661e-87
IFI6 2.727151e-852.8060090.8670.174 6.522254e-81
ISG15 2.791363e-812.7210330.9280.356 6.675823e-77
MX1 2.976782e-812.6258750.8300.123 7.119273e-77
IFIT1 4.553697e-452.3784800.5190.016 1.089062e-40
ISG20 1.873834e-792.3412920.9240.364 4.481462e-75
RSAD2 1.907437e-482.3158710.5540.024 4.561826e-44
IFIT3 1.077367e-452.3097070.5690.055 2.576630e-41
PLSCR1 1.830287e-652.2166130.7370.095 4.377313e-61
CXCL10 1.065728e-142.1508800.2060.004 2.548794e-10
TNFSF10 4.805049e-482.1445650.6220.079 1.149176e-43
IFIT2 1.025112e-332.1350960.4220.012 2.451657e-29
IFI44L 1.238383e-572.0874590.6840.079 2.961716e-53
STMN1 2.428883e-212.0527950.3920.091 5.808917e-17
NME2 1.345896e-592.0445830.6240.016 3.218844e-55
CTSL 1.126542e-112.0281240.2440.055 2.694237e-07
IRF7 2.667538e-581.9901200.7220.115 6.379685e-54
MT-ND6 3.151489e-481.9431220.6370.103 7.537102e-44
OAS1 1.696656e-471.8549200.5640.036 4.057722e-43
LY6E 1.538384e-731.8316630.9480.534 3.679198e-69
CD63 3.995041e-29-1.2623400.4970.692 9.554539e-25
POLR2J3.1 6.082877e-23-1.2698810.1430.360 1.454781e-18
APOE 3.408216e-31-1.2717790.0660.300 8.151089e-27
MDM4 4.924179e-19-1.2743180.1670.364 1.177667e-14
RPL21 4.190441e-86-1.2776220.9360.988 1.002186e-81
MT-CO3 3.634674e-76-1.2830820.9631.000 8.692686e-72
CD81 2.407057e-19-1.3295540.2720.466 5.756718e-15
N4BP2L2 8.915186e-37-1.4320880.4880.704 2.132156e-32
JUND 5.105898e-24-1.4398200.3680.573 1.221127e-19
NDUFB8 5.150298e-35-1.4411900.1230.399 1.231745e-30
FABP4 7.096662e-82-1.4879360.0090.304 1.697238e-77
CD3G 1.243945e-47-1.5278040.6190.826 2.975019e-43
TMBIM4 6.051902e-34-1.5374280.1790.462 1.447373e-29
ITGA1 3.478641e-36-1.5818960.3040.597 8.319517e-32
RPL13A 1.559235e-92-1.6733790.9040.996 3.729067e-88
TRG-AS1 5.162926e-30-1.6927960.1660.427 1.234765e-25
C1orf56 1.662701e-94-1.7289150.0140.368 3.976515e-90
MT-ND4 4.414551e-99-1.7910350.8780.988 1.055784e-94
RPL27A 2.021483e-80-1.8022470.7470.953 4.834579e-76
SCGB3A1 5.427090e-18-1.8249910.0410.178 1.297943e-13
KLRC1 3.358977e-37-1.8876190.2900.601 8.033329e-33
TRAC 2.194799e-83-1.9921620.5980.905 5.249081e-79
MT-ATP6 2.482394e-88-2.0141610.8930.976 5.936894e-84
APOC16.167297e-102-2.0377720.0980.660 1.474971e-97
MALAT14.615095e-127-2.1132690.9991.0001.103746e-122
KLRC2 9.027764e-70-2.2095590.0390.375 2.159080e-65
TRGC2 7.831464e-72-2.5306900.1040.522 1.872973e-67
KLRB1 3.137356e-63-2.6198740.0660.427 7.503301e-59
RPS101.237779e-127-2.8186200.3890.9292.960271e-123
SCGB1A1 1.666082e-27-3.7077770.0360.209 3.984602e-23

compute raw hECA-control DEG

unique(mac$group)
  1. 'HC'
  2. 'M'
  3. 'S'
  4. '10.1038/s41591-019-0468-5'
  5. '10.1186/s13059-019-1906-x'
  6. '10.1038/s41586-020-2157-4'
batch1 = '10.1038/s41586-020-2157-4'
batch2 = '10.1186/s13059-019-1906-x'
seu=mac #
Idents(seu)<-'group'
DefaultAssay(seu)<-'RNA'

plan("sequential")
options(future.globals.maxSize = 1000 * 1024^2*4)
plan("multiprocess", workers = 14)

deg = FindMarkers(seu, assay = 'RNA', ident.1='S', ident.2=batch1)
deg = deg %>% filter(p_val_adj<0.05) %>%arrange(desc(avg_log2FC))
mac.deg.batch1 <- deg #

deg = FindMarkers(seu, assay = 'RNA', ident.1='S', ident.2=batch2)
deg = deg %>% filter(p_val_adj<0.05) %>%arrange(desc(avg_log2FC))
mac.deg.batch2 <- deg #

deg = FindMarkers(seu, assay = 'RNA', ident.1='S', ident.2=c(batch1,batch2))
deg = deg %>% filter(p_val_adj<0.05) %>%arrange(desc(avg_log2FC))
mac.deg.batch12 <- deg #


plan("sequential")
seu=cd8t #
Idents(seu)<-'group'
DefaultAssay(seu)<-'RNA'

plan("sequential")
options(future.globals.maxSize = 1000 * 1024^2*4)
plan("multiprocess", workers = 14)

deg = FindMarkers(seu, assay = 'RNA', ident.1='S', ident.2=batch1)
deg = deg %>% filter(p_val_adj<0.05) %>%arrange(desc(avg_log2FC))
cd8t.deg.batch1 <- deg #

deg = FindMarkers(seu, assay = 'RNA', ident.1='S', ident.2=batch2)
deg = deg %>% filter(p_val_adj<0.05) %>%arrange(desc(avg_log2FC))
cd8t.deg.batch2 <- deg #

deg = FindMarkers(seu, assay = 'RNA', ident.1='S', ident.2=c(batch1,batch2))
deg = deg %>% filter(p_val_adj<0.05) %>%arrange(desc(avg_log2FC))
cd8t.deg.batch12 <- deg #

plan("sequential")
seu=nk #
Idents(seu)<-'group'
DefaultAssay(seu)<-'RNA'

plan("sequential")
options(future.globals.maxSize = 1000 * 1024^2*4)
plan("multiprocess", workers = 14)

deg = FindMarkers(seu, assay = 'RNA', ident.1='S', ident.2=batch1)
deg = deg %>% filter(p_val_adj<0.05) %>%arrange(desc(avg_log2FC))
nk.deg.batch1 <- deg #

deg = FindMarkers(seu, assay = 'RNA', ident.1='S', ident.2=batch2)
deg = deg %>% filter(p_val_adj<0.05) %>%arrange(desc(avg_log2FC))
nk.deg.batch2 <- deg #

deg = FindMarkers(seu, assay = 'RNA', ident.1='S', ident.2=c(batch1,batch2))
deg = deg %>% filter(p_val_adj<0.05) %>%arrange(desc(avg_log2FC))
nk.deg.batch12 <- deg #

plan("sequential")
seu=dc #
Idents(seu)<-'group'
DefaultAssay(seu)<-'RNA'

plan("sequential")
options(future.globals.maxSize = 1000 * 1024^2*4)
plan("multiprocess", workers = 14)

deg = FindMarkers(seu, assay = 'RNA', ident.1='S', ident.2=batch1)
deg = deg %>% filter(p_val_adj<0.05) %>%arrange(desc(avg_log2FC))
dc.deg.batch1 <- deg #

deg = FindMarkers(seu, assay = 'RNA', ident.1='S', ident.2=batch2)
deg = deg %>% filter(p_val_adj<0.05) %>%arrange(desc(avg_log2FC))
dc.deg.batch2 <- deg #

deg = FindMarkers(seu, assay = 'RNA', ident.1='S', ident.2=c(batch1,batch2))
deg = deg %>% filter(p_val_adj<0.05) %>%arrange(desc(avg_log2FC))
dc.deg.batch12 <- deg #

plan("sequential")
iou <- function(deg1, deg2, abslogfc.cut=0.25){
    g1=deg1 %>%filter(avg_log2FC>0) %>% filter(abs(avg_log2FC)>abslogfc.cut) %>% rownames(.)
    g2=deg2 %>%filter(avg_log2FC>0) %>% filter(abs(avg_log2FC)>abslogfc.cut) %>% rownames(.)
    I=length(intersect(g1,g2))
    U=length(union(g1,g2))
    print(I)
    print(U)
    return(I/U)
}

compute integrated hECA-control DEG

seu = mac.int #
Idents(seu)<-'group'
DefaultAssay(seu)<-'RNA'
deg = FindMarkers(seu, assay = 'RNA', ident.1='S', ident.2=batch1)
deg = deg %>% filter(p_val_adj<0.05) %>%arrange(desc(avg_log2FC))
mac.deg.int <- deg #


seu = dc.int #
Idents(seu)<-'group'
DefaultAssay(seu)<-'RNA'
deg = FindMarkers(seu, assay = 'RNA', ident.1='S', ident.2=batch1)
deg = deg %>% filter(p_val_adj<0.05) %>%arrange(desc(avg_log2FC))
dc.deg.int <- deg #


seu = nk.int #
Idents(seu)<-'group'
DefaultAssay(seu)<-'RNA'
deg = FindMarkers(seu, assay = 'RNA', ident.1='S', ident.2=batch1)
deg = deg %>% filter(p_val_adj<0.05) %>%arrange(desc(avg_log2FC))
nk.deg.int <- deg #


seu = cd8t.int #
Idents(seu)<-'group'
DefaultAssay(seu)<-'RNA'
deg = FindMarkers(seu, assay = 'RNA', ident.1='S', ident.2=batch1)
deg = deg %>% filter(p_val_adj<0.05) %>%arrange(desc(avg_log2FC))
cd8t.deg.int <- deg #
cut=1
heca.ctrl.DEG <-list(
     'Mac.1'=mac.deg.batch1,
     'Mac.2'=mac.deg.batch2,
     'Mac.1.2'=mac.deg.batch12,
     'Mac.int'=mac.deg.int,
     'DC.1'  =dc.deg.batch1,
     'DC.2'  =dc.deg.batch2,
     'DC.1.2'=dc.deg.batch12,
     'DC.int'=dc.deg.int,
     'CD8T.1'  =cd8t.deg.batch1,
     'CD8T.2'  =cd8t.deg.batch2,
     'CD8T.1.2'=cd8t.deg.batch12,
     'CD8T.int'=cd8t.deg.int,
     'NK.1'    =nk.deg.batch1,
     'NK.2'    =nk.deg.batch2,
     'NK.1.2'  =nk.deg.batch12,
     'NK.int'  =nk.deg.int
     )

original.DEG<-list('Mac.covid' =mac.deg,
     'DC.covid'  =dc.deg,
     'CD8T.covid'=cd8t.deg,
     'NK.covid'  =nk.deg
     )
cut=1

L1=names(heca.ctrl.DEG)
L2=names(original.DEG)
scores=matrix(0, length(L1), length(L2))
rownames(scores)<-L1
colnames(scores)<-L2

for (design1 in L1){
    for (design2 in L2){
        heca = heca.ctrl.DEG[[design1]]
        gt   = original.DEG[[design2]]
        print(paste("comparing", design1, design2))
        scores[design1, design2]= iou(heca, gt, abslogfc.cut=cut)
    }
}
[1] "comparing Mac.1 Mac.covid"
[1] 160
[1] 329
[1] "comparing Mac.1 DC.covid"
[1] 110
[1] 340
[1] "comparing Mac.1 CD8T.covid"
[1] 71
[1] 325
[1] "comparing Mac.1 NK.covid"
[1] 57
[1] 299
[1] "comparing Mac.2 Mac.covid"
[1] 176
[1] 322
[1] "comparing Mac.2 DC.covid"
[1] 122
[1] 337
[1] "comparing Mac.2 CD8T.covid"
[1] 76
[1] 329
[1] "comparing Mac.2 NK.covid"
[1] 64
[1] 301
[1] "comparing Mac.1.2 Mac.covid"
[1] 166
[1] 306
[1] "comparing Mac.1.2 DC.covid"
[1] 115
[1] 318
[1] "comparing Mac.1.2 CD8T.covid"
[1] 73
[1] 306
[1] "comparing Mac.1.2 NK.covid"
[1] 61
[1] 278
[1] "comparing Mac.int Mac.covid"
[1] 49
[1] 227
[1] "comparing Mac.int DC.covid"
[1] 42
[1] 195
[1] "comparing Mac.int CD8T.covid"
[1] 19
[1] 164
[1] "comparing Mac.int NK.covid"
[1] 13
[1] 130
[1] "comparing DC.1 Mac.covid"
[1] 94
[1] 352
[1] "comparing DC.1 DC.covid"
[1] 91
[1] 316
[1] "comparing DC.1 CD8T.covid"
[1] 68
[1] 285
[1] "comparing DC.1 NK.covid"
[1] 52
[1] 261
[1] "comparing DC.2 Mac.covid"
[1] 117
[1] 346
[1] "comparing DC.2 DC.covid"
[1] 123
[1] 301
[1] "comparing DC.2 CD8T.covid"
[1] 76
[1] 294
[1] "comparing DC.2 NK.covid"
[1] 57
[1] 273
[1] "comparing DC.1.2 Mac.covid"
[1] 103
[1] 324
[1] "comparing DC.1.2 DC.covid"
[1] 104
[1] 284
[1] "comparing DC.1.2 CD8T.covid"
[1] 72
[1] 262
[1] "comparing DC.1.2 NK.covid"
[1] 53
[1] 241
[1] "comparing DC.int Mac.covid"
[1] 21
[1] 233
[1] "comparing DC.int DC.covid"
[1] 27
[1] 188
[1] "comparing DC.int CD8T.covid"
[1] 15
[1] 146
[1] "comparing DC.int NK.covid"
[1] 7
[1] 114
[1] "comparing CD8T.1 Mac.covid"
[1] 74
[1] 387
[1] "comparing CD8T.1 DC.covid"
[1] 61
[1] 361
[1] "comparing CD8T.1 CD8T.covid"
[1] 82
[1] 286
[1] "comparing CD8T.1 NK.covid"
[1] 58
[1] 270
[1] "comparing CD8T.2 Mac.covid"
[1] 85
[1] 379
[1] "comparing CD8T.2 DC.covid"
[1] 67
[1] 358
[1] "comparing CD8T.2 CD8T.covid"
[1] 104
[1] 267
[1] "comparing CD8T.2 NK.covid"
[1] 65
[1] 266
[1] "comparing CD8T.1.2 Mac.covid"
[1] 85
[1] 368
[1] "comparing CD8T.1.2 DC.covid"
[1] 65
[1] 349
[1] "comparing CD8T.1.2 CD8T.covid"
[1] 100
[1] 260
[1] "comparing CD8T.1.2 NK.covid"
[1] 67
[1] 253
[1] "comparing CD8T.int Mac.covid"
[1] 11
[1] 231
[1] "comparing CD8T.int DC.covid"
[1] 11
[1] 192
[1] "comparing CD8T.int CD8T.covid"
[1] 14
[1] 135
[1] "comparing CD8T.int NK.covid"
[1] 6
[1] 103
[1] "comparing NK.1 Mac.covid"
[1] 108
[1] 551
[1] "comparing NK.1 DC.covid"
[1] 83
[1] 537
[1] "comparing NK.1 CD8T.covid"
[1] 91
[1] 475
[1] "comparing NK.1 NK.covid"
[1] 80
[1] 446
[1] "comparing NK.2 Mac.covid"
[1] 83
[1] 342
[1] "comparing NK.2 DC.covid"
[1] 67
[1] 319
[1] "comparing NK.2 CD8T.covid"
[1] 80
[1] 252
[1] "comparing NK.2 NK.covid"
[1] 70
[1] 222
[1] "comparing NK.1.2 Mac.covid"
[1] 83
[1] 342
[1] "comparing NK.1.2 DC.covid"
[1] 66
[1] 320
[1] "comparing NK.1.2 CD8T.covid"
[1] 79
[1] 253
[1] "comparing NK.1.2 NK.covid"
[1] 70
[1] 222
[1] "comparing NK.int Mac.covid"
[1] 22
[1] 266
[1] "comparing NK.int DC.covid"
[1] 22
[1] 227
[1] "comparing NK.int CD8T.covid"
[1] 19
[1] 176
[1] "comparing NK.int NK.covid"
[1] 18
[1] 137
library(pheatmap)
o(6,6)
pheatmap(scores, display_numbers=round(scores,digits = 2),
         cluster_rows = F, cluster_cols = F,main='IOU# of DEG (FC>2)',
         color=colorRampPalette(c("white", "pink", "red"))(50)
        )
output_41_0.png

enrichment analysis compare

# use the following genes for enrichment on enrichR
mac.deg.batch2 %>% filter(avg_log2FC>1) %>% rownames
  1. 'SAT1'
  2. 'CXCL10'
  3. 'CCL8'
  4. 'H3F3B'
  5. 'SPP1'
  6. 'IFITM1'
  7. 'RPS12'
  8. 'PSAP'
  9. 'RSAD2'
  10. 'CCL2'
  11. 'RPL10'
  12. 'CCL3L1'
  13. 'IFITM3'
  14. 'CCL7'
  15. 'FABP5'
  16. 'TAOK1'
  17. 'H3F3A'
  18. 'ISG15'
  19. 'RPL13'
  20. 'CCL4L2'
  21. 'IFIT2'
  22. 'APOBEC3A'
  23. 'IFIT3'
  24. 'IFIT1'
  25. 'TNFSF10'
  26. 'IFI27'
  27. 'CTSL'
  28. 'DUSP1'
  29. 'ISG20'
  30. 'MX1'
  31. 'RAC1'
  32. 'BRI3'
  33. 'POMP'
  34. 'GBP1'
  35. 'ATP6V0C'
  36. 'RPL24'
  37. 'WARS'
  38. 'IFI30'
  39. 'GABARAP'
  40. 'CSTB'
  41. 'VAMP5'
  42. 'S100A8'
  43. 'S100A9'
  44. 'MIF'
  45. 'MT-ATP8'
  46. 'CXCL11'
  47. 'LGALS3'
  48. 'IL1RN'
  49. 'IFITM2'
  50. 'MX2'
  51. 'IFI44L'
  52. 'MGAT1'
  53. 'TNFSF13B'
  54. 'SDS'
  55. 'LCP1'
  56. 'GBP5'
  57. 'IDO1'
  58. 'HERC5'
  59. 'EPSTI1'
  60. 'KLF6'
  61. 'STAT1'
  62. 'RNF213'
  63. 'TAP1'
  64. 'MS4A7'
  65. 'DBI'
  66. 'DEFB1'
  67. 'IRF7'
  68. 'GBP4'
  69. 'NAPA'
  70. 'H2AFY'
  71. 'MARCKS'
  72. 'C15orf48'
  73. 'BTF3'
  74. 'XAF1'
  75. 'MPP1'
  76. 'PLEK'
  77. 'SGK1'
  78. 'IFIH1'
  79. 'CCR1'
  80. 'DUSP6'
  81. 'S100A12'
  82. 'TYMP'
  83. 'PLSCR1'
  84. 'AQP9'
  85. 'NCF1'
  86. 'OAS1'
  87. 'NINJ1'
  88. 'BCL2A1'
  89. 'NME2'
  90. 'RHEB'
  91. 'RPL36A'
  92. 'IFI6'
  93. 'CCL4'
  94. 'FAM49B'
  95. 'CMPK2'
  96. 'ELF1'
  97. 'NAMPT'
  98. 'HAMP'
  99. 'GCH1'
  100. 'DDX60L'
  101. 'LYN'
  102. 'SMIM25'
  103. 'OAS2'
  104. 'OASL'
  105. 'MT2A'
  106. 'FNIP2'
  107. 'DDX58'
  108. 'ATF5'
  109. 'CALHM6'
  110. 'SAMD9L'
  111. 'CCNL1'
  112. 'OAS3'
  113. 'RNH1'
  114. 'RARRES3'
  115. 'FYB1'
  116. 'HES4'
  117. 'SP110'
  118. 'PSMB9'
  119. 'MAFB'
  120. 'ZFP36L1'
  121. 'CD300E'
  122. 'FAM96B'
  123. 'LY6E'
  124. 'FAM96A'
  125. 'SAMD9'
  126. 'LAP3'
  127. 'LHFPL2'
  128. 'APLP2'
  129. 'SLAMF7'
  130. 'B4GALT5'
  131. 'PARP14'
  132. 'IFI35'
  133. 'LILRB4'
  134. 'IL1R2'
  135. 'APOL6'
  136. 'EMP1'
  137. 'H2AFJ'
  138. 'DYNLT1'
  139. 'PTPRE'
  140. 'EIF2AK2'
  141. 'CDKN1A'
  142. 'SOD2'
  143. 'IFI44'
  144. 'FCN1'
  145. 'IL4I1'
  146. 'STAT2'
  147. 'CCL3'
  148. 'PIM1'
  149. 'ANKRD22'
  150. 'TUBB'
  151. 'RGL1'
  152. 'LIPA'
  153. 'HIF1A'
  154. 'AC015912.3'
  155. 'PGAM1'
  156. 'GBP2'
  157. 'SRGN'
  158. 'IRF1'
  159. 'SMCHD1'
  160. 'PSMA6'
  161. 'SIGLEC1'
  162. 'USP18'
  163. 'CYP1B1'
  164. 'MINOS1'
  165. 'LCP2'
  166. 'CD48'
  167. 'LILRB1'
  168. 'SCARB2'
  169. 'ADAR'
  170. 'HPSE'
  171. 'H2AFZ'
  172. 'BACH1'
  173. 'SLC25A37'
  174. 'HLA-E'
  175. 'ACSL1'
  176. 'HMOX1'
  177. 'FPR1'
  178. 'NEXN'
  179. 'UBE2L6'
  180. 'MT-ND4L'
  181. 'B3GNT2'
  182. 'SEPT7'
  183. 'LILRA5'
  184. 'ZNFX1'
  185. 'C19orf66'
  186. 'LILRB2'
  187. 'CXCL9'
  188. 'MT-ND6'
  189. 'C8orf59'
  190. 'ATOX1'
  191. 'RNF19B'
  192. 'NBN'
  193. 'CRIP1'
  194. 'PIM3'
  195. 'TRIM22'
  196. 'EIF3A'
  197. 'ZEB2'
  198. 'TFEC'
  199. 'RBMS1'
  200. 'HLA-A'
  201. 'SEM1'
  202. 'PARP9'
  203. 'DEK'
  204. 'SPHK1'
  205. 'DMXL2'
  206. 'CBWD2'
  207. 'DTX3L'
  208. 'BAZ1A'
  209. 'TIMP1'
  210. 'LRP1'
  211. 'CFLAR'
  212. 'GNG5'
  213. 'ABCA1'
  214. 'PML'
  215. 'DRAM1'
  216. 'CTSB'
  217. 'PSMA7'
  218. 'KIAA1551'
  219. 'XRN1'
  220. 'OPTN'
  221. 'CSF2RB'
  222. 'TPM4'
  223. 'CCRL2'
  224. 'SLC39A8'
  225. 'CD38'
  226. 'LGMN'
  227. 'P2RX7'
  228. 'SRGAP2'
  229. 'MYOF'
  230. 'PLAC8'
  231. 'IL10RA'
  232. 'MARCH1'
  233. 'GRB2'
  234. 'FNDC3B'
  235. 'CD47'
  236. 'PLA2G7'
  237. 'PLEKHO1'
  238. 'SLA'
  239. 'PSME2'
  240. 'TLR2'
  241. 'SNX10'
  242. 'TAGAP'
  243. 'PRDX6'
  244. 'CD274'
  245. 'VAT1'
  246. 'RBM47'
  247. 'CD163'
  248. 'ARL8B'
  249. 'PHF11'
  250. 'FCGR1A'
  251. 'IFI16'
  252. 'MRPL27'
  253. 'C6orf62'
  254. 'SNRPD1'
  255. 'TMEM123'
  256. 'SAT2'
  257. 'ZFP36L2'
  258. 'TKT'
  259. 'HIST2H2AA4'
  260. 'NMI'
  261. 'SMS'
  262. 'C19orf70'
  263. 'ATP6V1G1'
  264. 'DSE'
  265. 'SMAP2'
  266. 'AAED1'
  267. 'TCEA1'
  268. 'TANK'
  269. 'SQSTM1'
  270. 'GRINA'
  271. 'FLOT1'
  272. 'PLAUR'
  273. 'HNRNPU'
  274. 'SLFN5'

SAT1 CXCL10 CCL8 H3F3B SPP1 IFITM1 RPS12 PSAP RSAD2 CCL2 RPL10 CCL3L1 IFITM3 CCL7 FABP5 TAOK1 H3F3A ISG15 RPL13 CCL4L2 IFIT2 APOBEC3A IFIT3 IFIT1 TNFSF10 IFI27 CTSL DUSP1 ISG20 MX1 RAC1 BRI3 POMP GBP1 ATP6V0C RPL24 WARS IFI30 GABARAP CSTB VAMP5 S100A8 S100A9 MIF MT-ATP8 CXCL11 LGALS3 IL1RN IFITM2 MX2 IFI44L MGAT1 TNFSF13B SDS LCP1 GBP5 IDO1 HERC5 EPSTI1 KLF6 STAT1 RNF213 TAP1 MS4A7 DBI DEFB1 IRF7 GBP4 NAPA H2AFY MARCKS C15orf48 BTF3 XAF1 MPP1 PLEK SGK1 IFIH1 CCR1 DUSP6 S100A12 TYMP PLSCR1 AQP9 NCF1 OAS1 NINJ1 BCL2A1 NME2 RHEB RPL36A IFI6 CCL4 FAM49B CMPK2 ELF1 NAMPT HAMP GCH1 DDX60L LYN SMIM25 OAS2 OASL MT2A FNIP2 DDX58 ATF5 CALHM6 SAMD9L CCNL1 OAS3 RNH1 RARRES3 FYB1 HES4 SP110 PSMB9 MAFB ZFP36L1 CD300E FAM96B LY6E FAM96A SAMD9 LAP3 LHFPL2 APLP2 SLAMF7 B4GALT5 PARP14 IFI35 LILRB4 IL1R2 APOL6 EMP1 H2AFJ DYNLT1 PTPRE EIF2AK2 CDKN1A SOD2 IFI44 FCN1 IL4I1 STAT2 CCL3 PIM1 ANKRD22 TUBB RGL1 LIPA HIF1A AC015912.3 PGAM1 GBP2 SRGN IRF1 SMCHD1 PSMA6 SIGLEC1 USP18 CYP1B1 MINOS1 LCP2 CD48 LILRB1 SCARB2 ADAR HPSE H2AFZ BACH1 SLC25A37 HLA-E ACSL1 HMOX1 FPR1 NEXN UBE2L6 MT-ND4L B3GNT2 SEPT7 LILRA5 ZNFX1 C19orf66 LILRB2 CXCL9 MT-ND6 C8orf59 ATOX1 RNF19B NBN CRIP1 PIM3 TRIM22 EIF3A ZEB2 TFEC RBMS1 HLA-A SEM1 PARP9 DEK SPHK1 DMXL2 CBWD2 DTX3L BAZ1A TIMP1 LRP1 CFLAR GNG5 ABCA1 PML DRAM1 CTSB PSMA7 KIAA1551 XRN1 OPTN CSF2RB TPM4 CCRL2 SLC39A8 CD38 LGMN P2RX7 SRGAP2 MYOF PLAC8 IL10RA MARCH1 GRB2 FNDC3B CD47 PLA2G7 PLEKHO1 SLA PSME2 TLR2 SNX10 TAGAP PRDX6 CD274 VAT1 RBM47 CD163 ARL8B PHF11 FCGR1A IFI16 MRPL27 C6orf62 SNRPD1 TMEM123 SAT2 ZFP36L2 TKT HIST2H2AA4 NMI SMS C19orf70 ATP6V1G1 DSE SMAP2 AAED1 TCEA1 TANK SQSTM1 GRINA FLOT1 PLAUR HNRNPU SLFN5

mac.deg %>% filter(avg_log2FC>1) %>% rownames
  1. 'CCL2'
  2. 'CCL8'
  3. 'CXCL10'
  4. 'IFITM3'
  5. 'IFITM1'
  6. 'CCL4L2'
  7. 'RSAD2'
  8. 'SPP1'
  9. 'CCL7'
  10. 'CCL4'
  11. 'CCL3L1'
  12. 'CTSL'
  13. 'ISG15'
  14. 'CCL3'
  15. 'IFI30'
  16. 'APOBEC3A'
  17. 'IL1RN'
  18. 'TNFSF10'
  19. 'IFIT1'
  20. 'ISG20'
  21. 'IFIT2'
  22. 'TAOK1'
  23. 'IFITM2'
  24. 'IFIT3'
  25. 'MX1'
  26. 'TIMP1'
  27. 'ATP6V0C'
  28. 'IFI27'
  29. 'HLA-DRB5'
  30. 'MT-ATP8'
  31. 'GBP1'
  32. 'VAMP5'
  33. 'MAFB'
  34. 'DEFB1'
  35. 'SOD2'
  36. 'NFKBIA'
  37. 'LGMN'
  38. 'CXCL8'
  39. 'CXCL11'
  40. 'MT2A'
  41. 'KLF6'
  42. 'SAT1'
  43. 'MT-ND4L'
  44. 'MARCKS'
  45. 'BCL2A1'
  46. 'MTRNR2L12'
  47. 'IDO1'
  48. 'CALHM6'
  49. 'C15orf48'
  50. 'SGK1'
  51. 'MX2'
  52. 'S100A8'
  53. 'NINJ1'
  54. 'GBP5'
  55. 'SDS'
  56. 'EMP1'
  57. 'IRF7'
  58. 'NME2'
  59. 'S100A12'
  60. 'CCR1'
  61. 'HAMP'
  62. 'EPSTI1'
  63. 'IFI44L'
  64. 'TNFSF13B'
  65. 'CTSB'
  66. 'OAS1'
  67. 'H3F3B'
  68. 'ALDOA'
  69. 'HERC5'
  70. 'PLEK'
  71. 'CD163'
  72. 'GABARAP'
  73. 'IER3'
  74. 'GBP4'
  75. 'CD300E'
  76. 'IFIH1'
  77. 'TAP1'
  78. 'GCH1'
  79. 'RNASE1'
  80. 'WARS'
  81. 'UBE2L6'
  82. 'ATF5'
  83. 'LAP3'
  84. 'LILRB4'
  85. 'DUSP6'
  86. 'RGL1'
  87. 'TYMP'
  88. 'RNF213'
  89. 'HES4'
  90. 'HMOX1'
  91. 'FNIP2'
  92. 'DDX58'
  93. 'IFI6'
  94. 'IL1R2'
  95. 'CMPK2'
  96. 'PLSCR1'
  97. 'LYN'
  98. 'SLAMF7'
  99. 'IL4I1'
  100. 'HIF1A'
  101. 'PLA2G7'
  102. 'IER2'
  103. 'OASL'
  104. 'LHFPL2'
  105. 'CDKN1A'
  106. 'PSMB9'
  107. 'DYNLT1'
  108. 'PSMA6'
  109. 'XAF1'
  110. 'MIF'
  111. 'CD48'
  112. 'OAS3'
  113. 'ANKRD22'
  114. 'ZFP36'
  115. 'GNG5'
  116. 'PTPRE'
  117. 'NAMPT'
  118. 'TPM4'
  119. 'ACSL1'
  120. 'IFI35'
  121. 'NCF1'
  122. 'STAT1'
  123. 'LILRB2'
  124. 'PHLDA2'
  125. 'FYB1'
  126. 'PIM3'
  127. 'B4GALT5'
  128. 'ATF3'
  129. 'CYP1B1'
  130. 'USP18'
  131. 'MPP1'
  132. 'TNFAIP3'
  133. 'IFI16'
  134. 'NT5C3A'
  135. 'LCP2'
  136. 'GAPDH'
  137. 'HPSE'
  138. 'AC015912.3'
  139. 'GBP2'
  140. 'OAS2'
  141. 'SAMD9'
  142. 'CALM1'
  143. 'NEXN'
  144. 'NAPA'
  145. 'SSB'
  146. 'GADD45B'
  147. 'SPHK1'
  148. 'SOCS1'
  149. 'EMP3'
  150. 'SLC25A37'
  151. 'CCRL2'
  152. 'HLA-E'
  153. 'DDX60L'
  154. 'ZFP36L1'
  155. 'FOSB'
  156. 'RARRES3'
  157. 'PLAUR'
  158. 'SAMD9L'
  159. 'LILRA5'
  160. 'SRGN'
  161. 'TLR2'
  162. 'ATOX1'
  163. 'CEBPD'
  164. 'TXN'
  165. 'CXCL9'
  166. 'HAVCR2'
  167. 'SQSTM1'
  168. 'PSME2'
  169. 'AQP9'
  170. 'FPR1'
  171. 'SLC39A8'
  172. 'OPTN'
  173. 'SMCHD1'
  174. 'IRF1'
  175. 'IFI44'
  176. 'PSMB10'
  177. 'TAGAP'
  178. 'BAZ1A'
  179. 'CLU'
  180. 'RALA'
  181. 'FLOT1'
  182. 'LILRB1'
  183. 'NMI'
  184. 'CBWD2'
  185. 'ATP6V1G1'
  186. 'DRAM1'
  187. 'SIGLEC1'
  188. 'RNF19B'
  189. 'IL10RA'
  190. 'ZNFX1'
  191. 'PPP1R15A'
  192. 'ELOC'
  193. 'CD38'
  194. 'FCER1G'
  195. 'CREM'
  196. 'STAT2'
  197. 'TNFAIP6'
  198. 'S100A10'
  199. 'DEK'
  200. 'SP110'
  201. 'TCN2'
  202. 'PLEKHO1'
  203. 'CYSTM1'
  204. 'CD69'
  205. 'NECTIN2'
  206. 'CREG1'
  207. 'ADM'
  208. 'CFLAR'
  209. 'ICAM1'
  210. 'CXCL2'
  211. 'RIPK2'
  212. 'MXD1'
  213. 'MGAT1'
  214. 'PML'
  215. 'TMSB10'
  216. 'HIST2H2AA4'
  217. 'SAMSN1'
  218. 'PHF11'
  219. 'SERPINB9'
  220. 'CLIC1'
  221. 'MYOF'
  222. 'PARP14'
  223. 'CD83'
  224. 'HMGA1'

CCL2 CCL8 CXCL10 IFITM3 IFITM1 CCL4L2 RSAD2 SPP1 CCL7 CCL4 CCL3L1 CTSL ISG15 CCL3 IFI30 APOBEC3A IL1RN TNFSF10 IFIT1 ISG20 IFIT2 TAOK1 IFITM2 IFIT3 MX1 TIMP1 ATP6V0C IFI27 HLA-DRB5 MT-ATP8 GBP1 VAMP5 MAFB DEFB1 SOD2 NFKBIA LGMN CXCL8 CXCL11 MT2A KLF6 SAT1 MT-ND4L MARCKS BCL2A1 MTRNR2L12 IDO1 CALHM6 C15orf48 SGK1 MX2 S100A8 NINJ1 GBP5 SDS EMP1 IRF7 NME2 S100A12 CCR1 HAMP EPSTI1 IFI44L TNFSF13B CTSB OAS1 H3F3B ALDOA HERC5 PLEK CD163 GABARAP IER3 GBP4 CD300E IFIH1 TAP1 GCH1 RNASE1 WARS UBE2L6 ATF5 LAP3 LILRB4 DUSP6 RGL1 TYMP RNF213 HES4 HMOX1 FNIP2 DDX58 IFI6 IL1R2 CMPK2 PLSCR1 LYN SLAMF7 IL4I1 HIF1A PLA2G7 IER2 OASL LHFPL2 CDKN1A PSMB9 DYNLT1 PSMA6 XAF1 MIF CD48 OAS3 ANKRD22 ZFP36 GNG5 PTPRE NAMPT TPM4 ACSL1 IFI35 NCF1 STAT1 LILRB2 PHLDA2 FYB1 PIM3 B4GALT5 ATF3 CYP1B1 USP18 MPP1 TNFAIP3 IFI16 NT5C3A LCP2 GAPDH HPSE AC015912.3 GBP2 OAS2 SAMD9 CALM1 NEXN NAPA SSB GADD45B SPHK1 SOCS1 EMP3 SLC25A37 CCRL2 HLA-E DDX60L ZFP36L1 FOSB RARRES3 PLAUR SAMD9L LILRA5 SRGN TLR2 ATOX1 CEBPD TXN CXCL9 HAVCR2 SQSTM1 PSME2 AQP9 FPR1 SLC39A8 OPTN SMCHD1 IRF1 IFI44 PSMB10 TAGAP BAZ1A CLU RALA FLOT1 LILRB1 NMI CBWD2 ATP6V1G1 DRAM1 SIGLEC1 RNF19B IL10RA ZNFX1 PPP1R15A ELOC CD38 FCER1G CREM STAT2 TNFAIP6 S100A10 DEK SP110 TCN2 PLEKHO1 CYSTM1 CD69 NECTIN2 CREG1 ADM CFLAR ICAM1 CXCL2 RIPK2 MXD1 MGAT1 PML TMSB10 HIST2H2AA4 SAMSN1 PHF11 SERPINB9 CLIC1 MYOF PARP14 CD83 HMGA1

remotes::install_git("https://gitee.com/chansigit/harmony.git")
Downloading git repo https://gitee.com/chansigit/harmony.git

'/usr/bin/git' clone --depth 1 --no-hardlinks https://gitee.com/chansigit/harmony.git /tmp/Rtmp5QFgmP/file1e23e6541ee360
rlang        (0.4.12     -> 1.0.2     ) [CRAN]
magrittr     (2.0.1      -> 2.0.2     ) [CRAN]
fansi        (0.5.0      -> 1.0.2     ) [CRAN]
crayon       (1.4.2      -> 1.5.0     ) [CRAN]
cli          (3.1.1      -> 3.2.0     ) [CRAN]
pillar       (1.6.4      -> 1.7.0     ) [CRAN]
tidyselect   (1.1.1      -> 1.1.2     ) [CRAN]
glue         (1.6.1      -> 1.6.2     ) [CRAN]
generics     (0.1.1      -> 0.1.2     ) [CRAN]
colorspace   (2.0-2      -> 2.0-3     ) [CRAN]
withr        (2.4.3      -> 2.5.0     ) [CRAN]
Rcpp         (1.0.8      -> 1.0.8.2   ) [CRAN]
dplyr        (1.0.7      -> 1.0.8     ) [CRAN]
RcppArmad... (0.10.7.5.0 -> 0.10.8.1.0) [CRAN]
tidyr        (1.1.4      -> 1.2.0     ) [CRAN]
Skipping 1 packages not available: SingleCellExperiment

Installing 15 packages: rlang, magrittr, fansi, crayon, cli, pillar, tidyselect, glue, generics, colorspace, withr, Rcpp, dplyr, RcppArmadillo, tidyr

Updating HTML index of packages in '.Library'

Making 'packages.html' ...
 done
✔  checking for file ‘/tmp/Rtmp5QFgmP/file1e23e6541ee360/DESCRIPTION’ (1.2s)
─  preparing ‘harmony’:
✔  checking DESCRIPTION meta-information
─  cleaning src
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘harmony_0.1.0.tar.gz’
install_github("immunogenomics/harmony")