5. LabelTransfer integrated¶
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 hECA data¶
# convert h5ad to rds format so that R can read it
sceasy::convertFormat('./lungimm_heca.h5ad', from="anndata", to="seurat",
outFile='lungimm_heca.rds')
X -> counts
Warning message:
“Keys should be one or more alphanumeric characters followed by an underscore, setting key from DMAPharmony_bydonor_ to DMAPharmonybydonor_”
Warning message:
“All keys should be one or more alphanumeric characters followed by an underscore '_', setting key to DMAPharmonybydonor_”
Warning message:
“Keys should be one or more alphanumeric characters followed by an underscore, setting key from PCAharmony_bydonor_ to PCAharmonybydonor_”
Warning message:
“All keys should be one or more alphanumeric characters followed by an underscore '_', setting key to PCAharmonybydonor_”
An object of class Seurat
20492 features across 53299 samples within 1 assay
Active assay: RNA (20492 features, 0 variable features)
6 dimensional reductions calculated: densmap, densmap_harmonyByDonor, dmap_harmony_bydonor, pca, pca_harmony_bydonor, umap
# read saved hECA data
heca = readRDS('./lungimm_heca.rds')
# create a clean seurat object
heca.full = CreateSeuratObject(heca@assays$RNA@data, meta.data = heca@meta.data)
heca.full@assays$RNA@data <- heca.full@assays$RNA@counts
heca.full[["umap"]] <- CreateDimReducObject(heca@reductions$umap@cell.embeddings, key = "umap_")
Warning message:
“No assay specified, setting assay as RNA by default.”
# show different batches
o(15,5)
DimPlot(heca.full, group.by='ann',cols = heca.color.table, split.by = 'study_id', pt.size=0.01, label=T, repel=T)
# print study_id
unique(heca.full@meta.data$study_id)
- 10.1038/s41591-019-0468-5
- 10.1186/s13059-019-1906-x
- 10.1038/s41586-020-2157-4
Levels:
- '10.1038/s41586-020-2157-4'
- '10.1038/s41591-019-0468-5'
- '10.1186/s13059-019-1906-x'
#heca1 = subset(heca.full, study_id=='10.1038/s41586-020-2157-4')
#heca2 = subset(heca.full, study_id=='10.1186/s13059-019-1906-x')
created integrated hECA data¶
heca.list = SplitObject(heca.full, split.by = 'study_id')
heca.list
$`10.1038/s41591-019-0468-5`
An object of class Seurat
20492 features across 465 samples within 1 assay
Active assay: RNA (20492 features, 0 variable features)
1 dimensional reduction calculated: umap
$`10.1186/s13059-019-1906-x`
An object of class Seurat
20492 features across 41940 samples within 1 assay
Active assay: RNA (20492 features, 0 variable features)
1 dimensional reduction calculated: umap
$`10.1038/s41586-020-2157-4`
An object of class Seurat
20492 features across 10894 samples within 1 assay
Active assay: RNA (20492 features, 0 variable features)
1 dimensional reduction calculated: umap
plan("sequential")
options(future.globals.maxSize = 1000 * 1024^2*4)
plan("multiprocess", workers = 14)
int.anchors <- FindIntegrationAnchors(object.list = heca.list, dims = 1:30)
plan("sequential")
Warning message:
“Strategy 'multiprocess' is deprecated in future (>= 1.20.0). Instead, explicitly specify either 'multisession' or 'multicore'. In the current R session, 'multiprocess' equals 'multicore'.”
Computing 2000 integration features
No variable features found for object1 in the object.list. Running FindVariableFeatures ...
No variable features found for object2 in the object.list. Running FindVariableFeatures ...
No variable features found for object3 in the object.list. Running FindVariableFeatures ...
Scaling features for provided objects
Finding all pairwise anchors
Running CCA
Merging objects
Finding neighborhoods
Finding anchors
Found 2280 anchors
Filtering anchors
Retained 228 anchors
Running CCA
Merging objects
Finding neighborhoods
Finding anchors
Found 2238 anchors
Filtering anchors
Retained 370 anchors
Running CCA
Merging objects
Finding neighborhoods
Finding anchors
Found 27018 anchors
Filtering anchors
Retained 5907 anchors
heca.integrated <- IntegrateData(anchorset = int.anchors, dims = 1:30)
Merging dataset 1 into 3
Extracting anchors for merged samples
Finding integration vectors
Finding integration vector weights
Integrating data
Merging dataset 3 1 into 2
Extracting anchors for merged samples
Finding integration vectors
Finding integration vector weights
Integrating data
#mask horizontal genes
x=heca.integrated
masked.genes<-c(
c(grep("^RPL", rownames(x), value = T),grep("^RPS", rownames(x), value = T)),
grep("^MT-", rownames(x), value = T),
c(grep("^IFI", rownames(x), value = T),grep("^ISG", rownames(x), value = T)),
grep("^SMC[0-9]*", rownames(x), value = T),
grep("^MCM[0-9]*", rownames(x), value = T),
c(grep("^TUBA", rownames(x), value = T),
grep("^TUBB", rownames(x), value = T),
grep("^TUBD[0-9]", rownames(x), value = T),
grep("^TUBE[0-9]", rownames(x), value = T),
grep("^TUBG[0-9]", rownames(x), value = T)
),
c(Seurat::cc.genes.updated.2019$s.genes,
Seurat::cc.genes.updated.2019$g2m.genes
),
c("H1-0","H1-1","H1-10","H1-12P","H1-2","H1-3","H1-4","H1-5","H1-6","H1-7","H1-8",
"H1-9P","H2AB1","H2AB2","H2AB3","H2AC1","H2AC10P","H2AC11","H2AC12","H2AC13","H2AC14",
"H2AC15","H2AC16","H2AC17","H2AC18","H2AC19","H2AC20","H2AC21","H2AC2P","H2AC3P","H2AC4",
"H2AC5P","H2AC6","H2AC7","H2AC8","H2AC9P","H2AJ","H2AL1MP","H2AL1Q","H2AL3",
"H2AP","H2AQ1P","H2AW","H2AX","H2AZ1","H2AZ2","MACROH2A1","MACROH2A2","H2BC1","H2BC10",
"H2BC11","H2BC12","H2BC13","H2BC14","H2BC15","H2BC16P","H2BC17","H2BC18",
"H2BC19P","H2BC20P","H2BC21","H2BC2P","H2BC3","H2BC4","H2BC5","H2BC6","H2BC7","H2BC8",
"H2BC9","H2BK1","H2BL1P","H2BN1","H2BC12L","H2BU1","H2BU2P","H2BW1","H2BW2",
"H2BW3P","H2BW4P","H3-7","H3-3A","H3-3B","H3-4","H3-5","H3C1","H3C10","H3C11","H3C12",
"H3C13","H3C14","H3C15","H3C2","H3C3","H3C4","H3C5P","H3C6","H3C7","H3C8",
"H3C9P","H3Y1","H3Y2","CENPA","H4-16","H4C1","H4C10P","H4C11","H4C12","H4C13","H4C14",
"H4C15","H4C2","H4C3","H4C4","H4C5","H4C6","H4C7","H4C8","H4C9"),
grep("^HIST", rownames(x), value=T)
)
goi.int = setdiff( VariableFeatures(heca.integrated), masked.genes)
length(goi.int)
DefaultAssay(heca.integrated) <- "integrated"
heca.integrated <- ScaleData(heca.integrated, verbose = FALSE, features = goi.int)
heca.integrated <- RunPCA(heca.integrated, npcs = 30, verbose = FALSE, features = goi.int)
heca.integrated <- RunUMAP(heca.integrated, reduction = "pca", dims = 1:30, verbose = FALSE)
Warning message:
“The default method for RunUMAP has changed from calling Python UMAP via reticulate to the R-native UWOT using the cosine metric
To use Python UMAP via reticulate, set umap.method to 'umap-learn' and metric to 'correlation'
This message will be shown once per session”
# show different batches
o(15,5)
DimPlot(heca.integrated, group.by='ann',cols = heca.color.table, split.by = 'study_id', pt.size=0.01, label=T, repel=T)
# print study_id
unique(heca.integrated@meta.data$study_id)
- '10.1038/s41591-019-0468-5'
- '10.1186/s13059-019-1906-x'
- '10.1038/s41586-020-2157-4'
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()
full batches - integrated data transfer¶
plan("sequential")
options(future.globals.maxSize = 1000 * 1024^2*4)
plan("multiprocess", workers = 14)
int.anchors <- FindTransferAnchors(reference = heca.integrated, query = immune.combined,
dims = 1:30, reference.reduction = "pca")
predictions <- TransferData(anchorset = int.anchors, refdata = heca.integrated$cell_type,
dims = 1:30)
immune.combined <- AddMetaData(immune.combined, metadata = predictions)
plan("sequential")
Projecting cell embeddings
Finding neighborhoods
Finding anchors
Found 7380 anchors
Filtering anchors
Retained 2966 anchors
Finding integration vectors
Finding integration vector weights
Predicting cell labels
o(10,8)
DimPlot(immune.combined, group.by='predicted.id', label=T, repel=T, cols=heca.color.table, order='Neutrophilic granunocyte')
DimPlot(immune.combined, group.by='persample_ann', label=T, repel=T, cols=covid.color.table)
matched <- c(
paste('B' , 'B cell', sep="_"),
paste('Plasma' , 'Plasma B cell', sep="_"),
paste('Plasma' , 'B cell', sep="_"),
paste('T' , 'CD8 T cell', sep="_"),
paste('T' , 'T cell', sep="_"),
paste('T CD4' , 'T cell', sep="_"),
paste('T CD8' , 'T cell', sep="_"),
paste('T CD8' , 'CD8 T cell', sep="_"),
paste('CD8 cytotoxic T' , 'T cell', sep="_"),
paste('CD8 cytotoxic T' , 'CD8 T cell', sep="_"),
paste('T cycling' , 'T cell', sep="_"),
paste('T cycling' , 'CD8 T cell', sep="_"),
paste('Treg' , 'T cell', sep="_"),
paste('gdT' , 'T cell', sep="_"),
paste('NKT' , 'T cell', sep="_"),
paste('NK' , 'NK cell', sep="_"),
paste('Neu' , 'Neutrophilic granulocyte', sep="_"),
paste('macrophage' , 'Macrophage', sep="_"),
paste('macrophage' , 'Monocyte', sep="_"),
paste('macrophage' , 'Myeloid cell', sep="_"),
paste('Mast' , 'Mast cell', sep="_"),
paste('cDC1' , 'Dendritic cell', sep="_"),
paste('cDC1' , 'Myeloid cell', sep="_"),
paste('cDC2' , 'Dendritic cell', sep="_"),
paste('cDC2' , 'Myeloid cell', sep="_"),
paste('moDC' , 'Dendritic cell', sep="_"),
paste('pDC' , 'Dendritic cell', sep="_"),
paste('DC' , 'Dendritic cell', sep="_"),
paste('Mye' , 'Macrophage', sep="_"),
paste('Mye' , 'Mast cell', sep="_"),
paste('Mye' , 'Megakaryocyte', sep="_"),
paste('Mye' , 'Dendritic cell', sep="_"),
paste('Mye' , 'Monocyte', sep="_"),
paste('Mye' , 'Neutrophilic granulocyte', sep="_"),
paste('Mye' , 'Myeloid cell', sep="_")
)
# calculate accuracy
meta=immune.combined@meta.data
meta = meta[, c('persample_ann','predicted.id')]
meta$joint <- paste(meta$persample_ann, meta$predicted.id, sep='_')
meta$isMatched <- (meta$joint %in% matched) | (meta$persample_ann == meta$predicted.id)
acc = (meta %>% filter(isMatched==T) %>% nrow) / (meta %>% nrow)
print( acc )
[1] 0.9250865
# draw matrix
## create an empty adj matrix
rows = as.character( unique(immune.combined@meta.data$persample_ann) ) # from:covid ground-truth
cols = as.character( unique(heca.full@meta.data$cell_type) ) # to:predicted to
mat <- matrix(0, length(rows), length(cols))
rownames(mat) <- rows
colnames(mat) <- cols
# get an edge list
edge.list = meta %>% count(persample_ann, predicted.id, sort = TRUE)
# fill in the edge list
for(i in 1:NROW(edge.list)) mat[ edge.list[i,1], edge.list[i,2] ] <- edge.list[i,3] # SEE UPDATE
row.order= c('Plasma','B',
'Treg','T cycling','T CD4','T','NKT','gdT','CD8 cytotoxic T',
'T CD8','NK',
'Neu','DC','cDC2','cDC1','macrophage','moDC','pDC','Mast'
)
col.order=c('Plasma B cell','B cell',
'T cell','CD8 T cell','NK cell',
'Neutrophilic granulocyte',
'Macrophage','Dendritic cell','Myeloid cell','Mast cell','Monocyte','Megakaryocyte')
# row-sum scaling
mat = mat/rowSums(mat)
mat = mat[row.order,col.order]
library(pheatmap)
o(5,5)
pheatmap(mat, cluster_rows = F, cluster_cols = F, main='hECA integrated reference')
library('mclust')
adjustedRandIndex(meta$persample_ann, meta$predicted.id)
Package 'mclust' version 5.4.9
Type 'citation("mclust")' for citing this R package in publications.
Annotate data for DEG¶
o(8,7)
DimPlot(heca.integrated, group.by='ann',cols = heca.color.table, pt.size=0.01, label=T, repel=T)
o(9,8)
DimPlot(heca.integrated, group.by='ann',cols = heca.color.table, pt.size=0.01, label=T, repel=T)&
theme(axis.title = element_blank(),
axis.text = element_blank(),
axis.ticks=element_blank())
cairo_pdf(filename = 'heca.umap.predicted.pdf', width = 9,height = 8)
DimPlot(heca.integrated, group.by='ann',cols = heca.color.table, pt.size=0.01, label=T, repel=T)&
theme(axis.title = element_blank(),
axis.text = element_blank(),
axis.ticks=element_blank())
dev.off()
DefaultAssay(heca.integrated)<-'integrated'
heca.integrated <- FindNeighbors(heca.integrated, reduction = "pca", dims = 1:30)
heca.integrated <- FindClusters( heca.integrated, resolution = c(0.5,0.6,0.7,0.8,0.9))
Computing nearest neighbor graph
Computing SNN
Modularity Optimizer version 1.3.0 by Ludo Waltman and Nees Jan van Eck
Number of nodes: 53299
Number of edges: 1935710
Running Louvain algorithm...
Maximum modularity in 10 random starts: 0.9299
Number of communities: 22
Elapsed time: 11 seconds
Modularity Optimizer version 1.3.0 by Ludo Waltman and Nees Jan van Eck
Number of nodes: 53299
Number of edges: 1935710
Running Louvain algorithm...
Maximum modularity in 10 random starts: 0.9233
Number of communities: 26
Elapsed time: 10 seconds
Modularity Optimizer version 1.3.0 by Ludo Waltman and Nees Jan van Eck
Number of nodes: 53299
Number of edges: 1935710
Running Louvain algorithm...
Maximum modularity in 10 random starts: 0.9177
Number of communities: 27
Elapsed time: 11 seconds
Modularity Optimizer version 1.3.0 by Ludo Waltman and Nees Jan van Eck
Number of nodes: 53299
Number of edges: 1935710
Running Louvain algorithm...
Maximum modularity in 10 random starts: 0.9121
Number of communities: 33
Elapsed time: 11 seconds
Modularity Optimizer version 1.3.0 by Ludo Waltman and Nees Jan van Eck
Number of nodes: 53299
Number of edges: 1935710
Running Louvain algorithm...
Maximum modularity in 10 random starts: 0.9072
Number of communities: 34
Elapsed time: 11 seconds
DimPlot(heca.integrated, group.by='integrated_snn_res.0.5',label=T)
Idents(heca.integrated)<-'integrated_snn_res.0.5'
o(15,13)
VlnPlot(heca.integrated, features =c( 'CD8A','CD3E','CD69','GZMK','GZMB','TRDC'), pt.size=0.0)
o(6*4, 6*2)
FeaturePlot(heca.integrated, pt.size=0.01,ncol=4, features = c('CD3E','NKG7','CD4','CD8A',
'CD8B','TRDC'))
Warning message:
“Could not find CD4 in the default search locations, found in RNA assay instead”
Idents(heca.integrated)<-'integrated_snn_res.0.5'
deg12 = FindMarkers(heca.integrated, only.pos = T, ident.1=12)
deg12%>% arrange(desc(avg_log2FC))
p_val | avg_log2FC | pct.1 | pct.2 | p_val_adj | |
---|---|---|---|---|---|
<dbl> | <dbl> | <dbl> | <dbl> | <dbl> | |
GZMH | 0.000000e+00 | 2.3317612 | 0.892 | 0.368 | 0.000000e+00 |
CD3D | 0.000000e+00 | 1.9872558 | 0.964 | 0.407 | 0.000000e+00 |
SCGB3A1 | 0.000000e+00 | 1.7028728 | 0.828 | 0.307 | 0.000000e+00 |
TRGC2 | 5.580196e-266 | 1.6234542 | 0.700 | 0.304 | 1.116039e-262 |
IFITM1 | 0.000000e+00 | 1.6208903 | 0.843 | 0.318 | 0.000000e+00 |
TRAC | 0.000000e+00 | 1.5733375 | 0.943 | 0.461 | 0.000000e+00 |
TNF | 1.575880e-158 | 1.5537726 | 0.537 | 0.224 | 3.151760e-155 |
CD3G | 2.002996e-301 | 1.4669920 | 0.714 | 0.254 | 4.005991e-298 |
NKG7 | 7.615188e-305 | 1.4583827 | 0.990 | 0.568 | 1.523038e-301 |
CCL5 | 3.413545e-297 | 1.4128191 | 0.972 | 0.493 | 6.827090e-294 |
IL32 | 0.000000e+00 | 1.3656549 | 0.968 | 0.544 | 0.000000e+00 |
SCGB1A1 | 0.000000e+00 | 1.3441376 | 0.812 | 0.335 | 0.000000e+00 |
CD3E | 3.127342e-276 | 1.2544317 | 0.849 | 0.399 | 6.254685e-273 |
GIMAP7 | 3.283782e-253 | 1.2518423 | 0.835 | 0.434 | 6.567565e-250 |
GZMA | 4.304799e-286 | 1.2414030 | 0.946 | 0.511 | 8.609598e-283 |
FGFBP2 | 1.511492e-147 | 1.1789837 | 0.648 | 0.338 | 3.022983e-144 |
TRBC1 | 8.220764e-185 | 1.1383799 | 0.801 | 0.429 | 1.644153e-181 |
GZMK | 1.388654e-41 | 1.0480718 | 0.373 | 0.242 | 2.777308e-38 |
CD8A | 1.875675e-83 | 1.0057676 | 0.464 | 0.258 | 3.751349e-80 |
CD2 | 1.581810e-218 | 0.9974308 | 0.821 | 0.382 | 3.163619e-215 |
GZMM | 8.816690e-162 | 0.9880719 | 0.723 | 0.397 | 1.763338e-158 |
CORO1A | 1.566353e-229 | 0.9766945 | 0.968 | 0.735 | 3.132705e-226 |
MGP | 2.381943e-153 | 0.9531054 | 0.665 | 0.385 | 4.763887e-150 |
ACKR1 | 2.414332e-78 | 0.9486006 | 0.357 | 0.185 | 4.828664e-75 |
TRBC2 | 2.861630e-113 | 0.9442778 | 0.717 | 0.436 | 5.723259e-110 |
CCL21 | 1.658734e-54 | 0.9173924 | 0.358 | 0.222 | 3.317469e-51 |
PRF1 | 3.529078e-227 | 0.8986698 | 0.888 | 0.465 | 7.058156e-224 |
C12orf75 | 2.574815e-118 | 0.8899627 | 0.628 | 0.357 | 5.149629e-115 |
FCRL6 | 8.443549e-130 | 0.8787069 | 0.450 | 0.177 | 1.688710e-126 |
S1PR5 | 7.000118e-104 | 0.8708695 | 0.491 | 0.242 | 1.400024e-100 |
⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ |
GZMB | 3.990067e-155 | 0.3838338 | 0.849 | 0.468 | 7.980133e-152 |
NCR3 | 1.448325e-16 | 0.3765478 | 0.371 | 0.290 | 2.896650e-13 |
RAB37 | 1.611220e-08 | 0.3753458 | 0.194 | 0.178 | 3.222440e-05 |
CXCR3 | 3.049344e-14 | 0.3750041 | 0.209 | 0.179 | 6.098688e-11 |
SYNE1 | 1.760211e-08 | 0.3730022 | 0.215 | 0.210 | 3.520422e-05 |
RIPOR2 | 2.703798e-14 | 0.3661011 | 0.352 | 0.304 | 5.407596e-11 |
TUBA4A | 1.442729e-27 | 0.3585617 | 0.508 | 0.407 | 2.885458e-24 |
ZNF683 | 1.843016e-01 | 0.3554056 | 0.150 | 0.157 | 1.000000e+00 |
PTPN7 | 8.481600e-18 | 0.3479454 | 0.450 | 0.383 | 1.696320e-14 |
C1orf21 | 2.250568e-11 | 0.3467913 | 0.236 | 0.216 | 4.501136e-08 |
CCN1 | 2.585146e-10 | 0.3361822 | 0.179 | 0.170 | 5.170293e-07 |
F2R | 3.401221e-08 | 0.3333528 | 0.198 | 0.160 | 6.802441e-05 |
B2M | 8.769744e-88 | 0.3239678 | 1.000 | 0.992 | 1.753949e-84 |
PPP2R2B | 4.637321e-02 | 0.3184341 | 0.156 | 0.152 | 1.000000e+00 |
PYHIN1 | 8.634472e-16 | 0.3038816 | 0.381 | 0.302 | 1.726894e-12 |
GNG2 | 7.410162e-32 | 0.3018219 | 0.514 | 0.386 | 1.482032e-28 |
DCN | 6.905787e-09 | 0.2876115 | 0.275 | 0.260 | 1.381157e-05 |
ZNF600 | 6.203896e-04 | 0.2851227 | 0.173 | 0.195 | 1.000000e+00 |
SFTPB | 3.032331e-24 | 0.2844382 | 0.434 | 0.345 | 6.064663e-21 |
IFITM3 | 5.037570e-67 | 0.2828094 | 0.692 | 0.422 | 1.007514e-63 |
PTPRC | 7.126091e-54 | 0.2826217 | 0.814 | 0.623 | 1.425218e-50 |
CD300A | 4.182796e-06 | 0.2794354 | 0.357 | 0.356 | 8.365592e-03 |
LPCAT1 | 8.864149e-21 | 0.2790347 | 0.300 | 0.242 | 1.772830e-17 |
ADIRF | 2.973978e-13 | 0.2755899 | 0.185 | 0.164 | 5.947956e-10 |
HBB | 4.200590e-72 | 0.2735606 | 0.442 | 0.275 | 8.401180e-69 |
ID1 | 2.701749e-09 | 0.2723989 | 0.209 | 0.201 | 5.403498e-06 |
GBP5 | 2.446865e-12 | 0.2585851 | 0.215 | 0.197 | 4.893729e-09 |
MLLT6 | 1.151223e-01 | 0.2572620 | 0.185 | 0.229 | 1.000000e+00 |
H2BC8 | 5.723035e-10 | 0.2567649 | 0.104 | 0.218 | 1.144607e-06 |
TM4SF1 | 4.001418e-17 | 0.2518925 | 0.155 | 0.133 | 8.002836e-14 |
Idents(heca.integrated)<-'integrated_snn_res.0.5'
deg15 = FindMarkers(heca.integrated, only.pos = T, ident.1=15)
deg15
p_val | avg_log2FC | pct.1 | pct.2 | p_val_adj | |
---|---|---|---|---|---|
<dbl> | <dbl> | <dbl> | <dbl> | <dbl> | |
GNLY | 0.000000e+00 | 2.0696762 | 0.995 | 0.524 | 0.000000e+00 |
PRF1 | 0.000000e+00 | 2.2471647 | 0.986 | 0.466 | 0.000000e+00 |
CD247 | 0.000000e+00 | 1.7767413 | 0.931 | 0.399 | 0.000000e+00 |
IFITM1 | 0.000000e+00 | 2.0692461 | 0.874 | 0.320 | 0.000000e+00 |
NKG7 | 1.469025e-302 | 1.8697103 | 0.997 | 0.570 | 2.938049e-299 |
KLRD1 | 1.069487e-299 | 1.6394870 | 0.967 | 0.438 | 2.138975e-296 |
CTSW | 1.332831e-299 | 1.7216566 | 0.969 | 0.492 | 2.665663e-296 |
SCGB3A1 | 1.197749e-298 | 1.6934547 | 0.816 | 0.310 | 2.395498e-295 |
KLRF1 | 2.534747e-294 | 1.5627228 | 0.829 | 0.294 | 5.069494e-291 |
GZMB | 1.259607e-287 | 1.6906566 | 0.976 | 0.468 | 2.519214e-284 |
GZMA | 1.498221e-282 | 1.7029305 | 0.972 | 0.513 | 2.996441e-279 |
SPON2 | 1.877297e-281 | 1.7917168 | 0.874 | 0.386 | 3.754595e-278 |
HOPX | 1.411750e-272 | 1.6424776 | 0.932 | 0.454 | 2.823501e-269 |
MYOM2 | 1.742244e-241 | 2.0288710 | 0.676 | 0.241 | 3.484489e-238 |
SCGB1A1 | 9.854206e-238 | 1.4411465 | 0.783 | 0.338 | 1.970841e-234 |
FCGR3A | 1.444223e-231 | 1.5008075 | 0.921 | 0.444 | 2.888446e-228 |
KLRB1 | 3.819865e-226 | 1.2826810 | 0.915 | 0.431 | 7.639731e-223 |
FGFBP2 | 1.663208e-224 | 1.6226070 | 0.795 | 0.337 | 3.326416e-221 |
TRDC | 1.901180e-206 | 1.4741851 | 0.737 | 0.293 | 3.802360e-203 |
CD7 | 2.533214e-205 | 1.2991135 | 0.905 | 0.488 | 5.066429e-202 |
IGHG3 | 2.823892e-199 | 0.3844824 | 0.596 | 0.200 | 5.647783e-196 |
CST7 | 1.957965e-193 | 1.1777371 | 0.936 | 0.516 | 3.915930e-190 |
NCR3 | 1.599390e-184 | 1.3957847 | 0.682 | 0.286 | 3.198781e-181 |
GZMM | 4.910456e-176 | 1.3147446 | 0.782 | 0.398 | 9.820912e-173 |
CCL5 | 1.652247e-170 | 1.2458928 | 0.934 | 0.496 | 3.304493e-167 |
CCL3 | 4.604424e-169 | 1.1687778 | 0.958 | 0.578 | 9.208848e-166 |
LGALS13 | 2.207733e-164 | 1.1294479 | 0.858 | 0.492 | 4.415465e-161 |
IFITM2 | 1.189061e-162 | 1.0095139 | 0.963 | 0.712 | 2.378122e-159 |
S1PR5 | 1.006570e-160 | 1.3439829 | 0.602 | 0.242 | 2.013141e-157 |
CORO1A | 3.843575e-157 | 0.9957098 | 0.954 | 0.736 | 7.687149e-154 |
⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ |
H4C3 | 2.676584e-05 | 0.2756515 | 0.383 | 0.379 | 0.05353168 |
DCN | 6.476969e-05 | 0.3002219 | 0.259 | 0.260 | 0.12953938 |
RAB37 | 9.406866e-05 | 0.3784517 | 0.180 | 0.178 | 0.18813732 |
FBXO44 | 1.205780e-04 | 0.3384989 | 0.148 | 0.166 | 0.24115597 |
MLLT6 | 3.747354e-04 | 0.3281990 | 0.218 | 0.229 | 0.74947080 |
S100B | 4.016167e-04 | 0.7841212 | 0.213 | 0.212 | 0.80323349 |
FCRL3 | 6.314218e-04 | 0.2950055 | 0.108 | 0.084 | 1.00000000 |
RIPOR2 | 1.591798e-03 | 0.3640270 | 0.293 | 0.306 | 1.00000000 |
PLA2G2A | 3.044196e-03 | 0.6136464 | 0.245 | 0.252 | 1.00000000 |
PIF1 | 3.263715e-03 | 0.2886611 | 0.064 | 0.128 | 1.00000000 |
FAM43A | 4.691287e-03 | 0.3205002 | 0.146 | 0.230 | 1.00000000 |
NNMT | 4.722701e-03 | 0.4759493 | 0.207 | 0.218 | 1.00000000 |
ADAMTS1 | 5.144521e-03 | 0.4007761 | 0.122 | 0.141 | 1.00000000 |
MCTP2 | 1.010765e-02 | 0.3166227 | 0.160 | 0.158 | 1.00000000 |
CXCR1 | 1.058021e-02 | 0.3213312 | 0.102 | 0.084 | 1.00000000 |
RNF125 | 1.140217e-02 | 0.2667988 | 0.225 | 0.248 | 1.00000000 |
KIR3DL2 | 1.431669e-02 | 0.3141892 | 0.125 | 0.111 | 1.00000000 |
CRTAM | 1.467915e-02 | 0.5294461 | 0.142 | 0.233 | 1.00000000 |
CEP78 | 2.026967e-02 | 0.3932091 | 0.195 | 0.217 | 1.00000000 |
TPM2 | 3.734433e-02 | 0.2635815 | 0.130 | 0.175 | 1.00000000 |
PTGDS | 4.187003e-02 | 0.6970224 | 0.190 | 0.222 | 1.00000000 |
SH2D2A | 6.854395e-02 | 0.3648199 | 0.255 | 0.269 | 1.00000000 |
TNFSF14 | 1.114615e-01 | 0.3869045 | 0.195 | 0.230 | 1.00000000 |
SLFN12L | 1.769912e-01 | 0.3325473 | 0.130 | 0.181 | 1.00000000 |
NCALD | 2.030238e-01 | 0.2820167 | 0.127 | 0.138 | 1.00000000 |
ARRDC3 | 2.532969e-01 | 0.2520030 | 0.276 | 0.321 | 1.00000000 |
NEIL1 | 2.697969e-01 | 0.4416421 | 0.156 | 0.186 | 1.00000000 |
DTHD1 | 3.087544e-01 | 0.4026117 | 0.171 | 0.182 | 1.00000000 |
TNFRSF9 | 4.500554e-01 | 0.3400836 | 0.114 | 0.151 | 1.00000000 |
PPP2R2B | 8.506222e-01 | 0.3038383 | 0.137 | 0.152 | 1.00000000 |
coi = Cells(subset(heca.integrated, integrated_snn_res.0.5=='4'))
heca.integrated@meta.data[coi, 'ann']<-'CD8 T cell'
coi = Cells(subset(heca.integrated, integrated_snn_res.0.5=='12'))
heca.integrated@meta.data[coi, 'ann']<-'CD8 T cell'
o(10,10)
DimPlot(heca.integrated, group.by='ann',label=T,cols = heca.color.table)
save(heca.integrated, file = 'heca.integrated.annotated.rda', compress = T, compression_level = 9)