R语言:plotExprHeatmap绘制表达热图

导读

CATALYST流式细胞数据分析工具包,plotExprHeatmap函数能进行怎样的可视化。

plotExprHeatmap文档:https://rdrr.io/bioc/CATALYST/man/plotExprHeatmap.html

依赖安装CATALYST

BiocManager::install("CATALYST")
library("CATALYST")

一、输入数据

data(PBMC_fs, PBMC_panel, PBMC_md)
R语言:plotExprHeatmap绘制表达热图_第1张图片
sce <- prepData(PBMC_fs, PBMC_panel, PBMC_md)
sce <- cluster(sce) 

二、"first": scale & trim then aggregate

median scaled & trimmed expression by cluster

中位数标准化:https://www.plob.org/article/829.html

# median scaled & trimmed expression by cluster
plotExprHeatmap(sce, 
  by = "cluster_id", k = "meta8",
  scale = "first", q = 0.05, bars = FALSE)
R语言:plotExprHeatmap绘制表达热图_第2张图片

三、"last": aggregate then scale & trim

scale each marker between 0 and 1
after aggregation (without trimming)

plotExprHeatmap(sce, 
  scale = "last", q = 0,
  bars = TRUE, perc = TRUE,
  hm_pal = hcl.colors(10, "YlGnBu", rev = TRUE))
R语言:plotExprHeatmap绘制表达热图_第3张图片

四、"never": aggregate only

raw (un-scaled) median expression by cluster-sample

plotExprHeatmap(sce,
  features = "pp38", by = "both", k = "meta10", 
  scale = "never", row_anno = FALSE, bars = FALSE)
R语言:plotExprHeatmap绘制表达热图_第4张图片

五、Include subset of samples and specific annotations

# include only subset of samples
sub <- filterSCE(sce, 
  patient_id != "Patient",
  sample_id != "Ref3")
 
# includes specific annotations &
# split into CDx & all other markers
is_cd <- grepl("CD", rownames(sce))
plotExprHeatmap(sub, 
  rownames(sce)[is_cd], 
  row_anno = "condition", 
  bars = FALSE)
R语言:plotExprHeatmap绘制表达热图_第5张图片
plotExprHeatmap(sub, 
  rownames(sce)[!is_cd], 
  row_anno = "patient_id",
  bars = FALSE)
R语言:plotExprHeatmap绘制表达热图_第6张图片

你可能感兴趣的:(R语言:plotExprHeatmap绘制表达热图)