在浪费一些时间之后,我发现了有团队推出了FeaturePlot_scCustom() function, 请移步 https://samuel-marsh.github.io/scCustomize/index.html 根据官网的介绍,代码如下:# Show specific features in each sample.p <- FeaturePlot_scCustom(seurat_object = object1 plots <- lapply(1:length(p), function(i) p[[i]])所以最终的代码如下:# Show specific features in each sample.p <- FeaturePlot_scCustom
(2)scCustomize 修改 p11 <- FeaturePlot_scCustom(seurat_object = sce2, features = "CD3D") p22 <- FeaturePlot_scCustom name = "RdBu"), pt.size = 1, split.by = "sample" ,ncol = 4) (2)scCustomize 中FeaturePlot_scCustom 函数 ,算是修正了这个小bug FeaturePlot_scCustom(seurat_object = sce2, features = "CD3D", split.by = "orig.ident
################ umap4:scCustomize library(viridis) library(Seurat) library(scCustomize) # 绘图 p <- FeaturePlot_scCustom 生成一个存储多个ggplot对象的list p_merge <- list() for(i in 1:length(g)) { # 打印动态 print(g[i]) # 绘图 p_merge[[i]] <- FeaturePlot_scCustom 生成一个存储多个ggplot对象的list p_merge <- list() for(i in 1:length(g)) { # 打印动态 print(g[i]) # 绘图 p_merge[[i]] <- FeaturePlot_scCustom
marker: ################## umap4:scCustomize library(viridis) library(Seurat) library(scCustomize) FeaturePlot_scCustom 现在找不见了,当时还专门在群里问了来着哈哈哈哈) 还可以轻松地修改配色: # 修改颜色 # Set color palette pal <- viridis(n = 10, option = "D") FeaturePlot_scCustom