本文将介绍并实战搭建分析单细胞的环境。
R
R
语言安装(Ubuntu
)在命令行运行下面的命令,如果是root
帐号,请去除sudo
,其他系统参考 > Install R
# update indices
sudo apt update -qq
# install two helper packages we need
sudo apt install --no-install-recommends software-properties-common dirmngr
# add the signing key (by Michael Rutter) for these repos
# To verify key, run gpg --show-keys /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
# Fingerprint: E298A3A825C0D65DFD57CBB651716619E084DAB9
wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
# add the R 4.0 repo from CRAN -- adjust 'focal' to 'groovy' or 'bionic' as needed
sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
# 安装
sudo apt install --no-install-recommends r-base
RStudio
RStudio
安装# 根据自己下载的版本,修改文件名
sudo apt install ./rstudio-*-amd64.deb
RStudio
参考 > RStudio换源
Rpackages
R
包安装BiocManager
# 在 RStudio 中的 Console 中输入下面命令
install.packages("BiocManager")
Bioconductor
源# 在 RStudio 中的 Console 中输入下面命令
chooseBioCmirror()
# 选择 China
Bioconductor
中安装以下 包注意1:当 (”R may ask you if you want to update any old packages by asking Update all/some/none? a/s/n”)请输入
a
, 并回车。注意2:当(“Do you want to install from sources the package which needs compilation? y/n”)请输入
n
, 并回车。
# 在 RStudio 中的 Console 中输入下面命令
# 建议复制,因为大小写敏感
BiocManager::install("SingleCellExperiment")
BiocManager::install("AnnotationHub")
BiocManager::install("ensembldb")
BiocManager::install("multtest")
BiocManager::install("glmGamPoi")
CRAN
中安装以下 包# 在 RStudio 中的 Console 中输入下面命令
# 建议复制,因为大小写敏感
install.packages("tidyverse")
install.packages("Matrix")
install.packages("RCurl")
install.packages("scales")
install.packages("cowplot")
install.packages("Seurat")
install.packages("metap")
# 加载前,请确保上面包安装过程是成功的
library(Seurat)
library(tidyverse)
library(Matrix)
library(RCurl)
library(scales)
library(cowplot)
library(SingleCellExperiment)
library(AnnotationHub)
library(ensembldb)
sessionInfo()
sessionInfo()
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。