拟南芥的富集分析

栏目: 数据库 · 发布时间: 6年前

内容简介:「知识星球」里的问题,比如我随便搞几个ID来演示一下:你只要指定物种是

「知识星球」里的问题, https://t.zsxq.com/aEyneA2 ,拟南芥的ID怎么搞,这个内置是支持的。

比如我随便搞几个ID来演示一下:

> require(clusterProfiler)
Loading required package: clusterProfiler

clusterProfiler v3.9.0  For help: https://guangchuangyu.github.io/software/clusterProfiler

If you use clusterProfiler in published research, please cite:
Guangchuang Yu, Li-Gen Wang, Yanyan Han, Qing-Yu He. clusterProfiler: an R package for 
comparing biological themes among gene clusters. OMICS: A Journal of Integrative Biology. 2012, 16(5):284-287.

g <- c("AT5G61600", "AT2G44230", "AT1G49130", "AT1G30310", "AT3G18560",
"AT2G15960", "AT2G29290", "AT1G08930", "AT2G44460", "AT3G46600",
"AT5G24380", "AT3G59270", "AT5G55780", "AT2G45090", "AT5G38430",
"AT2G17040", "AT4G35770", "AT5G30341", "AT1G56320", "AT2G16367")

KEGG分析

你只要指定物种是 ath 就行,默认就是使用TAIR.

> y = enrichKEGG(g, organism="ath", pvalueCutoff=.1)
> y
#
# over-representation test
#
#...@organism 	 ath
#...@ontology 	 KEGG
#...@keytype 	 kegg
#...@gene 	 chr [1:20] "AT5G61600" "AT2G44230" "AT1G49130" "AT1G30310" "AT3G18560" ...
#...pvalues adjusted by 'BH' with cutoff <0.1
#...4 enriched terms found
'data.frame':	4 obs. of  9 variables:
 $ ID         : chr  "ath00960" "ath00460" "ath00710" "ath00630"
 $ Description: chr  "Tropane, piperidine and pyridine alkaloid biosynthesis" "Cyanoamino acid metabolism" "Carbon fixation in photosynthetic organisms" "Glyoxylate and dicarboxylate metabolism"
 $ GeneRatio  : chr  "1/3" "1/3" "1/3" "1/3"
 $ BgRatio    : chr  "35/4934" "67/4934" "69/4934" "78/4934"
 $ pvalue     : num  0.0211 0.0402 0.0414 0.0467
 $ p.adjust   : num  0.0817 0.0817 0.0817 0.0817
 $ qvalue     : num  0.0369 0.0369 0.0369 0.0369
 $ geneID     : chr  "AT2G29290" "AT2G44460" "AT5G38430" "AT5G38430"
 $ Count      : int  1 1 1 1
#...Citation
  Guangchuang Yu, Li-Gen Wang, Yanyan Han and Qing-Yu He.
  clusterProfiler: an R package for comparing biological themes among
  gene clusters. OMICS: A Journal of Integrative Biology
  2012, 16(5):284-287

> head(y)
               ID                                            Description
ath00960 ath00960 Tropane, piperidine and pyridine alkaloid biosynthesis
ath00460 ath00460                             Cyanoamino acid metabolism
ath00710 ath00710            Carbon fixation in photosynthetic organisms
ath00630 ath00630                Glyoxylate and dicarboxylate metabolism
         GeneRatio BgRatio     pvalue  p.adjust     qvalue    geneID Count
ath00960       1/3 35/4934 0.02113456 0.0817067 0.03686017 AT2G29290     1
ath00460       1/3 67/4934 0.04019509 0.0817067 0.03686017 AT2G44460     1
ath00710       1/3 69/4934 0.04137809 0.0817067 0.03686017 AT5G38430     1
ath00630       1/3 78/4934 0.04668955 0.0817067 0.03686017 AT5G38430     1

GO分析

GO的话,有 org.At.tair.db ,你只要指定`keyType=“TAIR”,然后就完事了。

> y2 = enrichGO(g, OrgDb = "org.At.tair.db", keyType="TAIR", ont="BP")
> y2
#
# over-representation test
#
#...@organism 	 Arabidopsis thaliana
#...@ontology 	 BP
#...@keytype 	 TAIR
#...@gene 	 chr [1:20] "AT5G61600" "AT2G44230" "AT1G49130" "AT1G30310" "AT3G18560" ...
#...pvalues adjusted by 'BH' with cutoff <0.05
#...2 enriched terms found
'data.frame':	2 obs. of  9 variables:
 $ ID         : chr  "GO:0010200" "GO:0010243"
 $ Description: chr  "response to chitin" "response to organonitrogen compound"
 $ GeneRatio  : chr  "4/14" "4/14"
 $ BgRatio    : chr  "421/20876" "443/20876"
 $ pvalue     : num  0.000139 0.000169
 $ p.adjust   : num  0.00778 0.00778
 $ qvalue     : num  0.00703 0.00703
 $ geneID     : chr  "AT5G61600/AT1G08930/AT3G46600/AT2G17040" "AT5G61600/AT1G08930/AT3G46600/AT2G17040"
 $ Count      : int  4 4
#...Citation
  Guangchuang Yu, Li-Gen Wang, Yanyan Han and Qing-Yu He.
  clusterProfiler: an R package for comparing biological themes among
  gene clusters. OMICS: A Journal of Integrative Biology
  2012, 16(5):284-287

> head(y2)
                   ID                         Description GeneRatio   BgRatio
GO:0010200 GO:0010200                  response to chitin      4/14 421/20876
GO:0010243 GO:0010243 response to organonitrogen compound      4/14 443/20876
                 pvalue    p.adjust      qvalue
GO:0010200 0.0001390340 0.007779913 0.007032187
GO:0010243 0.0001691285 0.007779913 0.007032187
                                            geneID Count
GO:0010200 AT5G61600/AT1G08930/AT3G46600/AT2G17040     4
GO:0010243 AT5G61600/AT1G08930/AT3G46600/AT2G17040     4

GSEA

GSEA的分析也是一样的, gseKEGG 就设置 organism="ath" ,而 gseGO 就设置 OrgDb=org.At.tair.db ,以及指定 keyType="TAIR" 。这里不再进一步展开。

可视化

clusterProfiler 支持多种可视化方法,这个也请自己移步去翻看在线文档。

赞赏
抵制BMC,匹夫有责

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

用户故事地图

用户故事地图

Jeff Patton / 李涛、向振东 / 清华大学出版社 / 2016-4-1 / 59.00元

用户故事地图作为一种有效的需求工具,越来越广泛地应用于开发实践中。本书以用户故事地图为主题,强调以合作沟通的方式来全面理解用户需求,涉及的主题包括怎么以故事地图的方式来讲用户需求,如何分解和优化需求,如果通过团队协同工作的方式来积极吸取经验教训,从中洞察用户的需求,开发真正有价值的、小而美的产品和服务。本书适合产品经理、用户体验设计师、产品负责人、业务分析师、IT项目经理、敏捷教练和精益教练阅读和......一起来看看 《用户故事地图》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具