domino_plot {diceplot} | R Documentation |
This function generates a plot to visualize gene expression levels for a given list of genes. The size of the dots can be customized, and the plot can be saved to an output file if specified.
domino_plot(
data,
gene_list,
switch_axis = FALSE,
min_dot_size = 1,
max_dot_size = 5,
spacing_factor = 3,
var_id = "var",
feature_col = "gene",
celltype_col = "Celltype",
contrast_col = "Contrast",
contrast_levels = c("Clinical", "Pathological"),
contrast_labels = c("Clinical", "Pathological"),
logfc_col = "avg_log2FC",
pval_col = "p_val_adj",
logfc_limits = c(-1.5, 1.5),
logfc_colors = c(low = "blue", mid = "white", high = "red"),
color_scale_name = "Log2 Fold Change",
size_scale_name = "-log10(adj. p-value)",
axis_text_size = 8,
aspect_ratio = NULL,
base_width = 5,
base_height = 4,
output_file = NULL
)
data |
A data frame containing gene expression data. |
gene_list |
A character vector of gene names to include in the plot. |
switch_axis |
A logical value indicating whether to switch the x and y axes. Default is |
min_dot_size |
A numeric value indicating the minimum dot size in the plot. Default is |
max_dot_size |
A numeric value indicating the maximum dot size in the plot. Default is |
spacing_factor |
A numeric value indicating the spacing between gene pairs. Default is |
var_id |
A string representing the column name in |
feature_col |
A string representing the column name in |
celltype_col |
A string representing the column name in |
contrast_col |
A string representing the column name in |
contrast_levels |
A character vector specifying the levels of the contrast variable. Default is |
contrast_labels |
A character vector specifying the labels for the contrasts in the plot. Default is |
logfc_col |
A string representing the column name in |
pval_col |
A string representing the column name in |
logfc_limits |
A numeric vector of length 2 specifying the limits for the log fold change color scale. Default is |
logfc_colors |
A named vector specifying the colors for the low, mid, and high values in the color scale. Default is |
color_scale_name |
A string specifying the name of the color scale in the legend. Default is |
size_scale_name |
A string specifying the name of the size scale in the legend. Default is |
axis_text_size |
A numeric value specifying the size of the axis text. Default is |
aspect_ratio |
A numeric value specifying the aspect ratio of the plot. If |
base_width |
A numeric value specifying the base width for saving the plot. Default is |
base_height |
A numeric value specifying the base height for saving the plot. Default is |
output_file |
An optional string specifying the path to save the plot. If |
A ggplot object representing the domino plot.