教小高改bug

  博客园 :: 首页 :: 博问 :: 闪存 :: :: 联系 :: :: 管理 ::

1. GO富集分析

输入数据

使用 enrichGO {clusterProfiler} 函数得到

ONTOLOGY	ID	Term	GeneRatio	BgRatio	pvalue	p.adjust	qvalue	geneID	Count
BP	GO:0032496	response to lipopolysaccharide	37/163	330/18670	1.5814603638303e-30	6.42863637897019e-27	3.03973328879383e-27	PTGS2/OPRM1/CASP9/JUN/CASP3/CASP8/PRKCA/MAOB/RELA/AKT1/FOS/MAPK1/IL10RA/NFKBIA/CYP1A2/GJA1/CYP1A1/ICAM1/IL1B/CCL2/SELE/VCAM1/CXCL8/NOS3/THBD/SERPINE1/MPO/GSTP1/CXCL11/CXCL2/PPARD/HSF1/CXCL10/CHUK/NOS2/MAPK8/SLPI	37
BP	GO:0009410	response to xenobiotic stimulus	33/163	292/18670	2.45410686916945e-27	2.49398610579345e-24	1.17926293239563e-24	PTGS1/HSP90AB1/DPEP1/NR3C1/DRD1/OPRM1/CASP9/SLC6A3/PPARG/F7/RELA/EGFR/RB1/POR/SOD1/HSPA5/CYP3A4/CYP1A2/CYP1A1/ICAM1/NR1I2/CYP1B1/GSTP1/NQO1/AHR/CHEK2/HSF1/E2F1/GSTM1/GSTM2/HTR3A/DRD5/PPP3CA	33
BP	GO:0070482	response to oxygen levels	35/163	394/18670	2.17944286618462e-25	1.42764451182279e-22	6.75051175914656e-23	PTGS2/SLC6A4/BCL2/CASP3/PLAU/PPARG/DPP4/F7/AKT1/VEGFA/CDKN1A/MMP2/TP53/RAF1/HIF1A/HMOX1/CAV1/MYC/CYP1A1/ICAM1/VCAM1/CCNB1/PLAT/COL1A1/NFE2L2/PSMD3/SLC2A4/PPARA/PPARD/HSF1/E2F1/NPEPPS/HK2/NOS2/OPRD1	35
BP	GO:0000302	response to reactive oxygen species	29/163	232/18670	2.45842843364319e-25	1.42764451182279e-22	6.75051175914656e-23	DPEP1/BCL2/JUN/CASP3/MMP3/RELA/EGFR/AKT1/FOS/MMP2/MMP9/MAPK1/SOD1/STAT1/CDK1/HMOX1/NOS3/CYP1B1/COL1A1/MPO/NCF1/GSTP1/NFE2L2/NQO1/HSF1/CHUK/CDK2/MAPK8/AKR1C3	29
BP	GO:0035690	cellular response to drug	34/163	369/18670	3.4482057729442e-25	1.55743960744646e-22	7.36423829403053e-23	PTGS2/HSP90AB1/DPEP1/NR3C1/KCNH2/DRD1/CHRM3/CHRM1/CHRM2/OPRM1/CASP9/NCOA1/MMP3/RELA/EGFR/MAPK1/TP53/SOD1/CDK1/HSPA5/HMOX1/MYC/ICAM1/IL1B/CYP1B1/NFE2L2/NQO1/AHR/CHEK2/HSF1/GSTM2/NOS2/CDK2/PPP3CA	34
BP	GO:0006979	response to oxidative stress	36/163	451/18670	1.66747198700319e-24	6.77827362716795e-22	3.20505668238718e-22	PTGS1/PTGS2/DPEP1/BCL2/JUN/CASP3/MMP3/RELA/EGFR/AKT1/FOS/MMP2/MMP9/MAPK1/TP53/SOD1/HIF1A/STAT1/CDK1/HMOX1/DUOX2/NOS3/HSPB1/CYP1B1/COL1A1/MPO/NCF1/GSTP1/NFE2L2/NQO1/PARP1/HSF1/CHUK/CDK2/MAPK8/AKR1C3	36
BP	GO:0048545	response to steroid hormone	33/163	385/18670	1.89346097619388e-23	6.99719897111647e-21	3.30857391629667e-21	ESR1/PTGS2/PGR/NR3C2/NR3C1/BCL2/CASP9/CASP3/RXRA/NCOA1/MAOB/AR/PPARG/RELA/EGFR/CCND1/FOS/CDKN1A/RB1/CAV1/ICAM1/NR1I2/COL1A1/GSTP1/PARP1/NR1I3/CLDN4/PPARA/PPARD/SPP1/CA2/ESR2/AKR1C3	33
BP	GO:0034599	cellular response to oxidative stress	30/163	302/18670	3.24691868673181e-23	1.01528649704345e-20	4.80070730524072e-21	DPEP1/BCL2/JUN/MMP3/RELA/EGFR/AKT1/FOS/MMP2/MMP9/MAPK1/TP53/SOD1/HIF1A/CDK1/HMOX1/NOS3/HSPB1/CYP1B1/MPO/NCF1/GSTP1/NFE2L2/NQO1/PARP1/HSF1/CHUK/CDK2/MAPK8/AKR1C3	30
BP	GO:0036293	response to decreased oxygen levels	32/163	370/18670	7.24580831527128e-23	2.1038722001127e-20	9.94800449901154e-21	PTGS2/SLC6A4/BCL2/CASP3/PLAU/DPP4/F7/AKT1/VEGFA/MMP2/TP53/RAF1/HIF1A/HMOX1/CAV1/MYC/CYP1A1/ICAM1/VCAM1/CCNB1/PLAT/NFE2L2/PSMD3/SLC2A4/PPARA/PPARD/HSF1/E2F1/NPEPPS/HK2/NOS2/OPRD1	32
BP	GO:1901654	response to ketone	25/163	193/18670	2.57152525208506e-22	6.96883343315051e-20	3.29516148091742e-20	NR3C1/CASP9/NCOA1/AKR1B1/MAOB/AR/PPARG/F7/RELA/EGFR/AKT1/CCND1/BCL2L1/FOS/CDKN1A/ELK1/ACACA/CAV1/ICAM1/PARP1/AHR/CLDN4/HSF1/SPP1/AKR1C3	25
CC	GO:0045121	membrane raft	21/163	315/19717	1.81311664017309e-13	3.15340889482025e-11	2.20276752028326e-11	PTGS2/ADRA1A/ADRA1B/SLC6A4/OPRM1/CASP3/CASP8/SLC6A3/DPP4/EGFR/MAPK1/HMOX1/CAV1/GJA1/ICAM1/SELE/NOS3/SLC2A4/CTSD/OPRD1/IKBKB	21
CC	GO:0098857	membrane microdomain	21/163	316/19717	1.92869045554755e-13	3.15340889482025e-11	2.20276752028326e-11	PTGS2/ADRA1A/ADRA1B/SLC6A4/OPRM1/CASP3/CASP8/SLC6A3/DPP4/EGFR/MAPK1/HMOX1/CAV1/GJA1/ICAM1/SELE/NOS3/SLC2A4/CTSD/OPRD1/IKBKB	21
CC	GO:0098589	membrane region	21/163	328/19717	3.97985873745076e-13	4.33804602382133e-11	3.03027840711163e-11	PTGS2/ADRA1A/ADRA1B/SLC6A4/OPRM1/CASP3/CASP8/SLC6A3/DPP4/EGFR/MAPK1/HMOX1/CAV1/GJA1/ICAM1/SELE/NOS3/SLC2A4/CTSD/OPRD1/IKBKB	21
CC	GO:0099056	integral component of presynaptic membrane	10/163	73/19717	4.4851060198081e-10	2.09518524068178e-08	1.46356091172685e-08	DRD1/CHRM3/CHRM1/ADRA1A/CHRM2/SLC6A4/OPRM1/SLC6A3/HTR3A/OPRD1	10
CC	GO:0090575	RNA polymerase II transcription factor complex	13/163	163/19717	1.00518364994313e-09	4.10868816914256e-08	2.87006384260079e-08	JUN/RXRA/PPARG/FOS/RB1/TP53/HIF1A/NR1I2/NR1I3/PPARA/PPARD/E2F1/E2F2	13
CC	GO:0098889	intrinsic component of presynaptic membrane	10/163	82/19717	1.44898833016726e-09	5.26465759960769e-08	3.67754932919643e-08	DRD1/CHRM3/CHRM1/ADRA1A/CHRM2/SLC6A4/OPRM1/SLC6A3/HTR3A/OPRD1	10
CC	GO:0099699	integral component of synaptic membrane	12/163	152/19717	5.08227019700573e-09	1.66190235442087e-07	1.16089750815815e-07	DRD1/CHRM3/CHRM1/ADRA1A/CHRM2/SLC6A4/OPRM1/GABRA1/SLC6A3/HTR3A/ADRA2C/OPRD1	12
CC	GO:0099240	intrinsic component of synaptic membrane	12/163	164/19717	1.20106415365455e-08	3.50514545965721e-07	2.44846793737523e-07	DRD1/CHRM3/CHRM1/ADRA1A/CHRM2/SLC6A4/OPRM1/GABRA1/SLC6A3/HTR3A/ADRA2C/OPRD1	12
CC	GO:0044798	nuclear transcription factor complex	13/163	201/19717	1.28629191180081e-08	3.50514545965721e-07	2.44846793737523e-07	JUN/RXRA/PPARG/FOS/RB1/TP53/HIF1A/NR1I2/NR1I3/PPARA/PPARD/E2F1/E2F2	13
CC	GO:1902911	protein kinase complex	9/163	109/19717	3.04068484378838e-07	6.62869295945867e-06	4.6303762182602e-06	CCND1/CDKN1A/RB1/CDK1/CCNB1/INSRR/CHUK/CDK2/IKBKB	9
MF	GO:0004879	nuclear receptor activity	12/163	47/17697	9.78928688129919e-15	2.35921813839311e-12	1.39110918839515e-12	ESR1/PGR/NR3C1/RXRA/AR/PPARG/NR1I2/AHR/NR1I3/PPARA/PPARD/ESR2	12
MF	GO:0003707	steroid hormone receptor activity	12/163	56/17697	9.74209610940774e-14	1.56523010824484e-11	9.2293542089126e-12	ESR1/PGR/NR3C2/NR3C1/RXRA/AR/PPARG/NR1I2/NR1I3/PPARA/PPARD/ESR2	12
MF	GO:1901338	catecholamine binding	7/163	20/17697	3.46353852211326e-10	4.17356391914648e-08	2.46093526571205e-08	DRD1/ADRB2/ADRA2A/SLC6A3/ADRB1/ADRA2C/DRD5	7
MF	GO:0008227	G protein-coupled amine receptor activity	9/163	59/17697	3.23843538177788e-09	2.85377499970365e-07	1.68272384782701e-07	CHRM3/CHRM1/ADRA1A/CHRM2/ADRA1B/ADRB2/ADRA2A/ADRB1/ADRA2C	9
MF	GO:0044389	ubiquitin-like protein ligase binding	17/163	308/17697	3.85992531368166e-09	2.85377499970365e-07	1.68272384782701e-07	HSP90AB1/KCNH2/BCL2/JUN/CASP8/RELA/EGFR/CDKN1A/RB1/TP53/NFKBIA/HIF1A/STAT1/HSPA5/CCNB1/CHEK2/ERBB3	17
MF	GO:0004935	adrenergic receptor activity	6/163	17/17697	6.33570976790423e-09	3.39312456458871e-07	2.00075045302239e-07	ADRA1A/ADRA1B/ADRB2/ADRA2A/ADRB1/ADRA2C	6
MF	GO:0035173	histone kinase activity	6/163	17/17697	6.33570976790423e-09	3.39312456458871e-07	2.00075045302239e-07	PRKCA/CDK1/PRKCB/CCNB1/CDK2/CHEK1	6
MF	GO:0001085	RNA polymerase II transcription factor binding	12/163	155/17697	2.06730745911782e-08	9.96442195294789e-07	5.87550541012433e-07	ESR1/JUN/AR/PPARG/FOS/RB1/TP53/ELK1/NFE2L2/AHR/PPARA/PPARD	12
MF	GO:0020037	heme binding	11/163	135/17697	4.82788914751304e-08	2.11549324463753e-06	1.24739719600815e-06	PTGS1/PTGS2/HMOX1/CYP3A4/CYP1A2/CYP1A1/DUOX2/NOS3/CYP1B1/MPO/NOS2	11
MF	GO:0031625	ubiquitin protein ligase binding	15/163	290/17697	7.84571185204766e-08	3.15136092723914e-06	1.85819491232708e-06	HSP90AB1/KCNH2/BCL2/JUN/CASP8/RELA/EGFR/CDKN1A/RB1/TP53/NFKBIA/HIF1A/HSPA5/CHEK2/ERBB3	15
input.txt

代码

# 输入文件需要有3列信息:
#ONTOLOGY:GO分类,BP/CC/MF
#Term:GO名称
#Count:富集在每个Term上基因数目

library(ggpubr)
inputFile = "input.txt"  # 输入文件
outFile = "barplot1.pdf"  # 输出文件
setwd("")     
rt = read.table(inputFile, header = T, sep = "\t", check.names = F)  #读取输入文件

# 绘制
pdf(file = outFile, width = 7, height = 5)
ggbarplot(rt, x = "Term", y = "Count", fill = "ONTOLOGY", color = "white",
          orientation = "horiz",   #横向显示
          palette = "aaas",    #配色方案
          legend = "right",    #图例位置
          sort.val = "asc",    #上升排序,区别于desc
          sort.by.groups = TRUE) +  #按组排序
  scale_y_continuous(expand = c(0, 0)) +   # 连续数据位置标度(x & y)
  scale_x_discrete(expand = c(0,0))  # 离散数据的位置尺度
dev.off()

 

posted on 2023-12-03 18:16  小高不高  阅读(324)  评论(0编辑  收藏  举报