DEseq2和edgeR的安装问题记录

本文记录了在R环境中安装DEseq2和edgeR这两个生物信息学常用包时遇到的依赖问题,包括XML、RCurl等,并提供了相应的解决步骤。首先解决xml2-config缺失问题,通过安装libxml2-dev;接着处理RCurl依赖,安装libcurl4-openssl-dev。对于locfit版本问题,选择特定版本进行安装。若无sudo权限,建议使用conda安装这两个包。
摘要由CSDN通过智能技术生成

DEseq2和edgeR安装问题记录

DEseq2和edgeR 是常用的差异分析的R包,不过在安装时往往会碰到一些依赖包装不上。
安装命令:

#在R 的交互命令行运行
if (!require("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install("DESeq2")
BiocManager::install("edgeR")

出现报错如下:

checking for xml2-config... no
Cannot find xml2-config
ERROR: configuration failed for package ‘XML’
* removing ‘/usr/local/lib/R/site-library/XML’
ERROR: dependency ‘RCurl’ is not available for package ‘GenomeInfoDb’
* removing ‘/usr/local/lib/R/site-library/GenomeInfoDb’
ERROR: dependencies ‘XML’, ‘RCurl’ are not available for package ‘annotate’
* removing ‘/usr/local/lib/R/site-library/annotate’
ERROR: dependency ‘GenomeInfoDb’ is not available for package ‘GenomicRanges’
* removing ‘/usr/local/lib/R/site-library/GenomicRanges’
ERROR: dependency ‘annotate’ is not available for package ‘genefilter’
* removing ‘/usr/local/lib/R/site-library/genefilter’
ERROR: dependency ‘annotate’ is not available for package ‘geneplotter’
* removing ‘/usr/local/lib/R/site-library/geneplotter’
ERROR: dependencies ‘GenomicRanges’, ‘GenomeInfoDb’ are not available for package ‘SummarizedExperiment’
* removing ‘/usr/local/lib/R/site-library/SummarizedExperiment’
ERROR: dependencies ‘GenomicRanges’, ‘SummarizedExperiment’, ‘genefilter’, ‘locfit’, ‘geneplotter’ are not available for pac                            kage ‘DESeq2’
* removing ‘/usr/local/lib/R/site-library/DESeq2’

在这里插入图片描述
此时,只能一个个解决了:
首先,针对Cannot find xml2-config ERROR: configuration failed for package ‘XML’ , 这里显示不存在xml的库,可以通过以下命令安装:

#ubuntu系统命令, 如果是centos系统使用yum安装,不过包的名字可能略有区别。
apt-get install -y libxml2-dev  

然后是解决ERROR: dependency ‘RCurl’ is not available for package ‘GenomeInfoDb’, 后面的一堆报错其实也都是由RCurl导致的连环报错,因此手动安装。

#ubuntu系统命令, 如果是centos系统使用yum安装,不过包的名字可能略有区别。
apt install libcurl4-openssl-dev

上面两个安装完后,可以看到大部分依赖包就都可以安装好了,可能还会出现ERROR: dependency ‘locfit’ is not available for package ‘DESeq2’ 的报错。此时往往是由于默认安装的locfit版本的问题导致的,所以通过指定低一点的版本(例如1.5-9.2)即可安装。

#注意:这是在R 的交互命令行上运行的哦
install.packages('https://cran.r-project.org/src/contrib/Archive/locfit/locfit_1.5-9.2.tar.gz',repos = NULL)

至此,DEseq2和edgeR的安装问题就基本上不大了。

当然,可以看到此处前两个问题的安装是需要sudo 权限的,如果没有权限的话建议还是老老实实用conda 安装这两个包吧,简单粗暴。

conda install -c bioconda bioconductor-deseq2
conda install -c bioconda bioconductor-edger
  • 5
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值