It takes 3 data.frames with expression values regardless the strand, sense or antisense (i.e., featureCounts -s 0|1|2) and draws a heatmap with the expression values and an hotizontal barplot with the expression sense and antisense.
expressionHeatmapBar(
expr,
expr_sense,
expr_antisense,
cols = NULL,
genes = NULL,
hm_values = T,
hm_value_round = 0,
hm_value_size = 3,
hm_value_color = "black",
hm_legend_colors = c("white", "cornflowerblue"),
hm_legend_limits = c(0, expr %>% dplyr::select(is.numeric) %>% max()),
hm_legend_breaks = seq(hm_legend_limits[1], hm_legend_limits[2], 1e+05),
hm_legend_title = "Counts",
hm_legend_size = c(40, 7),
bar_pos = "fill",
bar_xlab = NULL,
bar_colors = c("lightgreen", "lightpink"),
combine_plots = T,
plot_title = NULL
)
Dataframe with a Geneid column and expression values or NULL. Column names must be equal to 'expr_sense' and 'expr_antisense'.
Dataframe with a Geneid column and expression values . Column names must be equal to 'expr' and 'expr_antisense'.
Dataframe with a Geneid column and expression values . Column names must be equal to 'expr' and 'expr_sense'.
Character vector with the names of the columns to take into account (Geneid does not count) or NULL. If NULL, all columns are taken into account. Default: NULL
Character vector with the names of the genes to take into account or NULL. If NULL, all genes are taken into account. Default: NULL
Logical of length 1. If TRUE (the default), write the corresponding expression values in each cell of the heatmap
Numerical of length 1. The number of decimals the expression values will be rounded to. Default: 0.
Numerical of length 1. Size of the expression values written in the heatmap. Default: 3.
Charachter of length 1. Color of the expression values written in the heatmap. Default: "black".
Character of length 2. Colors for the lower and upper limits of the heatmap, respectively. Passed through scale_fill_gradient. Default: c("white", "cornflowerblue"),
Numerical of length 2. Lower and upper limits of the heatmap, respectively. Passed through scale_fill_gradient. Default: c(0,1e6),
Numerical vector. Breaks shown in the legend of the heatmap. Passed through scale_fill_gradient. Default: seq(0,1e6, 1e5),
Character of length 1 or NULL. Title of the legend of the heatmap. Default: "Counts"
Numerical of length 2. Height and width (in mm) of the legend of the heatmap, respectively. Passed through scale_fill_gradient. Default: c(40, 7),
Character of length 1. Either "fill" or "stack", Position of the columns, passed through the argument position in ggplot2::geom_col()
. Default: "fill".
Character of length 1 or NULL. Title of the X axis of the barplot. Default: NULL
Character of length 2. Colors for the antisense and sense bars in the barplot. Default: c("green", "tomato")
Logical of length 1. If TRUE (the default), it combines the heatmap and the barplot using patchwork
. If FALSE, it returns a list with the individual plots.
Character of length 1 or NULL. Title of the plot. Only if combine_plots = T. Default: NULL.
A patchwork combination of a ggplot-based heatmap and a ggplot-based barplot (or a list with the individual plots).