Plot Estimated Gene Means Between Two Datasets
Source:R/plot_estimated_means.R
plot_estimated_means.Rd
This function generates a scatter plot comparing gene-wise expression means between two datasets (`estimates_X` and `estimates_Y`) for a specified normalization method. A reference line with slope = 1 is included to help visualize agreement between datasets.
Usage
plot_estimated_means(
estimates_X,
estimates_Y,
method = c("raw", "logcpm", "mle", "map", "libnorm_mle", "libnorm_map"),
log = TRUE,
ancestry_X = "Dataset X",
ancestry_Y = "Dataset Y",
title = NULL,
x_label = NULL,
y_label = NULL,
point_size = 1
)
Arguments
- estimates_X
A list returned by `estimate_params()` for dataset X. Must contain a `means` sublist.
- estimates_Y
A list returned by `estimate_params()` for dataset Y. Must contain a `means` sublist.
- method
Character. Type of gene-level mean to compare. One of `"raw"` (unadjusted counts), `"libnorm"` (library-normalized counts), or `"logcpm"` (log2 counts per million).
- log
Logical. Whether to log10-transform the mean values before plotting. Default is `FALSE`.
- ancestry_X
Character. Label used for dataset X in axis titles. Default is `"Dataset X"`.
- ancestry_Y
Character. Label used for dataset Y in axis titles. Default is `"Dataset Y"`.
- title
Plot title.
- x_label
X-axis label.
- y_label
Y-axis label.
- point_size
Numeric. Size of the scatter plot points. Default is `1`.
Examples
if (FALSE) { # \dontrun{
estimates_X <- estimate_params(count_matrix_X)
estimates_Y <- estimate_params(count_matrix_Y)
plot_estimated_means(estimates_X, estimates_Y, method = "libnorm", log = TRUE)
} # }