phen_block: phen_block

Description Usage Arguments

View source: R/phen_plot.R

Description

phen_block

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
34
35
36
37
38
39
40
41
phen_block(
  pav_obj,
  phen_stat_res,
  phen_name,
  add_gene_info = "p",
  p_threshold = 0.01,
  adjust_p = T,
  only_show_significant = T,
  flip = F,
  per_colors = c("#1E90FF", "#EE6363"),
  na_col = "gray",
  cell_border_color = NA,
  gene_info_color_list = NULL,
  cluster_rows = T,
  clustering_distance_rows = "euclidean",
  clustering_method_rows = "complete",
  row_dend_side = "left",
  row_dend_width = grid::unit(5, "mm"),
  row_sorted = c(),
  show_row_names = F,
  row_names_side = "right",
  row_names_size = 10,
  row_names_rot = 0,
  cluster_columns = T,
  clustering_distance_columns = "euclidean",
  clustering_method_columns = "complete",
  column_dend_side = "top",
  column_dend_height = grid::unit(5, "mm"),
  column_sorted = c(),
  show_column_names = F,
  column_names_side = "bottom",
  column_names_size = 10,
  column_names_rot = 90,
  anno_param_gene = list(show = T, width = 5, border = FALSE, name_size = NULL,
    name_rot = 90, name_side = "bottom"),
  legend_side = "right",
  legend_title = list(pav = "PAV", type = "gene"),
  legend_title_size = NULL,
  legend_text_size = NULL,
  legend_grid_size = grid::unit(4, "mm")
)

Arguments

pav_obj

A PAV object.

phen_stat_res

The result from phen_stat.

phen_name

The name of phenotype used for grouping.

add_gene_info

A character vector of 'gene_info' names. The p_value/p_adjusted will also be added to 'gene_info'.

p_threshold

The threshold of p_value/p_adjusted.

adjust_p

A logical value indicating whether adjust p_value.

only_show_significant

A logical value indicating whether only show p_value/p_adjusted that satisfies the condition.

flip

A logical value indicating whether flip cartesian coordinates.

per_colors

A vector of colors or a color mapping function for absence percentage, pass to Heatmap.

na_col

A string of color for NA values.

cell_border_color

'NA' or a string of color for the border of cells.

gene_info_color_list

A list contains named vector of colors for 'gene_info' annotation. e.g. list(source = c("reference" = "red", "novel" = "blue"), length = c("orange", "red"))

cluster_rows

A logical value indicating whether perform clustering on rows.

clustering_distance_rows

Method of measuring distance when clustring on rows, pass to dist.

clustering_method_rows

Method to perform hierarchical clustering on rows, pass to hclust.

row_dend_side

The position of the row dendrogram ("left", "right").

row_dend_width

A unit object for the width of the row dendrogram.

row_sorted

A vector of sorted row names. It only works when 'cluster_rows = F'.

show_row_names

A logical value indicating whether show row names.

row_names_side

The position of row names ("left", "right").

row_names_size

The size of row names.

row_names_rot

The rotation of row names.

cluster_columns

A logical value indicating whether perform clustering on columns.

clustering_distance_columns

Method of measuring distance when clustring on columns, pass to dist.

clustering_method_columns

Method to perform hierarchical clustering on columns, pass to hclust.

column_dend_side

The position of the column dendrogram ("top", "bottom").

column_dend_height

A unit object for the height of the column dendrogram.

column_sorted

A vector of sorted column names. It only works when 'cluster_columns = F' and 'split_block = F'.

show_column_names

A logical value indicating whether show column names.

column_names_side

The position of column names ("top", "column").

column_names_size

The size of column names.

column_names_rot

The rotation of column names.

anno_param_gene

A list contains parameters for the phenotype annotation. These can be any of the following: "show", "width", "border", "name_size", "name_rot" and "name_side".

legend_side

The position of legend ("top", "bottom", "right", "left").

legend_title

The text for the legend title.

legend_title_size

The size of legend title.

legend_text_size

The size of legend item labels.

legend_grid_size

A unit object for the size of legend grid.


xiaonui/vPan documentation built on Dec. 23, 2021, 6:17 p.m.