Description Usage Arguments Value
View source: R/Heatmap_Output.R
生成cluster的Heatmap
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 | draw_expr_heatmaps(
xdata,
cluster_stat = NULL,
all_markers = NULL,
groups = NULL,
major_cond = NULL,
summerise_method = NULL,
cluster_name = NULL,
groups_to_show = NULL,
cluster_id = NULL,
trans_method = "simpleAsinh",
Rowv = T,
Colv = T,
output_dir = paste0("Cluster_Expression_Heatmap"),
use_marker_col = "heatmap",
density_plot_fill_by = "expression",
density_plot_color_by = "none",
density_bkgd_fill_by = "none",
facet_by_groups = F,
expression_color_set = colorRampPalette(rev(brewer.pal(n = 7, name = "RdYlBu"))),
marker_color_set = rainbow,
group_color_set = brewer_color_sets,
cluster_color_set = dif_seq_rainbow,
show_abundance_barplot = TRUE,
output_density_plot = TRUE,
density_line_size = 2,
density_fill_alpha = 0.8,
density_plot_free_x = F,
density_plot_xlim = NULL,
strip_label_size = 15
)
|
xdata |
包含原始表达数据及FileID的data frame,取值combinded_data_raw |
cluster_stat |
stat_by_cluster的结果 |
all_markers |
从 “all_markers.csv”读入的dataframe,包含marker的选择信息 |
groups |
groups 从“all_sample.csv”中读入的dataframe,包含实验分组信息(也就是元数据) |
major_cond |
在groups所提供的各种分组中,选择一种做为统计差异的依据,例如"Tissue_Type" |
summerise_method |
统计过程中使用的合计方法:有"mean"或者 "median"两种 |
cluster_name |
统计所依据的聚类参数名称,例如"PhenoGraph"、"metacluster" |
groups_to_show |
想要展示部分组时,指定展示组的组名,默认为NULL,展示所有组 |
cluster_id |
指定输出cluster的id,例如:如果要输出前五个cluster,cluster_id=c(1:5); 如果要输出全部cluster,保持其默认值NULL即可。 |
trans_method |
数据转化方式,有五种: "CytofAsinh",CytofAsinh转换所有表达数据; "simpleAsinh",simpleAsinh转换所有表达数据,(公式为asinh(x/5)),这是默认设置; "0_to_Max",所有Marker的信号强度除以最大值,线性转换,通过除以各通道信号的最大值把数值scale到0~1; "Min_to_Max",线性转换,最小值转换成0,最大值转换成1,最大限度展现population的表达差异; "simpleAsinh_0_to_Max" 先Arcsinh转换,然后除以各通道信号的最大值把数值scale到0~1范围内; "simpleAsinh_Min_to_Max" 先Arcsinh转换,然后最小值转换成0,最大值转换成1,最大限度展现population的表达差异; 注意:为方便观察,density plot x轴数据固定使用simpleAsinh,不受该参数影响 |
Rowv, Colv |
逻辑变量,分别设定行和列是否聚类 |
output_dir |
输出数据文件夹名称 |
use_marker_col |
字符串,取值为all_markers的一个列名,用来手动指定all_markers的列作为marker选择的依据,默认,"heatmap" |
density_plot_fill_by |
决定density plot填充颜色所依据的参数:取值有 "markers","clusters","groups","expression","none"(注意,离散参数名后面有s) |
density_plot_color_by |
决定density plot线条颜色所依据的参数:取值有 "markers","clusters","groups","expression","none"(注意,离散参数名后面有s) |
density_bkgd_fill_by |
决定density plot背景颜色所依据的参数,取值有两种方式,一种保持与density_plot_fill_by相同的值,一种直接输入R能识别的颜色名称例如:"grey" |
facet_by_groups |
逻辑变量,TRUE时,将groups_to_show中的组别输出独立的heatmap,FALSE时,将所有组数据输出成单个的Heatmap |
expression_color_set |
调色板或任意其他颜色函数,指定expression通道的颜色设置 |
marker_color_set |
调色板或任意其他颜色函数,指定markers通道的颜色设置 |
group_color_set |
调色板或任意其他颜色函数,指定groups通道的颜色设置 |
cluster_color_set |
调色板或任意其他颜色函数,指定clusters通道的颜色设置 |
show_abundance_barplot |
逻辑变量,决定是否在heatmap上显示abundent barplot |
output_density_plot |
逻辑变量,决定是否显示density plot |
density_line_size |
density plot参数,设置线条粗细,默认2 |
density_fill_alpha |
density plot参数,设置图片透明度,默认0.8(取值0~1之间,数值越大透明度越低) |
density_plot_free_x |
density plot参数,布尔变量,决定是否每幅小图可以根据其包含数据自行决定x标轴范围,默认为F |
density_plot_xlim |
density plot参数,设置x轴的范围,取值为一个vector,例如c(0,5) 就是指定x轴范围是0~5,注意,该参数仅在density_plot_free_x=F的时候有效 |
strip_label_size |
density plot参数,设置每个density plot小图上面的标签(包含cluster和marker名称)的字体大小 |
none
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.