Internal helper function that contains the shared logic for creating gene heatmaps.
.plot_gene_heatmap_impl(
expression_matrix,
strata,
gene_ids,
num_strata,
genes = NULL,
top_p = NULL,
top_k = 30,
std = TRUE,
cluster_rows = FALSE,
cluster_cols = FALSE,
show_gene_age = TRUE,
show_gene_ids = FALSE,
gene_annotation = NULL,
gene_annotation_colors = NULL,
annotation_col = NULL,
annotation_col_colors = NULL,
...
)A ggplot object showing the gene expression heatmap
Matrix of expression values (genes x samples)
Factor vector of gene phylostrata
Character vector of all gene IDs in the dataset (used for phylostratum mapping)
Integer number of phylostrata
Character vector of specific genes to plot. If NULL, uses top dynamic genes
Proportion of most dynamic genes to include (default: NULL). Ignored if top_k is specified.
Absolute number of top genes to select (default: 30). Takes precedence over top_p.
Logical indicating whether to use standardized expression values (default: TRUE)
Logical indicating whether to cluster genes/rows (default: FALSE)
Logical indicating whether to cluster identities/columns (default: FALSE)
Logical indicating whether to show gene age as row annotation (default: TRUE)
Logical indicating whether to show gene names (default: FALSE)
Data frame with custom gene annotations, rownames should match gene IDs (default: NULL)
Named list of color vectors for custom gene annotations (default: NULL)
Data frame with column annotations (default: NULL)
List of colors for column annotations (default: NULL)
Additional arguments passed to pheatmap::pheatmap