draw_abundance_report: 画各个Cluster Abundance的boxplot,Heatmap

Description Usage Arguments Value

Description

对cluster进行统计分析时,过少的细胞数有可能造成统计结果的不准确,本函数统计分析方法分析每个cluster的绝对数量是否符合要求

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
draw_abundance_report(
  cluster_stat,
  cluster_id = NULL,
  color_cond = NULL,
  subgroup_cond = NULL,
  group_colorset = brewer_color_sets,
  output_dir = paste0("Abundance_Report"),
  heatmap_ctrl,
  heatmap1_color = colorRampPalette(c("black", "yellow")),
  heatmap2_color = colorRampPalette(c("blue", "white", "red")),
  Rowv = T,
  Colv = F,
  dendrogram = "row",
  hide_ctrl = NULL,
  boxplot_line_width = 1,
  comparisons = NULL,
  comparisons.stat.paired = NULL,
  comparisons.stat.method = NULL,
  show_pvalues = TRUE,
  barplot_clustered = TRUE,
  barplot_direction = "v",
  barplot_annotation = TRUE,
  cluster_colorset = dif_seq_rainbow,
  group_seq = NULL,
  groups_to_show = NULL,
  stat.paired = NULL,
  stat.method = NULL,
  set.equal.var = NULL,
  conf.level = NULL,
  p.adjust.method = NULL,
  use_shiny_para = FALSE,
  outputfig = TRUE
)

Arguments

cluster_stat

stat_by_cluster()函数生成的list数据

cluster_id

指定输出cluster的id,例如:如果要输出前五个cluster,cluster_id=c(1:5); 如果要输出全部cluster,保持其默认值NULL即可。

color_cond

指定依据哪个条件进行着色

subgroup_cond

heatmap_ctrl对应的组所在的列名

group_colorset

组别的配色方案

output_dir

输出数据文件夹名称,默认"Abundance_boxplot"

heatmap_ctrl

指定heatmap、boxplot的control组名称,例如“PBMC”

heatmap1_color

指定Cluster Percentage heatmap配色方案

heatmap2_color

指定1.2_Change of Cluster Percentage和1.3_log2_Percentage ratio heatmap配色方案

Rowv, Colv

逻辑变量,分别heatmap设定行和列是否聚类

dendrogram

显示heatmap行或者列的树形图,"both","row","column","none"

hide_ctrl

在图片中隐藏对照组(仅用于多个ctrl的情况)

boxplot_line_width

boxplot线宽

comparisons

list变量,用来指定需要显示p值的组别,例如list(c("PBMC","Biopsy"),c("PBMC","Tumor"))就是要分别显示PBMC与Biopsy和Tumor两组之间的p值;如果comparisons=NULL,则显示各组与对照组的p值

comparisons.stat.paired

指定组别是否为成对样本

comparisons.stat.method

指定组别的p值计算方法

show_pvalues

逻辑变量,TRUE或者FALSE,决定是否在图上显示p Value

barplot_clustered

逻辑变量,决定丰度直方图是否依照各个cluster比例聚类,默认为TRUE

barplot_direction

取值为"v"或者"h",分别决定直方图的方向为竖直或者水平

barplot_annotation

逻辑变量,是否注释组别,默认为TRUE

cluster_colorset

barplot中cluster的颜色方案 如使用统计默认参数,以下参数无需设置

group_seq

设置各组顺序,格式实例: group_seq=c("PBMC","Biopsy"),注:括号内为各组名称;如不设置,默认与总体参数保持一致

groups_to_show

想要展示部分组时,指定展示组的组名,默认为NULL,展示所有组

stat.paired

逻辑变量,TRUE或者FALSE,表示是否是成对检验(如有多个control,则只subgroup之内是否是成对样本)

stat.method

一个字符串,指定统计分析的方法,取值有三种:"auto",“t-test",“wilcox-test”,当取值为"auto"时,即为测试模式,会对数据进行正态分布和方差齐性测试,自动选择适合的统计方法,为正式分析过程中的统计方法选择提供依据。

set.equal.var

一个字符串,指定方差齐性,取值有三种:"TRUE","FALSE"(默认),"auto",选择"auto"时即可以进行方差齐性测试;

conf.level

显著性水平,默认0.95,(即p<0.05为显著)

p.adjust.method

对p值进行校正的方法:"BH"(默认,推荐) "holm", "hochberg", "hommel", "bonferroni","BY","fdr", "none"

Value

a list containing ggplot2 objects


XinleiChen001/cytofexplorer documentation built on Oct. 31, 2020, 5:59 p.m.