探序基因腫瘤研究院 整理
本作者系統(tǒng)為centos
1. 安裝JAGS
下載JAGS-4.3.0.tar.gz,
./configure
出現(xiàn)報(bào)錯:
checking if sgemm_ is being linked in already... no
checking for ATL_xerbla in -latlas... no
checking for sgemm_ in -lblas... no
checking for sgemm_ in -lmkl... no
checking for sgemm_ in -framework vecLib... no
checking for sgemm_ in -lcxml... no
checking for sgemm_ in -ldxml... no
checking for sgemm_ in -lscs... no
checking for sgemm_ in -lcomplib.sgimath... no
checking for sgemm_ in -lblas... (cached) no
checking for sgemm_ in -lblas... (cached) no
configure: error: "You need to install the LAPACK library"
于是下載:https://www.netlib.org/lapack
安裝lapack,BLAS庫等方法參照:https://blog.csdn.net/weixin_41277663/article/details/131379753
將libxxx.a文件等都復(fù)制到自己的文件夾下。把這個目錄配置到環(huán)境變量中,./configure仍就configure: error: "You need to install the LAPACK library"更米,./configure --with-blas=/xxx --with-lapack=/xxx 指定了目錄铁瞒,仍舊報(bào)錯抽莱。將librefblas.a修改成:libblas.a才可以衅胀。
如果遇到報(bào)錯:relocation R_X86_64_32 against `.rodata' can not be used when making a shared object冯丙,那么要以./configure --with-blas=/xxx --with-lapack=/xxx這種形式指定LAPACK庫地址银锻,編譯時會增加-fPIC參數(shù)永品。
或者簡單的解決方案:
在系統(tǒng)/usr/lib64目錄中,發(fā)現(xiàn):libblas.so.3.8.0击纬,liblapack.so.3.8.0等鼎姐。于是增加一個軟連接,ln -s libblas.so.3.8.0 libblas.a更振,ln -s liblapack.so.3.8.0 liblapack.a
再./configure --with-blas=/usr/lib64 --with-lapack=/usr/lib64炕桨,make,make install肯腕,成功
2. 安裝R包献宫,rjags
Sys.setenv(LD_LIBRARY_PATH="/usr/local/lib64/JAGS/modules-4/")
Sys.setenv(LD_RUN_PATH="/usr/local/lib64/JAGS/modules-4/")
Sys.setenv(PKG_CONFIG_PATH="/usr/local/lib64/pkgconfig")install.packages("rjags",configure.args="--enable-rpath")
參考:簡書-CentOS7和Rstudio server安裝LAPACK library、JAGS实撒、rjags 和 inferCNV
rjags包的源代碼:
https://cran.ms.unimelb.edu.au/web/packages/rjags/index.html
3. 安裝R包infercnv
if(!require("BiocManager",quietly=TRUE))
??? install.packages("BiocManager")
BiocManager::install("infercnv")