Demonstrate how to configure a single-cell data processing environment.
Here is the first Huawei Cloud: https://www.huaweicloud.com/pricing.html#/ecs
It can be compared with other cloud services purchased on demand:
If the system R version is not enough, you need to upgrade
# First delete the old version of R that comes with the system
sudo apt-get--purge remove r-base r-base-core r-base-dev
sudo apt-get--purge remove r-base-core
sudo apt-get--purge remove r-base-dev
# sudo apt-get remove -y 'r-cran-*'
# apt-get remove will delete the software package and retain the software configuration file r
# apt-get purge will clear the software package and software configuration files at the same time
# Then update the Ubuntu source files
## Here, different Ubuntu systems are a bit different:
cat /etc/issue
# 18.04
# Use VIM to add the following code to/etc/apt/sources.list file
# deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
sudo apt-get update
sudo apt-get install -y r-base r-base-core r-base-dev
https://www.rstudio.com/products/shiny/shiny-server/
https://www.rstudio.com/products/rstudio/download-server/
sudo su - \
- c "R -e \"install.packages('shiny', repos='https://mirrors.tuna.tsinghua.edu.cn/CRAN/')\""
sudo apt-get install gdebi-core
wget https://download3.rstudio.org/ubuntu-14.04/x86_64/shiny-server-1.5.9.923-amd64.deb
sudo gdebi shiny-server-1.5.9.923-amd64.deb
wget https://download2.rstudio.org/server/trusty/amd64/rstudio-server-1.2.1335-amd64.deb
sudo gdebi rstudio-server-1.2.1335-amd64.deb
In this case, http://139.9.249.168:3838/ and http://139.9.249.168:8787 are accessible, but the designated ports need to be opened on Huawei Cloud.
How to know the dependency package of the old version of seurat? Run first:
packageurl <-"https://cran.r-project.org/src/contrib/Archive/Seurat/Seurat_2.3.4.tar.gz"
packageurl
install.packages(packageurl, repos=NULL, type="source")
Look at the error report and find the dependent package:
options()$repos
options()$BioC_mirror
options(BioC_mirror="https://mirrors.ustc.edu.cn/bioc/")options("repos"=c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/"))options()$repos
options()$BioC_mirror
# https://bioconductor.org/packages/release/bioc/html/GEOquery.html
if(!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
pkgs=c("ggplot2","cowplot","ROCR","mixtools","lars","ica","tsne","Rtsne","fpc","ape","pbapply","igraph","RANN","dplyr","RColorBrewer","irlba","reshape2","gplots","dtw","SDMTools","plotly","Hmisc","httr","tidyr","ggridges","metap","lmtest","fitdistrplus","png","doSNOW","reticulate","foreach","hdf5r","RcppEigen","RcppProgress")
BiocManager::install(pkgs,ask = F,update = F)
Dependent packages are not all smooth sailing, because the Ubuntu system lacks libraries:
sudo apt-get-y install libcurl4-gnutls-dev libxml2-dev libssl-dev subversion scons libfuse-dev gcc
sudo apt-get-y install libmariadb-client-lgpl-dev libcurl4-openssl-dev libudunits2-dev
After installing the necessary libraries, install the R package:
pkgs=c('curl','openssl','hdf5r','httr','plotly')
BiocManager::install(pkgs,ask = F,update = F)
Google didn't find the answer. Looking at the log again, the library is also missing:
sudo apt-get install libhdf5-dev
Install hdf5r again to succeed.
pkgs='hdf5r'
BiocManager::install(pkgs,ask = F,update = F)
packageurl <-"https://cran.r-project.org/src/contrib/Archive/Seurat/Seurat_2.3.4.tar.gz"
packageurl
install.packages(packageurl, repos=NULL, type="source")
Recommended Posts