环境Ubuntu22/20, R4.1. 已开启科学上网。
第一步,更新服务器环境,进入终端,键入如下命令,
apt-get update
apt install libcurl4-openssl-dev libssl-dev libxml2-dev libcairo2-dev libgtk-3-dev libhdf5-dev libmagick9-dev libcairo2-dev libxt-dev libgsl-dev libgdal-dev
# linux repo :: R repo
# ==============================
# libcairo2-dev :: systemfonts
# libgtk :: textshaping
# libhdf5-dev :: hdf5r
# libmagick9-dev:: magick
# libcairo2-dev libxt-dev :: Cairo
# libgsl-dev :: RcppGSL
# libgdal-dev :: gdal; terra# below all for complete R repo :: magick
apt install libmagick++-dev librsvg2-dev libwebp-dev libpoppler-cpp-dev libtesseract-dev libleptonica-dev tesseract-ocr-eng libfftw3-dev cargo # r-cran-rgdal # below all for complete R repo :: car; FactoMineR
apt install liblapack-dev liblapack3 libopenblas-base libopenblas-dev libnlopt-dev
第二步,装CRAN上的包。进入R语言交互环境,键入如下命令,:
# Bayes
install.packages("scales")
install.packages("ggplot2")
install.packages("ggbeeswarm")
install.packages("viridis")
install.packages("pheatmap")
install.packages("Cairo")
install.packages("ggrepel")
install.packages("systemfonts")
install.packages("textshaping")
install.packages("ragg")
install.packages("ggrastr")
install.packages("systemfonts")# Giotto
install.packages("gmp")
install.packages("ClusterR")
install.packages('devtools')
install.packages('remotes')
install.packages("magick")
install.packages("RcppGSL")
install.packages("FactoMineR")
第三步,装BiocManager上的包。进入R语言交互环境,键入如下命令,
# Bayes
if (!require("BiocManager", quietly = TRUE))install.packages("BiocManager")
BiocManager::install("Rhdf5lib") # need apt install libhdf5-dev
BiocManager::install("rhdf5filters")
BiocManager::install("GenomeInfoDbData") # maybe need a VPN since it is big, about 10mB. Less than 5mB can be download without VPN.
BiocManager::install("BayesSpace")# Giotto
if (!requireNamespace("BiocManager", quietly = TRUE))install.packages("BiocManager")
BiocManager::install("ComplexHeatmap")
Rfast
RcppGSL
RcppZiggurat
第四步,装GIthub上的包。进入R语言交互环境,键入如下命令安装Giotto,(推荐)
library(remotes)
remotes::install_github("RubD/Giotto")
或者不用C编译器装Giotto,(可选)
# compilation problems (gfortran)?
# this version does not require C compilation
remotes::install_github("RubD/Giotto@cless")
测试,
library(Giotto)