拟南芥的富集分析

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

内容简介:「知识星球」里的问题,比如我随便搞几个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,匹夫有责

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

查看所有标签

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

互联网金融手册

互联网金融手册

谢平、邹传伟、刘海二 / 中国人民大学出版社 / 2014-4-1 / 68.00元

本书作者在2012年4月7日“金融四十人年会”上首次公开提出了“互联网金融”概念。在短短两年中,互联网金融已经成为中国金融界和IT界最热门的词汇之一,相关创业活动也非常活跃。本书是作者两年来深入研究、思考的结晶,畅想了金融与IT结合的未来图景,将理论与实践高度融合,与读者分享了许多深具洞察力的观点。本书力图规范互联网金融的定义,完善互联网金融的理论体系,分析互联网金融目前的六种主要类型——金融互联......一起来看看 《互联网金融手册》 这本书的介绍吧!

MD5 加密
MD5 加密

MD5 加密工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具