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()
相关推荐
捷码小编17 小时前
数据可视化大屏案例落地实战指南:捷码平台7天交付方法论
低代码·数字孪生·数据可视化
捷码小编1 天前
如何选择专业数据可视化开发工具?为您拆解捷码全功能和落地指南!
低代码·数字孪生·数据可视化
善木科研2 天前
读文献先读图:GO弦图怎么看?
机器学习·数据分析·r语言
Tiger Z2 天前
R 语言科研绘图第 55 期 --- 网络图-聚类
开发语言·r语言·贴图
十三画者2 天前
【数据分析】R版IntelliGenes用于生物标志物发现的可解释机器学习
python·机器学习·数据挖掘·数据分析·r语言·数据可视化
搏博3 天前
将图形可视化工具的 Python 脚本打包为 Windows 应用程序
开发语言·windows·python·matplotlib·数据可视化
lishaoan774 天前
实验设计与分析(第6版,Montgomery著,傅珏生译) 第10章拟合回归模型10.9节思考题10.12 R语言解题
回归·r语言·线性回归·残差分析·实验设计与数据分析·回归显著性
南瓜胖胖5 天前
【R语言编程绘图-mlbench】
开发语言·机器学习·r语言
天桥下的卖艺者5 天前
R语言使用随机过采样(Random Oversampling)平衡数据集
开发语言·r语言
@HNUSTer5 天前
Python数据可视化科技图表绘制系列教程(一)
python·数据可视化·科技论文·专业制图·科研图表