Entering edit mode
21 months ago
Swati
•
0
How to add median value to the code for vlnplot:
plot_list <- list()
for (i in gene_list) {
plot_list[[i]] <- FeaturePlot(data, features = i, split.by = "sample", cols = c("grey","blue"))
}
vplot_list <- list()
data$clusternum <- Idents(data)
for (i in gene_list) {
vplot_list[[i]] <- VlnPlot(data, features = i, split.by = "sample", group.by = "clusternum",
pt.size = 0, combine = FALSE)
}
for (i in gene_list) {
ggsave(paste0("/home/mitralab/featureplot/","map_", i, "_0.2_raw.pdf"),plot = plot_list[[i]], width = 11, height = 8.5)
pdf(paste0("/home/mitralab/vlnplot/","vin_", i, "_0.2_raw.pdf"), width = 11, height = 8.5)
print(vplot_list[[i]])
dev.off()
}