-
Notifications
You must be signed in to change notification settings - Fork 0
/
untitled.R
52 lines (44 loc) · 5.05 KB
/
untitled.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
45
46
47
48
49
50
51
TGgene=c('ABCA1','ABI1','ACAA1','ACER3','ACP2','ACP5','ACSL1','ADAMDEC1','ADAP2','ADORA3','ADPGK','AIF1','AKR1A1','ALDH2','ALDH3B1','AMICA1','AMPD3','ANKRD22','AP1B1','APOC1','AQP9','ARAP1','ARHGAP18','ARHGAP27','ARHGEF10L','ARPC1B','ARRB2','ASAH1','ATF5','ATG3','ATG7','ATP6AP1','ATP6V0B','ATP6V0D1','ATP6V1B2','ATP6V1F','BACH1','BCKDHA','BCL2A1','BID','BLOC1S1','BLVRA','BLVRB','C10orf54','C11orf75','C15orf48','C19orf38','C1orf162','C1QA','C1QB','C1QC','C2','C3AR1','C5AR1','C9orf72','CAPG','CAPZA2','CARD9','CASP1','CAT','CCDC88A','CCR1','CCR2','CCRL2','CD14','CD163','CD1D','CD274','CD300C','CD300E','CD300LB','CD300LF','CD302','CD33','CD68','CD80','CD86','CECR1','CFD','CFP','CLEC10A','CLEC12A','CLEC4A','CLEC4E','CLEC5A','CLEC7A','CMKLR1','CMTM6','CNDP2','CNPY3','CORO7','CPVL','CREG1','CSF1R','CSF2RA','CSF3R','CST3','CSTA','CTSA','CTSB','CTSC','CTSD','CTSH','CTSL1','CTSS','CXCL10','CXCL16','CXCL9','CXCR2P1','CYB5R4','CYBA','CYBB','CYP2S1','DAPK1','DBNL','DENND1A','DHRS9','DMXL2','DNAJC5B','DOK1','DOK3','DPYD','EBI3','EMR2','EPSTI1','ETV6','EVI2A','F13A1','FAM105A','FAM157B','FAM26F','FAM49A','FAM96A','FBP1','FCER1G','FCGR1A','FCGR1B','FCGR1C','FCGR2A','FCGR2C','FCGR3B','FCGRT','FCN1','FERMT3','FES','FGL2','FKBP15','FLVCR2','FOLR2','FPR1','FPR2','FPR3','FTH1','FTL','FUCA1','FUOM','GAA','GABARAP','GALC','GATM','GBP1','GCA','GGTA1P','GK','GLA','GLB1','GLRX','GLUL','GM2A','GNA13','GNA15','GPBAR1','GPR34','GPR84','GPX1','GRN','GSTO1','H2AFY','HCAR2','HCAR3','HCK','HEIH','HERPUD1','HIST2H2BF','HK2','HK3','HLA-DMA','HLA-DMB','HLA-DPA1','HLA-DPB1','HLA-DPB2','HLA-DQA1','HLA-DQB1','HLA-DRA','HLA-DRB1','HLA-DRB5','HLA-DRB6','HMOX1','HN1','HPS1','HSPA6','HSPA7','HSPBAP1','IDH1','IFI30','IFI35','IFIT2','IFNGR1','IFNGR2','IGFLR1','IGSF6','IL10RB','IL18','IL1B','IL1RN','IL4I1','IL8','IRF5','IRF7','ITGAX','JAK2','KCNMA1','KCNMB1','KYNU','LAIR1','LAP3','LGALS2','LGALS9','LGMN','LILRA1','LILRA2','LILRA3','LILRA4','LILRA5','LILRA6','LILRB1','LILRB2','LILRB3','LILRB4','LILRB5','LIPA','LOC338758','LOC729737','LRRC25','LST1','LTA4H','LYN','LYZ','M6PR','MAFB','MAN2B1','MAPKAPK3','MARCO','MERTK','MFSD1','MGAT1','MIF4GD','MIIP','MILR1','MKNK1','MNDA','MOB1A','MPEG1','MPP1','MRC1','MS4A4A','MS4A6A','MS4A7','MSR1','MTHFD2','MTMR14','MX1','MX2','MXD1','MYD88','N4BP2L1','NAAA','NADK','NAGA','NAGK','NAIP','NCF2','NCF4','NCKAP1L','NCOA4','NFAM1','NFKBID','NINJ1','NLRC4','NLRP3','NMI','NOD2','NPC2','NPL','NR1H3','OAS1','OAZ1','OLR1','OSCAR','P2RX4','P2RY12','P2RY13','P2RY14','P2RY6','PAK1','PCK2','PFKFB3','PGD','PILRA','PLA2G15','PLA2G7','PLAUR','PLBD1','PLEK','PLEKHO1','PLEKHO2','PLIN2','PLXDC2','PPM1M','PPT1','PRAM1','PRKCD','PSAP','PSME2','PTAFR','PTPRE','PYCARD','RAB20','RAB4B','RAB8A','RASGEF1B','RASSF4','RBM47','RBPJ','REEP4','RELT','RGS10','RGS18','RGS19','RGS2','RHBDF2','RHOG','RILPL2','RIPK2','RNASE6','RNASEK','RNASET2','RNF13','RNF130','RNF144B','RNF149','RTN1','S100A11','S100A8','S100A9','SAMHD1','SAT1','SCAMP2','SCIMP','SCO2','SCPEP1','SDS','SECTM1','SEMA4A','SERPINA1','SERPINB1','SFT2D1','SGPL1','SH3BGRL','SHKBP1','SIGLEC1','SIGLEC14','SIGLEC5','SIGLEC7','SIGLEC9','SIRPA','SIRPB1','SIRPB2','SKAP2','SLAMF8','SLC11A1','SLC15A3','SLC16A3','SLC1A3','SLC25A19','SLC29A3','SLC2A5','SLC2A8','SLC2A9','SLC31A2','SLC43A2','SLC46A3','SLC7A7','SLC9A9','SLCO2B1','SMPDL3A','SNX10','SNX6','SOD2','SPI1','SPINT2','SQRDL','SRC','STX11','STXBP2','TALDO1','TBXAS1','TFRC','TGFBI','THEMIS2','TIFAB','TLR1','TLR2','TLR4','TLR5','TLR8','TMEM106A','TMEM144','TMEM176A','TMEM176B','TMEM37','TMEM51','TMEM86A','TNFAIP2','TNFAIP8L2','TNFSF13','TNFSF13B','TPP1','TRAFD1','TREM1','TREM2','TRPM2','TTYH3','TWF2','TYMP','TYROBP','UBE2D1','UBXN11','UNC93B1','VAMP8','VMO1','VSIG4','WDFY2','ZEB2','ZNF267','ZNF385A')
TGgene_ensg = c()
for (i in TGgene){
ensg<-ensemblGenes[ensemblGenes$external_gene_name == i,'ensembl_gene_id']
if(length(ensg) >= 1){
for (j in 1:length(ensg)){
tryCatch([email protected][ensg,],
error=function(e) print(i),
finally = ensg<-ensg[j])
}
}
TGgene_ensg<-list.append(TGgene_ensg,ensg)
}
TGgene_ensg<-na.omit(TGgene_ensg)
exp = [email protected]["ENSG00000198851",]
for (i in TGgene_ensg){
test = [email protected][i,]
exp <- rbind(exp,test)
}
exp <- exp[-1,]
celltypes = "MACROPHAGE"
cols <- c('#D5D8DC',brewer.pal(9, "Reds"))
png(paste0("ref_CellPress_DIGIST_",celltypes,".png"))
df = data.frame(x=DGIST@[email protected][, "tSNE_1"],
y=DGIST@[email protected][, "tSNE_2"],
expression=colSums(exp))
ggplot(df,aes(x=x, y=y, colour=expression),mar=c(0,0,3,0)) +
ggtitle(paste0(celltypes, " gene exp")) +
geom_point(size=0.5) +
scale_colour_gradientn(colours = cols) +
ylab("Component 2") +
xlab("Component 1") +
theme_bw() +
theme(text = element_text(size=20),
panel.grid.major=element_blank(),
panel.grid.minor=element_blank(),
axis.line=element_line(size=1),
axis.ticks=element_line(size=1),
legend.text=element_text(size=20),
legend.title=element_blank(),
legend.key=element_blank(),
axis.text.x = element_text(size=20)
) + ggtitle(celltypes)
dev.off()