DiffBind包现在更新了,但是我还是习惯了用旧的版本,由于我的R语言更新到了4.0,默认安装DiffBind的最新版本,所以我又下载了R语言3.5版本,安装上DiffBind对应的旧版本。
用bioconductor安装DiffBind,要先安装BiocManager,安装的时候一定要联网,否则报错,由于小白用的服务器,这一步就踩坑了,哭唧唧 :(
install.packages("BiocManager")
BiocManager::install("DiffBind")
安装失败:
The downloaded source packages are in
‘/tmp/RtmpV6kPB4/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning messages:
1: In install.packages(...) :
installation of package ‘DESeq2’ had non-zero exit status
2: In install.packages(...) :
installation of package ‘systemPipeR’ had non-zero exit status
3: In install.packages(...) :
installation of package ‘DiffBind’ had non-zero exit status
根据报错要求安装缺失的R包
BiocManager::install("DESeq2")
又安装失败
make: *** [/usr/R-3.5.1/lib/R/etc/Makeconf:168: DESeq2.o] Error 1
ERROR: compilation failed for package ‘DESeq2’
* removing ‘/usr/R-3.5.1/lib/R/library/DESeq2’
The downloaded source packages are in
‘/tmp/RtmpV6kPB4/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages(...) :
installation of package ‘DESeq2’ had non-zero exit status
鼓捣了好久,怎么弄都装不成DESeq2,一怒之下重新安装R 3.5版本,害怕自己安装R又会出现各种问题,因此用conda自动安装。我现在用的服务器conda的默认base环境下已经安装了R 4.0版本,因此重新创建环境安装R 3.5版本,这样也可以有两个版本的R语言,方便自己使用。
用conda来重新安装一个R 3.5版本的参考链接如下:
//www.greatytc.com/p/2e1986296e15
//www.greatytc.com/p/e326912eb41b
conda create -n R3.5 # 创建名为R3.5的环境
source activate R3.5 #激活环境
conda install r-base=3.5.1 #安装R语言,后面必须加版本号,要不然默认会装最新版本
conda deactivate # 退出当前环境
让我们来看一下安装后的结果,conda的默认base环境下,R语言是R 4.0.3版本
进入R3.5环境, R语言是R 3.5.1版本
conda activate R3.5
重新安装好R 3.5.1,再安装DESeq2试试
install.packages("BiocManager")
library('BiocManager', quietly = TRUE)
BiocManager::install("DESeq2")
又安装失败:
The downloaded source packages are in
‘/tmp/RtmpOY7qYy/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning messages:
1: In install.packages(...) :
installation of package ‘Hmisc’ had non-zero exit status
2: In install.packages(...) :
installation of package ‘DESeq2’ had non-zero exit status
3: In install.packages(update[instlib == l, "Package"], l, contriburl = contriburl, :
installation of package ‘stringi’ had non-zero exit status
缺失了好多R包,这次用回到liunx,用conda安装R包试试
conda install -c r r-Hmisc
conda install -c r r-stringi
装好后再去R 3.5.1安装DESeq2
BiocManager::install("DESeq2")
这次是出现了警告:
Warning message:
In install.packages(update[instlib == l, "Package"], l, contriburl = contriburl, :
installation of package ‘stringi’ had non-zero exit status
R包stringi一直装不上,查了好久,有网友解决过该问题
参考链接如下:
http://www.bubuko.com/infodetail-3647996.html
是不能使用默认的ICU库,解决方法如下:
install.packages("stringr", configure.args="--disable-pkg-config")
终于成功安装了stringi包:
** testing if installed package can be loaded
* DONE (stringi)
下载的程序包在
‘/tmp/RtmpRuxXQB/downloaded_packages’里
更新'.Library'里的HTML程序包列表
Making 'packages.html' ... 做完了。
这次再安装DESeq2
BiocManager::install("DESeq2")
装好后载入试试:
library("DESeq2")
又出现警告:
Warning messages:
1: In sample.int(.Machine$integer.max - 1L, 1L) :
'.Random.seed[1]' is not a valid integer, so ignored
2: In stats::runif(1L) :
'.Random.seed[1]' is not a valid integer, so ignored
无语,心好累,这个小白还没有能力解决,有人知道可以来告诉我。由于不影响使用,我选择了无视 ╮(╯_╰)╭
走了这么远不能忘记初心啊,装好DESeq2后去安装DiffBind
BiocManager::install("DiffBind")
安装失败:
Warning messages:
1: In install.packages(...) :
installation of package ‘gplots’ had non-zero exit status
2: In install.packages(...) :
installation of package ‘DiffBind’ had non-zero exit status
回到liunx用conda安装缺失R包gplots
conda install -c r r-gplots
装好后回到R 3.5再安装DiffBind
BiocManager::install("DiffBind")
又报错了,呜呜呜 ~~~ 〒▽〒:
ERROR: dependency ‘amap’ is not available for package ‘DiffBind’
* removing ‘/software/miniconda3/envs/R3.5/lib/R/library/DiffBind’
The downloaded source packages are in
‘/tmp/RtmpRuxXQB/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages(...) :
installation of package ‘DiffBind’ had non-zero exit status
应该是R包amp的默认安装版本太高,手动安装低版本
参考原文链接:https://zhuanlan.zhihu.com/p/129331377
download.file("https://cran.r-project.org/src/contrib/Archive/amap/amap_0.6.tar.gz","amap_0.6.tar.gz")
install.packages("amap_0.6.tar.gz",repos=NULL)
成功安装R包amap
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (amap)
之后再安装DiffBind
BiocManager::install("DiffBind")
成功啦
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (DiffBind)
The downloaded source packages are in
‘/tmp/RtmpRuxXQB/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
载入试试:
library("DiffBind")
和DESeq2一样的警告,啊啊啊~,算了,不影响使用我选择无视,有大神知道可以来告诉小白^_~
Warning messages:
1: In sample.int(.Machine$integer.max - 1L, 1L) :
'.Random.seed[1]' is not a valid integer, so ignored
2: In stats::runif(1L) :
'.Random.seed[1]' is not a valid integer, so ignored