mem_gene_path_heatmap | R Documentation |
MultiEnrichment Heatmap of Genes and Pathways
mem_gene_path_heatmap(
mem,
genes = NULL,
sets = NULL,
min_gene_ct = 1,
min_set_ct = 1,
min_set_ct_each = 4,
column_fontsize = NULL,
column_cex = 1,
row_fontsize = NULL,
row_cex = 1,
row_method = "binary",
column_method = "binary",
enrich_im_weight = 0.3,
gene_im_weight = 0.5,
gene_annotations = c("im", "direction"),
annotation_suffix = c(im = "hit", direction = "dir"),
simple_anno_size = grid::unit(6, "mm"),
cluster_columns = NULL,
cluster_rows = NULL,
cluster_row_slices = TRUE,
cluster_column_slices = TRUE,
name = NULL,
p_cutoff = mem$p_cutoff,
p_floor = 1e-10,
row_split = NULL,
column_split = NULL,
auto_split = TRUE,
column_title = LETTERS,
row_title = letters,
row_title_rot = 0,
colorize_by_gene = TRUE,
na_col = "white",
rotate_heatmap = FALSE,
colramp = "Reds",
column_names_max_height = grid::unit(180, "mm"),
column_names_rot = 90,
show_gene_legend = FALSE,
show_pathway_legend = TRUE,
show_heatmap_legend = 8,
use_raster = FALSE,
seed = 123,
verbose = FALSE,
...
)
mem |
|
genes |
character vector of genes to include in the heatmap, all other genes will be excluded. |
sets |
character vector of sets (pathways) to include in the heatmap, all other sets will be excluded. |
min_gene_ct |
minimum number of occurrences of each gene across the pathways, all other genes are excluded. |
min_set_ct |
minimum number of genes required for each set, all other sets are excluded. |
min_set_ct_each |
minimum number of genes required for each set, required for at least one enrichment test. |
column_fontsize , row_fontsize |
|
row_method , column_method |
character string of the distance method
to use for row and column clustering. The clustering is performed
by |
enrich_im_weight |
|
gene_im_weight |
|
gene_annotations |
|
annotation_suffix |
|
name |
character value passed to |
p_cutoff |
numeric value of the enrichment P-value cutoff,
above which P-values are not colored, and are therefore white.
The enrichment P-values are displayed as an annotated heatmap
at the top of the main heatmap. Any cell that has a color meets
at least the minimum P-value threshold. This value by default
is taken from input |
column_split , row_split |
optional arguments passed to
|
column_title |
optional character string with title to display above the heatmap. |
row_title |
optional character string with title to display
beside the heatmap. Note when |
row_title_rot |
|
colorize_by_gene |
|
na_col |
|
rotate_heatmap |
|
colramp |
|
column_names_max_height |
|
column_names_rot |
|
show_gene_legend , show_pathway_legend |
|
show_heatmap_legend |
|
use_raster |
|
seed |
|
verbose |
|
... |
additional arguments are passed to |
This function takes the mem
list output from
multiEnrichMap()
and creates a gene-by-pathway incidence
matrix heatmap, using ComplexHeatmap::Heatmap()
.
It uses three basic sources of data to annotate the heatmap:
mem$memIM
the gene-set incidence matrix
mem$geneIM
the gene incidence matrix by dataset
mem$enrichIM
the pathway enrichment P-value matrix by dataset
It will try to estimate a reasonable number of column and row
splits in the dendrogram, based solely upon the number of
columns and rows. These guesses can be controlled with argument
column_split
and row_split
, respectively.
When pathways are filtered by min_gene_ct
, min_set_ct
,
and min_set_ct_each
, the order of operations is as follows:
min_set_ct_each
, min_set_ct
- these filters are applied
before filtering genes, in order to ensure all genes are present
from the start.
min_gene_ct
- genes are filtered after pathway filtering,
in order to remove pathways which were not deemed "significant"
based upon the required number of genes. Only after those pathways
are removed can the number of occurrences of each gene be judged
appropriately.
Heatmap
object defined in ComplexHeatmap::Heatmap()
, with
additional attributes:
"caption"
- a character
string with caption that described
the data dimensions and clustering parameters.
"caption_legendlist"
- a ComplexHeatmap::Legends
object suitable
to be included with Heatmap legends using
draw(hm, annotation_legend_list=caption_legendlist)
, or
drawn with grid::grid.draw(caption_legendlist)
.
"draw_caption"
- a function
that will draw the caption in the
bottom-left corner of the heatmap by default, to be called
with attr(hm, "draw_caption")()
or draw_caption()
.
In addition, the returned object can be interrogated with two helper functions that help define the row and column clusters, and the exact order of labels as they appear in the heatmap.
jamba::heatmap_row_order()
- returns a list
of vectors of
rownames in the order they appear in the heatmap, with list names
defined by row split.
jamba::heatmap_column_order()
- returns a list
of vectors of
colnames in the order they appear in the heatmap, with list names
defined by row split.
Other jam plot functions:
adjust_polygon_border()
,
grid_with_title()
,
jam_igraph()
,
mem_enrichment_heatmap()
,
mem_legend()
,
mem_multienrichplot()
,
mem_plot_folio()
,
plot_layout_scale()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.