一、官方提供的安装方法
#详细的安装教程参考官网
https://github.com/aertslab/SCENIC
安装代码如下
在安装SCENIC之前,请按照以下代码安装一些依赖包:
if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager")BiocManager::version()# If your bioconductor version is previous to 3.9, see the section bellow## RequiredBiocManager::install(c("AUCell", "RcisTarget"))BiocManager::install(c("GENIE3")) # Optional. Can be replaced by GRNBoost## Optional (but highly recommended):# To score the network on cells (i.e. run AUCell):BiocManager::install(c("zoo", "mixtools", "rbokeh"))# For various visualizations and perform t-SNEs:BiocManager::install(c("DT", "NMF", "pheatmap", "R2HTML", "Rtsne"))# To support paralell execution (not available in Windows):BiocManager::install(c("doMC", "doRNG"))# To export/visualize in http://scope.aertslab.orgif (!requireNamespace("devtools", quietly = TRUE)) install.packages("devtools")devtools::install_github("aertslab/SCopeLoomR", build_vignettes = TRUE)
# 这边安装RcisTarget、SCopeLoomR时出现了一点小报错
R ERROR: configuration failed for package ‘arrow’
具体错误我没记录 ,大概意思是arrow找不到编译,但是我发现不影响后面使用。
然后我上去一顿嘎嘎整
conda install -c conda-forge --strict-channel-priority r-arrow
sudo apt-get install libcurl4-gnutls-dev
sudo apt-get install libxml2-dev
sudo apt install -y cmake libcurl4-openssl-dev libssl-dev
sudo apt install cmake
cmake -version
然后进入到我存放包的目录/home/lfr/R/x86_64-pc-linux-gnu-library/4.1
wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.13/src/hdf5-1.8.13.tar.bz2
chmod a+x hdf5-1.8.13.tar.bz2
tar xjf hdf5-1.8.13.tar.bz2
cd hdf5-1.8.13/
./configure --prefix=$HOME/.local/bin/hdf5-1.8.13
make && make install
export PATH=$HOME/.local/bin/hdf5-1.8.13/bin:$PATH
export LD_LIBRARY_PATH=$HOME/.local/bin/hdf5-1.8.13/lib:$LD_LIBRARY_PATH
sudo apt-get install libhdf5-dev
##(这上面几步里面也包含了R包hdf5r安装失败的解决【https://gitee.com/zedeel/simplenv/issues/I1FZ79】)
#######假装这是一条分割线########
检查一下核心依赖包的版本,并确保版本符合以下要求:
AUCell >=1.4.1 (minimum 1.2.4);
RcisTarget>=1.2.0 (minimum 1.0.2);
GENIE3>=1.4.0 (minimum 1.2.1).
packageVersion("AUCell")
packageVersion("RcisTarget")
packageVersion("GENIE3")
二、上面已经解决了SCENIC依赖包的问题,下面接着按照官方教程安装SCENIC
if (!requireNamespace("devtools", quietly=TRUE))install.packages("devtools")
devtools::install_github("aertslab/SCENIC")
packageVersion("SCENIC")
#这边我尝试了好多方法,都无法安装
#最后我使用了下面这个方法,把包下载到本地进行安装,成功解决了问题
https://github.com/aertslab/SCENIC/releases/tag/v1.1.2
下载安装包
上传到服务器用来存放包的目录
/home/lfr/R/x86_64-pc-linux-gnu-library/4.1
##==下载SCENIC_1.1.2.tar.gz 上传到服务器/home/lfr/R/x86_64-pc-linux-gnu-library/4.1
##==最后从本地安装,RStudio serverj界面右下角的install,选择从本地安装包进行安装,最后就安装成功了
这里会出现一个依赖包安装的问题,单独安装一下就行 install.packages("dynamicTreeCut")
(本篇的内容就先到这里,水平有限,有错误的地方,欢迎大家批评指正!)
感谢