R安装monocle3
github 有详细操作方法,但总有些问题
github:https://cole-trapnell-lab.github.io/monocle3/monocle3_docs/#installing-monocle
Required software
Monocle 3 runs in theR statistical
computing environment. You will need R version 3.5 or higher,Bioconductorversion 3.5, andmonocle3 0.1.0 or higher to have access to the latest features.
To install Bioconductor, open R and run:
if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager")BiocManager::install()
Next, install a few Bioconductor dependencies that aren't automatically installed:
BiocManager::install(c('BiocGenerics', 'DelayedArray', 'DelayedMatrixStats', 'limma', 'S4Vectors', 'SingleCellExperiment', 'SummarizedExperiment'))
Optional: If you would like to use the resolution parameter in cluster_cells, you
will also need to install one Python package. This can be done with the following code in R:
install.packages("reticulate")
reticulate::py_install("louvain")
到此处依赖包已经安装完毕,环境准备已经好了
Now, install monocle3 through the cole-trapnell-lab GitHub, execute:
devtools::install_github('cole-trapnell-lab/monocle3')
此时会出现报错
问题1.
configure: GDAL: 1.11.4
checking GDAL version >= 2.0.1... no
configure: error: sf is not compatible with GDAL versions below 2.0.1
ERROR: configuration failed for package ‘sf’
上述所述GDAL版本过低
方法:
wget http://download.osgeo.org/gdal/2.2.3/gdal-2.2.3.tar.gz
tar -zxvf gdal-2.2.3.tar.gz
cd gdal-2.2.3
./configure --prefix=/usr/local/gdal
make &&make install (时间很长,如果多核处理器,可使用make -j 核数)
添加路径
export PATH=$PATH:/usr/local/gdal/bin/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/gdal/lib/
export LD_includ_PATH=$LD_includ_PATH:/usr/local/gdal/include/
export LD_INCLUD_PATH=$LD_INCLUD_PATH:/usr/local/gdal/include/
R内继续执行
devtools::install_github('cole-trapnell-lab/monocle3')
问题2.此时可能继续报错(具体报错截图已丢失,安装如下)
yum install proj*
yum install geos*
安装完毕后继续执行
devtools::install_github('cole-trapnell-lab/monocle3') (不出意外即可安装完成)
总结:缺啥装啥