#1、首先第一种方法,简单的基因展示,用Seurat包自带的函数即可展示
library(Seurat)
scRNA <- readRDS(file="~/scRNA.rds")
VlnPlot(scRNA, features = c("Aqp2"))
FeaturePlot(scRNA, features = c("Aqp2"), max.cutoff = 3,cols = c("grey", "red"))
select_genes1 <- c('Aqp2')
DotPlot(scRNA, features = select_genes1,assay = 'RNA',cols = c('blue', 'red'))+RotatedAxis()
#2、第二种方法:Complex_dotplot作图,展示不同样本的基因表达
#首先安装依赖的R包
devtools::install_github("TheHumphreysLab/plot1cell")
bioc.packages <- c("biomaRt","GenomeInfoDb","EnsDb.Hsapiens.v86","GEOquery","simplifyEnrichment","ComplexHeatmap")
BiocManager::install(bioc.packages)
dev.packages <- c("chris-mcginnis-ucsf/DoubletFinder","Novartis/hdf5r","mojaveazure/loomR")
#加载其他R包
library(plot1cell)
library(tidyverse)
library(ggplot2)
library(patchwork)
library(dplyr)
library(Matrix)
library(biomaRt)
#ComplexHeatmap作图
complex_dotplot_single(seu_obj = scRNA, feature = "Aqp2",groups = "orig.ident")
ComplexHeatmap做出来的图精美很多吧!
以上就是今天的小分享,希望对大家有所帮助。