R language 4_ install BayesSpace

Environment Ubuntu22/20, R4.1

You might get an error saying that your version of R doesn't have this library, but it doesn't. This is a library on Bioconductor.

At the same time, I also encountered this problem, ERROR: configuration failed for package 'systemfonts' and many other similar problems, the following methods can be solved together.

The first step is to update the server environment, enter the terminal, and type the following command,

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
# linux repo 	:: R repo
# ==============================
# libcairo2-dev :: systemfonts
# libgtk 		:: textshaping
# libhdf5-dev 	:: hdf5r
# libmagick9-dev:: magick
# libcairo2-dev libxt-dev :: Cairo

The second step is to install the package on CRAN. Enter the R language interactive environment and type the following command:

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")

The third step is to install the package on BiocManager. Enter the R language interactive environment and type the following command,

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")

After installation, test,

library(BayesSpace)

Please add a picture description

Guess you like

Origin blog.csdn.net/qq_43369406/article/details/132146306