clusterProfiler

clusterProfiler也是通过KEGG API去获取物种对应的pathway注释,对于已有pathway注释的物种,我们只需要知道对应的三字母缩写, clusterProfiler就会联网自动获取该物种的pathway注释信息。

在clusterProfiler中,enrichKEGG(KEGG通路)和enrichMKEGG(KEGG模块)支持下载最新的在线版本的KEGG数据进行富集分析。通过将use_internal_data参数设置为TRUE,也支持使用KEGG.db,但是不建议这样做。有了这个新特性,物种不再局限于以前版本中支持的物种,可以是KEGG数据库中有KEGG注释数据的任何物种。使用organism参数提供物种的学名缩写。clusterProfiler提供search_kegg_organism()函数,帮助搜索支持的物种。

 
enrichKEGG(gene, organism = "dme", keyType = "kegg", pvalueCutoff = 0.05,
pAdjustMethod = "BH", universe, minGSSize = 10, maxGSSize = 500,
qvalueCutoff = 0.2, use_internal_data = FALSE)
 
  • keyType:one of "kegg",’ncbi-geneid’,’ncib-proteinid’ and ’uniprot’
  • use_internal_data=FALSE:logical, use KEGG.db or latest online KEGG data
 enrichKEGG使用在线数据速度实在是太慢了,所以可以先使用createKEGGdb生成本地KEGG.db包。
 
    install.packages("remotes")
remotes::install_github("YuLab-SMU/createKEGGdb")
library(createKEGGdb)
create_kegg_db("dme")
install.packages("KEGG.db_1.0.tar.gz",repos=NULL,type="source")
library(KEGG.db)
 
 Error : (converted from warning) unable to re-encode 'create_kegg_db.R' line 139
ERROR: unable to collate and parse R files for package 'createKEGGdb'
* removing 'E:/Eprogramfiles/R/R-3.6.3/library/createKEGGdb'
Error: Failed to install 'createKEGGdb' from GitHub:

安装 clusterProfiler:

yum  install libcurl-devel

yum install openssl
yum install openssl-devel

yum install libxml2
yum install libxml2-devel

wget https://cran.r-project.org/src/contrib/Archive/RcppArmadillo/RcppArmadillo_0.9.900.3.0.tar.gz

R CMD INSTALL -l /usr/lib64/R/library RcppArmadillo_0.9.900.3.0.tar.gz

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install("clusterProfiler")
BiocManager::install("topGO")
BiocManager::install("org.Hs.eg.db")
BiocManager::install("org.Mm.eg.db")

 

链接:https://www.jianshu.com/p/d484003dced5
https://www.jianshu.com/p/d484003dced5?utm_campaign=hugo

https://github.com/YuLab-SMU/createKEGGdb/issues/4

https://bioconductor.org/packages/3.10/data/annotation/src/contrib/org.Hs.eg.db_3.10.0.tar.gz

https://bioconductor.org/packages/3.10/data/annotation/src/contrib/org.Mm.eg.db_3.10.0.tar.gz

原文地址:https://www.cnblogs.com/emanlee/p/13911904.html