Skip to contents

Visualize expression of selected genes from simulated data, grouped by ancestry and filled by group.

Usage

plot_simulated_features(
  sim_data,
  features = NULL,
  a_col = "ancestry",
  g_col = "group",
  zscore = TRUE,
  n = 12,
  seed = NULL
)

Arguments

sim_data

Output from `simulate_DEG_signal()` or `simulate_NB_counts()`.

features

Optional character vector of gene names to plot. If NULL, samples `n` genes.

a_col

Column in `sample_info` used for x-axis grouping (e.g., "ancestry").

g_col

Column in `sample_info` used for fill color (e.g., "group").

zscore

Logical. If TRUE, z-score normalize each gene across samples.

n

Number of genes to sample if `features` is NULL.

seed

Optional random seed.

Value

A ggplot2 object showing boxplots for selected features.