R包:plot1cell单细胞可视化包

介绍

plot1cell是用于单细胞数据seurat数据对象的可视化包。

安装

R 复制代码
## You might need to install the dependencies below if they are not available in your R library.
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")
devtools::install_github(dev.packages)
## If you can't get the hdf5r package installed, please see the fix here:
## https://github.com/hhoeflin/hdf5r/issues/94

devtools::install_github("TheHumphreysLab/plot1cell")

library(plot1cell)

导入数据

R 复制代码
iri.integrated <- Install.example() 

使用

R 复制代码
###Prepare data for ploting
circ_data <- prepare_circlize_data(iri.integrated, scale = 0.8 )
set.seed(1234)
cluster_colors<-rand_color(length(levels(iri.integrated)))
group_colors<-rand_color(length(names(table(iri.integrated$Group))))
rep_colors<-rand_color(length(names(table(iri.integrated$orig.ident))))

###plot and save figures
# png(filename =  'circlize_plot.png', width = 6, height = 6,units = 'in', res = 300)
plot_circlize(circ_data,do.label = T, pt.size = 0.01, col.use = cluster_colors ,bg.color = 'white', kde2d.n = 200, repel = T, label.cex = 0.6)
add_track(circ_data, group = "Group", colors = group_colors, track_num = 2) ## can change it to one of the columns in the meta data of your seurat object
add_track(circ_data, group = "orig.ident",colors = rep_colors, track_num = 3) ## can change it to one of the columns in the meta data of your seurat object
#dev.off()
相关推荐
zhangfeng11333 小时前
亲测有效的mem 流行病预测,时间序列预测,r语言做移动流行区间法,MEM流行病阈值设置指南
开发语言·r语言·生物信息
普通网友2 天前
Golang笔记——Interface类型
r语言
maizeman1262 天前
用R语言生成指定品种与对照的一元回归直线(含置信区间)
开发语言·回归·r语言·置信区间·品种测试
兮兮能吃能睡3 天前
R语言模型分析(一)(1)
开发语言·r语言
Tiger Z3 天前
《R for Data Science (2e)》免费中文翻译 (第11章) --- Communication(2)
r语言·数据科学·中文翻译
zhangfeng11333 天前
win7 VSCode 1.70设置R语言的版本,电脑上有两个版本
ide·vscode·r语言
stayhungry_c3 天前
Quarto生成PDF无法正常显示中文的问题
python·macos·r语言·pdf
LEEBELOVED3 天前
R语言基于Rselenium模拟浏览器抓取DatabaseCommons数据-连载NO.04
r语言
追风少年ii3 天前
脚本优化--visium的细胞niche与共定位(R版本)
数据分析·r语言·空间·单细胞
Tiger Z4 天前
R 语言科研绘图第 80 期 --- 词云图
r语言·论文·科研·绘图·研究生