ggplot2绘制Pathway富集分析气泡图

>library(ggplot2) #载入ggplot2

>pathway=read.table("KEGG.enrichment.txt",,header=T,sep="\t") #读取数据

>pathway=head(read.table("KEGG.enrichment.result.txt",header=T,sep="\t"),n=20) #读取数据前20行

> p = ggplot(pathway,aes(enrichFactor,Term_Name)) #以富集因子和pathway名称为X轴和Y轴
+ geom_point(aes(size=GeneHitsInSelectedSet,color=-1*log10(Qvalue))) #点图大小和颜色数据
+scale_colour_gradient(low="green",high="red") #颜色变化
+labs(color=expression(-log10),size="Gene number",x="Rich factor",y="Pathway name",title="Top20 of pathway enrichment") #标签名称

> pr=pr+theme_bw()

> pr

KEGG.enrichment.result.jpg

Term_Name GeneHitsInSelectedSet AllGenesInSelectedSet GeneHitsInBackground AllGenesInBackground p-value enrichFactor GeneListInSelectedSets Qvalue
00941 Flavonoid biosynthesis 14 492 41 3857 3.30E-04 2.676878842 "[FvH4_2g26480, FvH4_2g05780, FvH4_4g23870, FvH4_5g35170, FvH4_5g14010, FvH4_7g01160, FvH4_3g44420, FvH4_7g20870, FvH4_4g06180, FvH4_5g01170, FvH4_6g28410, FvH4_3g40570, FvH4_5g22390, FvH4_7g25890]" 0.04909626
00360 Phenylalanine metabolism 14 492 46 3857 0.001221701 2.38591375 "[FvH4_2g05780, FvH4_4g23870, FvH4_5g35170, FvH4_6g16060, FvH4_4g06180, FvH4_4g25490, FvH4_6g16460, FvH4_6g27650, FvH4_4g09340, FvH4_7g19130, FvH4_3g40570, FvH4_6g26610, FvH4_6g27940, FvH4_6g26600]" 0.091016736
00945 Stilbenoid, diarylheptanoid and gingerol biosynthesis 9 492 31 3857 0.012547314 2.275963808 "[FvH4_2g05780, FvH4_4g23870, FvH4_5g35170, FvH4_6g28410, FvH4_3g40570, FvH4_5g22390, FvH4_6g26800, FvH4_3g44420, FvH4_4g06180]" 0.467387431
00270 Cysteine and methionine metabolism 17 492 94 3857 0.083418875 1.417769417 "[FvH4_4g21340, FvH4_1g10540, FvH4_4g01140, FvH4_2g02530, FvH4_6g27650, FvH4_1g18690, FvH4_5g05120, FvH4_3g14020, FvH4_6g26610, FvH4_4g13980, FvH4_1g18490, FvH4_6g26600, FvH4_1g21920, FvH4_1g26460, FvH4_2g05040, FvH4_2g41260, FvH4_4g13280]" 0.654179598
04120 Ubiquitin mediated proteolysis 23 492 126 3857 0.04529262 1.431007227 "[FvH4_7g29370, FvH4_6g11010, FvH4_6g38720, FvH4_5g03910, FvH4_3g09200, FvH4_6g17370, FvH4_3g39370, FvH4_4g01260, FvH4_2g39250, FvH4_5g30320, FvH4_3g00910, FvH4_5g29350, FvH4_6g35920, FvH4_5g33030, FvH4_1g05910, FvH4_5g22570, FvH4_4g14790, FvH4_1g25030, FvH4_4g17530, FvH4_7g16630, FvH4_6g09540, FvH4_6g10930, FvH4_3g18500]" 0.674860033
00260 Glycine, serine and threonine metabolism 11 492 49 3857 0.0408107 1.759872242 "[FvH4_1g08890, FvH4_7g07540, FvH4_5g38450, FvH4_2g05310, FvH4_2g22570, FvH4_1g21920, FvH4_2g16830, FvH4_2g36660, FvH4_1g19090, FvH4_4g13290, FvH4_4g25490]" 0.675643816
00670 One carbon pool by folate 5 492 18 3857 0.069014744 2.177619693 "[FvH4_7g07540, FvH4_5g38450, FvH4_1g00040, FvH4_1g19090, FvH4_4g13290]" 0.685546458
03015 mRNA surveillance pathway 20 492 114 3857 0.082844862 1.375338753 "[FvH4_7g29390, FvH4_6g17300, FvH4_5g13570, FvH4_3g29340, FvH4_4g03530, FvH4_2g38640, FvH4_1g18700, FvH4_1g18000, FvH4_2g34040, FvH4_5g33710, FvH4_6g06810, FvH4_5g25490, FvH4_5g03260, FvH4_2g15670, FvH4_4g07000, FvH4_4g36800, FvH4_5g25550, FvH4_2g06580, FvH4_5g05510, FvH4_6g09230]" 0.685771358
00603 Glycosphingolipid biosynthesis - globo and isoglobo series 3 492 9 3857 0.096237762 2.613143631 "[FvH4_7g21240, FvH4_6g11740, FvH4_3g04760]" 0.71697133
00400 Phenylalanine, tyrosine and tryptophan biosynthesis 9 492 37 3857 0.038722924 1.906888596 "[FvH4_7g11530, FvH4_6g27650, FvH4_6g26610, FvH4_4g21980, FvH4_6g26600, FvH4_2g22570, FvH4_6g47770, FvH4_5g36810, FvH4_1g20450]" 0.721214462
00071 Fatty acid degradation 8 492 35 3857 0.068800169 1.791869919 "[FvH4_1g26810, FvH4_1g08890, FvH4_5g05130, FvH4_2g14760, FvH4_4g18500, FvH4_1g25230, FvH4_2g37760, FvH4_6g40560]" 0.732230372
04712 Circadian rhythm - plant 5 492 14 3857 0.024734738 2.799796748 "[FvH4_2g29440, FvH4_7g29370, FvH4_1g17250, FvH4_7g01160, FvH4_5g22570]" 0.737095202
03410 Base excision repair 8 492 34 3857 0.05939718 1.844571975 "[FvH4_4g29150, FvH4_4g36650, FvH4_2g21980, FvH4_6g11530, FvH4_2g39710, FvH4_4g35010, FvH4_2g40160, FvH4_4g35030]" 0.737514985
00130 Ubiquinone and other terpenoid-quinone biosynthesis 8 492 34 3857 0.05939718 1.844571975 "[FvH4_4g28800, FvH4_4g09340, FvH4_3g40570, FvH4_6g26610, FvH4_6g27940, FvH4_6g26600, FvH4_4g06180, FvH4_6g16460]" 0.737514985
00460 Cyanoamino acid metabolism 7 492 32 3857 0.103957465 1.714875508 "[FvH4_4g26180, FvH4_7g07540, FvH4_5g38450, FvH4_7g05220, FvH4_1g19090, FvH4_4g13290, FvH4_3g43510]" 0.737602967
00310 Lysine degradation 8 492 30 3857 0.030124137 2.090514905 "[FvH4_1g08890, FvH4_5g05130, FvH4_3g23070, FvH4_1g16260, FvH4_1g25230, FvH4_2g36660, FvH4_6g40560, FvH4_3g25420]" 0.748082742
00785 Lipoic acid metabolism 2 492 4 3857 0.081725815 3.919715447 "[FvH4_6g44960, FvH4_4g37350]" 0.761071655
00601 Glycosphingolipid biosynthesis - lacto and neolacto series 2 492 4 3857 0.081725815 3.919715447 "[FvH4_6g11740, FvH4_3g04760]" 0.761071655
00940 Phenylpropanoid biosynthesis 26 492 149 3857 0.056260767 1.367954384 "[FvH4_2g05780, FvH4_4g23870, FvH4_5g35170, FvH4_7g32980, FvH4_2g30540, FvH4_2g26620, FvH4_7g05220, FvH4_3g44420, FvH4_6g16060, FvH4_4g06180, FvH4_6g16460, FvH4_3g43510, FvH4_7g19130, FvH4_4g26180, FvH4_6g28410, FvH4_6g27940, FvH4_4g36130, FvH4_3g46010, FvH4_1g16790, FvH4_6g30610, FvH4_4g09340, FvH4_3g15230, FvH4_3g40570, FvH4_5g22390, FvH4_6g27610, FvH4_5g21320]" 0.762077663
00450 Selenocompound metabolism 4 492 15 3857 0.113762224 2.090514905 "[FvH4_2g38710, FvH4_7g04540, FvH4_6g24170, FvH4_2g41260]" 0.770480519
00563 Glycosylphosphatidylinositol(GPI)-anchor biosynthesis 3 492 13 3857 0.224775136 1.809099437 "[FvH4_5g04770, FvH4_2g15820, FvH4_1g19740]" 0.797416555
03008 Ribosome biogenesis in eukaryotes 6 492 33 3857 0.238324783 1.425351072 "[FvH4_1g27070, FvH4_1g17250, FvH4_1g16590, FvH4_2g38700, FvH4_3g27590, FvH4_1g22910]" 0.807054378
00860 Porphyrin and chlorophyll metabolism 8 492 47 3857 0.244407142 1.334371216 "[FvH4_3g20600, FvH4_5g33760, FvH4_7g25640, FvH4_2g27000, FvH4_3g20590, FvH4_1g04700, FvH4_2g23050, FvH4_4g37020]" 0.809259204
00053 Ascorbate and aldarate metabolism 8 492 47 3857 0.244407142 1.334371216 "[FvH4_1g08890, FvH4_5g05130, FvH4_3g33910, FvH4_6g20720, FvH4_7g08190, FvH4_7g13380, FvH4_1g25230, FvH4_5g20650]" 0.809259204
00944 Flavone and flavonol biosynthesis 2 492 5 3857 0.124932679 3.135772358 "[FvH4_6g17070, FvH4_5g14010]" 0.809346486
00040 Pentose and glucuronate interconversions 15 492 96 3857 0.236599083 1.224911077 "[FvH4_2g26010, FvH4_6g41430, FvH4_6g17310, FvH4_6g17430, FvH4_3g01680, FvH4_5g27090, FvH4_6g53340, FvH4_2g19540, FvH4_5g33570, FvH4_1g00260, FvH4_2g25970, FvH4_7g08190, FvH4_1g26360, FvH4_4g21500, FvH4_1g27720]" 0.819843336
03450 Non-homologous end-joining 2 492 7 3857 0.221439565 2.239837398 "[FvH4_4g35010, FvH4_4g35030]" 0.824862379
00942 Anthocyanin biosynthesis 2 492 7 3857 0.221439565 2.239837398 "[FvH4_3g19220, FvH4_7g33840]" 0.824862379

