Plot Mean-Variance Trend Using log2-CPM (voom-style)
Source:R/plot_mean_variance_trend.R
plot_mean_variance_trend.Rd
This function plots the mean-variance relationship across genes based on log2-counts-per-million (log2-CPM) values derived from raw count data. Each gene is plotted by its average log2-CPM (mean expression) and standard deviation across samples. A LOWESS curve is overlaid to show the global trend, similar to the diagnostic plot produced by limma::voom.
Arguments
- X
A numeric matrix or data.frame of **raw count data** (samples in rows, genes in columns).
- title
An optional character string specifying the plot title.
- x_label
An optional label for the x-axis. Defaults to "Mean log2-CPM".
- y_label
An optional label for the y-axis. Defaults to "Standard deviation".
- point_size
A numeric value for point size in the scatter plot (default = 1).