pancreas.integrated <- RunUMAP(pancreas.integrated, dims = 1:30) plots <- DimPlot(pancreas.integrated, group.by = c("tech", "celltype"), combine = FALSE) plots <- lapply(X = plots, FUN = function(x) x + theme(legend.position = "top") + guides(color = guide_legend(nrow = 3, ...
(object = pbmc_small, split.by = 'ident') #' DimPlot <- function( object, dims = c(1, 2), cells = NULL, cols = NULL, pt.size = NULL, reduction = NULL, group.by = NULL, split.by = NULL, shape.by = NULL, order = NULL, shuffle = FALSE, seed = 1, label = FALSE, ...
sample_seob<-function(obj,group.by="seurat_clusters",sp.size=NULL,diet="true",sp.total=1000){all<-objif(diet=="true"){all<-DietSeurat(all)}if(is.null(sp.size)){nlen<-length(unique(all@meta.data[,group.by]))sp.size<-ceiling(sp.total/nlen)}seob_list<-list()i<-1for(scinu...
library(dplyr) max2<- pbmc.markers %>% group_by(cluster) %>% slice_max(n = 2, order_by = avg_log2FC) max2 #对Makers的表达情况进行可视化; VlnPlot(pbmc, features = max2$gene[c(1,5,7,9)],ncol=2) #绘制山峦图; RidgePlot(pbmc, features = c("LYZ","CCL5","IL32","PTPRCAP"...
umap1<-DimPlot(pbmc_filt,reduction ="umap",group.by ="orig.ident",pt.size=1.2) umap2<-DimPlot(pbmc_filt,reduction ="umap",pt.size=1.2,label = TRUE) p<-umap1 + umap2 ggsave(file="Result/umap.png",dpi=300,width=14,height=6) ...
group_by(cluster) %>% top_n(n = 1, wt = avg_log2FC) -> top1 #表达量分组图 p <- VlnPlot(pbmc, features = top1$gene) ggsave(filename = 'FIG/Top1DEG_VlnPlot.png',width = 10,height = 8) #降维图里展示表达量 p <- FeaturePlot(pbmc, features = top1$gene, reduction = "umap...
(obj,resolution=2,cluster.name="rpca_clusters")obj<-RunUMAP(obj,reduction="integrated.rpca",dims=1:30,reduction.name="umap.rpca")p2<-DimPlot(obj,reduction="umap.rpca",group.by=c("Method","CellType","rpca_clusters"),combine=FALSE,label.size=2)wrap_plots(c(p1,p2),ncol=2,byrow=F)...
2、UMAP p1<-DimPlot(pancreas.integrated,reduction="umap",group.by="tech")p2<-DimPlot(pancreas.integrated,reduction="umap",group.by="celltype",label=TRUE,repel=TRUE)+NoLegend()plot_grid(p1,p2) plots<-DimPlot(pancreas.integrated,group.by=c("tech","celltype"),combine=FALSE)plots<-lapply(X...
p1<-DimPlot(pbmc.rna,group.by="seurat_annotations",label=TRUE)+NoLegend()+ggtitle("RNA")p2<-DimPlot(pbmc.atac,group.by="orig.ident",label=FALSE)+NoLegend()+ggtitle("ATAC")p1+p2 识别数据集之间的锚点 为了识别 scRNA-seq 和 scATAC-seq 实验之间的"锚点",我们首先利用 Signac 包中的GeneActivi...
p1 <- DimPlot(pancreas.integrated, reduction = "umap", group.by = "tech") p2 <- DimPlot(pancreas.integrated, reduction = "umap", group.by = "celltype", label = TRUE, repel = TRUE) + NoLegend() plot_grid(p1, p2) 1. 2.