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()
相关推荐
杨超越luckly20 小时前
HTML应用指南:利用POST请求获取全国极氪门店位置信息
python·arcgis·html·数据可视化·门店数据
diegoXie21 小时前
PCRE Lookaround (零宽断言)总结(R & Python 通用)
开发语言·python·r语言
itwangyang5202 天前
在 GitHub 上生成和配置个人访问令牌(PAT),并将其用于 R 环境中的凭证管理和包安装。
开发语言·r语言·github
irises2 天前
从零实现2D绘图引擎:6.动画系统的实现
前端·数据可视化
irises2 天前
从零实现2D绘图引擎:5.5.简单图表demo
前端·数据可视化
irises2 天前
从零实现2D绘图引擎:5.鼠标悬停事件
前端·数据可视化
irises2 天前
从零实现2D绘图引擎:4.矩形与文本的实现
前端·数据可视化
irises2 天前
从零实现2D绘图引擎:2.Storage和Painter的实现
前端·数据可视化
irises2 天前
从零实现2D绘图引擎:3.交互系统(Handle)的实现
前端·数据可视化
irises2 天前
从零实现2D绘图引擎:1.实现数学工具库与基础图形类
前端·数据可视化