正当其时的单细胞转录组_01.scRNAseq环境配置之R包安装
❝早在2019年的时候,正是scRNAseq单细胞转录组学冉冉升起的时代。
那时候单细胞转录组学的热点,CNS的Paper如雨后春笋般的发发发。
并且生信技能树的创始人--曾健明大佬开创了全网第一个单细胞教程,一切的片段和学习经历仍在眼前。
❝时至今日,scRNAseq虽说是热度已过,但是仍不过时,因此这一系列专题我将其命名为正当其时的单细胞转录组,旨在利用当前单细胞数据海量迸发的时刻,捡起来拾到拾到,记录一下自己的学习过程,实现自己转向医学的想法。同时也提醒自己,学习任何技能(包括单细胞转录组),永远都不会晚!
❝自然而然,优先配置
scRNAseq
的分析环境
之前,我写过一起如何下载R
语言,并且配置R
语言的分析环境,
链接如下:
R和Rstudio的安装与环境配置
再次直接默认为,大家已经配置好了R
及其工作环境。
01.scRNAseq环境配置之R包安装
设置镜像
rm(list = ls())
####----0.设置镜像----####
options("repos"=c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/"))
options(BioC_mirror="https://mirrors.tuna.tsinghua.edu.cn/bioconductor")
安装一系列CRAN上的R包
####----1.安装一系列CRAN上的R包----####
if (!require("tidyverse")) {install.packages("tidyverse",update=F, ask=F)}
if (!require("devtools")) {install.packages("devtools")}
if (!require("data.table")) {install.packages("data.table",update = F,ask = F)}
if (!require("ggrepel")) {install.packages("ggrepel",update = F,ask = F)}
if (!require("clustree")) {install.packages("clustree",update=F, ask=F)}
if (!require("magick")) {install.packages("magick",update=F, ask=F)}
if (!require("harmony")) {install.packages("harmony",update=F, ask=F)}
if (!require("lava")) {install.packages("lava",update=F, ask=F)}
if (!require("patchwork")) {install.packages('patchwork',update=F, ask=F)}
if (!require("cowplot")) {install.packages('cowplot',update=F, ask=F)}
if (!require("timeROC")) {install.packages("timeROC",update = F,ask = F)}
if (!require("survivalROC")) {install.packages("survivalROC",update = F,ask = F)}
if (!require("randomForest")) {install.packages("randomForest",update = F,ask = F)}
if (!require("Hmisc")) {install.packages("Hmisc",update = F,ask = F)}
if (!require("jsonlite")) {install.packages("jsonlite",update = F,ask = F)}
if (!require("ggstatsplot")) {install.packages("ggstatsplot",update = F,ask = F)}
if (!require("corrplot")) {install.packages("corrplot",update = F,ask = F)}
if (!require("R.utils")) {install.packages("R.utils",update = F,ask = F)}
if (!require("hrbrthemes")) {install.packages("hrbrthemes", dependencies = TRUE)}
if (!require("patchwork")) {install.packages('patchwork', dependencies = TRUE)}
if (!require("ggthemes")) {install.packages('ggthemes', dependencies = TRUE)}
if (!require("FactoMineR")) {install.packages("FactoMineR")}
if (!require("factoextra")) {install.packages("factoextra")}
if (!require("RColorBrewer")) {install.packages("RColorBrewer")}
if (!require("Rtsne")) {install.packages("Rtsne")}
if (!require("ggvenn")) {install.packages("ggvenn")}
if (!require("ggtree")) {install.packages("ggtree")}
if(!require("ggtreeExtra")) {install.packages("ggtreeExtra")}
if (!require("tidytree")) {install.packages("tidytree")}
if (!require("ape")) {install.packages("ape")}
if (!require("treeio")) {install.packages("treeio")}
if (!require("ggimage")) {install.packages("ggimage")}
if (!require("NMF")) {install.packages("NMF",update = F,ask = F)}
if (!require("bigmemory")) {install.packages("bigmemory",update = F,ask = F)}
if (!require("caret")) {install.packages("caret",update = F,ask = F)}
安装一系列BiocManager上的R包
####----2.安装一系列BiocManager上的R包----####
if (!require("BiocManager")) {install.packages("BiocManager",update=F, ask=F)}
if (!require("Nebulosa")) {BiocManager::install("Nebulosa",update=F, ask=F)}
if (!require("ComplexHeatmap")) {BiocManager::install("ComplexHeatmap",update=F, ask=F)}
if (!require("org.Hs.eg.db")) {BiocManager::install("org.Hs.eg.db",update=F, ask=F)}
if (!require("AUCell")) {BiocManager::install("AUCell",update=F, ask=F)}
if (!require("GSVA")) {BiocManager::install("GSVA",update=F, ask=F)}
if (!require("limma")) {BiocManager::install("limma",update = F,ask = F)}
if (!require("Biobase")) {BiocManager::install("Biobase",update = F,ask = F)}
if (!require("IRanges")) {BiocManager::install("IRanges",update = F,ask = F)}
if (!require("DO.db")) {BiocManager::install("DO.db",update = F,ask = F)}
if (!require("GO.db")) {BiocManager::install("GO.db",update = F,ask = F)}
if (!require("fgsea")) {BiocManager::install("fgsea",update = F,ask = F)}
if (!require("clusterProfiler")) {BiocManager::install("clusterProfiler",update = F,ask = F)}
if (!require("GEOquery")) {BiocManager::install("GEOquery",update = F,ask = F)}
if (!require("hugene10sttranscriptcluster.db")) {BiocManager::install("hugene10sttranscriptcluster.db",update = F,ask = F)}
if (!require("DOSE")) {BiocManager::install("DOSE",update = F,ask = F)}
if (!require("GSEABase")) {BiocManager::install("GSEABase",update = F,ask = F)}
if (!require("enrichplot")) {BiocManager::install("enrichplot",update = F,ask = F)}
if (!require("RTCGA.clinical")) {BiocManager::install("RTCGA.clinical",update = F,ask = F)}
if (!require("bladderbatch")) {BiocManager::install("bladderbatch",update = F,ask = F)}
if (!require("sva")) {BiocManager::install("sva",update = F,ask = F)}
if (!require("DESeq2")) {BiocManager::install("DESeq2",update = F,ask = F)}
if (!require("edgeR")) {BiocManager::install("edgeR",update = F,ask = F)}
if (!require("pathview")) {BiocManager::install("pathview",update = F,ask = F)}
if (!require("org.Hs.eg.db")) {BiocManager::install("org.Hs.eg.db",update = F,ask = F)}
if (!require("org.Mm.eg.db")) {BiocManager::install("org.Mm.eg.db",update = F,ask = F)}
if (!require("AnnotationHub")) {BiocManager::install("AnnotationHub")}
if (!require("GenomicRanges")) {BiocManager::install("GenomicRanges")}
if (!require("DiffBind")) {BiocManager::install("DiffBind")}
if (!require("WGCNA")) {BiocManager::install("WGCNA", update = F,ask = F)}
单细胞转录组相关的R包
####----3.单细胞转录组相关的R包----####
# SeuratObject 4.1.3
if (!require("SeuratObject")) {install.packages("./scRNAseq_Packages/seurat-object-4.1.3.tar.gz", repos = NULL, type = "source")}
# Seurat 4.3.0
if (!require("Seurat")) {install.packages("./scRNAseq_Packages/seurat-4.3.0.tar.gz", repos = NULL, type = "source")}
# scCustomize 1.1.3
if (!require("scCustomize")) {install.packages("./scRNAseq_Packages/scCustomize-1.1.3.tar.gz", repos = NULL, type = "source")}
# rliger 1.0.1
if (!require("rliger")) {install.packages("./scRNAseq_Packages/liger-1.0.1.tar.gz", repos = NULL, type = "source")}
# UCell 2.4.0
if (!require("UCell")) {install.packages("./scRNAseq_Packages/UCell-2.4.tar.gz", repos = NULL, type = "source")}
历史绘图合集
进化树合集
环状图
散点图
基因家族合集
换一个排布方式:
首先查看基础版热图:
然后再看进阶版热图:
基因组共线性
WGCNA ggplot2版本
其他科研绘图
合作、联系和交流
有很多小伙伴在后台私信作者,非常抱歉,我经常看不到导致错过,请添加下面的微信联系作者,一起交流数据分析和可视化。