Install 3 single-cell R packages under Ubuntu

View Ubuntu system and R version

cat /etc/issue

Generally speaking, the installation of many R packages requires the R version. For example, BiocManager requires R (≥ 3.5.0), but does not require the latest version of the R language.

R to 3.5 is an unprecedented change because of the introduction of Bioconductor version: Release (3.8), so the lower version of R must be updated to 3.5 or more!

Ubuntu is a very stable update. Mine is actually Ubuntu 18. Other versions need to modify the Ubuntu source files. Use the VIM editor to modify the file: /etc/apt/sources.list

**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

Use sudo to install some essential packages

This is just an example. The packages I use are very time-consuming to install. Generally speaking, it takes a long time.

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")
BiocManager::install("KEGG.db",ask = F,update = F)
BiocManager::install(c("GSEABase","GSVA","clusterProfiler"),ask = F,update = F)
BiocManager::install(c("GEOquery","limma","impute"),ask = F,update = F)
BiocManager::install(c("genefu","org.Hs.eg.db","hgu133plus2.db"),ask = F,update = F)
 BiocManager::install(c('shiny','shinydashboard','stringr','DT','ggplot2'),ask = F,update = F)

Install shiny-server and Rstudio-server

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.

Install our protagonist-3 big R package

From a code point of view, it is simple:

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

BiocManager::install("scater")
BiocManager::install("Seurat")
BiocManager::install("monocle")

As for the usage of this R package, it is recommended to read the official website document:

R package installation failure is usually due to missing linux library files

Search and install the necessary system library files by yourself

sudo apt install openjdk-8-jre-headlesssudo apt-get install exfat-utils exfat-fuse 
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

Recommended Posts

Install 3 single-cell R packages under Ubuntu
Install node.js under Ubuntu
Install R4 on ubuntu20
Install mysql under Ubuntu 16.04
Install Thrift under ubuntu 14.10
Install OpenJDK10 under Ubuntu
Install Caffe under Ubuntu 14.04
2018-09-11 Install arduino under Ubuntu
Install ROS under ROS Ubuntu 18.04[2]
Install MySQL under Ubuntu
Install Yarm-PM2 under Ubuntu
Install server-side Shadowsocks under Ubuntu 16.04
Install rgl package under Ubuntu
Install and deploy Gerrit under Ubuntu
Install MySQL under Ubuntu 18.04 (graphic tutorial)
Install JDK1.8 original under Ubuntu Kylin
Small tool: install screenshot tool under ubuntu
Install nodejs and npm under Ubuntu 16.04
How to install R on Ubuntu 20.04
How to install Audacious under Ubuntu
How to install Tensorflow under ubuntu 16.04
Compile and install QEMU under Ubuntu
Install YouCompleteMe plugin for vim under Ubuntu
Install PyTesser under ubuntu 14.04 for OCR recognition
Install Ubuntu with Parallels Desktop under Mac
Three ways to install software under Ubuntu
Install R package on UBUNTU virtual machine
Install utility software collection under Ubuntu system
ubuntu18.04 install python2
ubuntu12.04 install python3
Ubuntu install guide
ubuntu install nodejs
ubuntu 16 install asp.net
ubuntu install leanote
ubuntu install Jenkins
docker install ubuntu
ubuntu install elasticsearch
ubuntu16.0.1 install pagoda
ubuntu18.04 install python
ubuntu 18.04 install teamviewer
ubuntu install sendmail
Install gsl package in R language on ubuntu
How to install vim editor under Linux (Ubuntu 18.04)
How to install R on Ubuntu 18.04 [Quick Start]
The solution to the failure to install .deb under Ubuntu 16.04
How to install gcc compiler faster under Ubuntu
install vscode on ubuntu18
Install mysql-pytho in Ubuntu
ubuntu install zsh terminal
Install Redis on Ubuntu
Install nvtop on Ubuntu 18.04
Install postgresql-10 on Ubuntu 18.04
Install docker on Ubuntu
Install mysql5.7 under CentOS7
Install win7 and archlinux on hard disk under ubuntu
Ubuntu18.04 install opencv 3.2.0 solution
Install nvidia graphics driver under Ubuntu (easy installation method)
Install ActiveMQ under Centos7
Python MySQLd under Ubuntu
Install Docker on ubuntu18.04
Start working under ubuntu