这是参考以下教程用自己的数据实现一遍,

R语言ggplot2画图系列——Pathway富集分析气泡图 - 生信技能树 - Powered by Discuz! http://www.biotrainee.com/forum.php?mod=viewthread&action=printable&tid=927

R语言ggplot2绘图教程——Pathway富集分析气泡图 - CSDN博客 http://blog.csdn.net/sinat_38163598/article/details/72827851

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 203,271评论 5 476
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 85,275评论 2 380
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 150,151评论 0 336
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,550评论 1 273
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,553评论 5 365
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,559评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,924评论 3 395
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,580评论 0 257
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,826评论 1 297
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,578评论 2 320
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,661评论 1 329
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,363评论 4 318
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,940评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,926评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,156评论 1 259
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 42,872评论 2 349
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,391评论 2 342

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,279评论 0 10
  • 以下介绍引用自 表达谱芯片数据的基因功能富集分析 刘 明1 王米渠2 丁维俊2 综述 毕 锋1 审校 基因富...
    赵晨西西西西阅读 3,465评论 0 8
  • 食物酸碱性这个说法,之所以非常令人困惑,就是因为定义不明确。 食物挤出一点汁水,测一下酸碱性,那么会发现水果是酸的...
    Annie大讲堂阅读 623评论 0 0
  • 一、什么是负载均衡 负载均衡(Load Balance)是分布式系统架构设计中必须考虑的因素之一,它通常是指,将请...
    wuxuan94阅读 214评论 0 0
  • 背景 webView播放视频时候,会遇到一些问题,比如无法全屏播放视频等。解决方案有以下两种,这里着重介绍第二种解...
    路Promenade阅读 22,644评论 25 51