Skip to contents

Takes output from `simulate_NB_counts()` and injects differential expression by adjusting counts for selected genes and groups.

Usage

inject_DEG_signal(
  sim_data,
  n_degs = 1000,
  log2fc = 1.5,
  prop_interaction = 0.3,
  seed = NULL
)

Arguments

sim_data

Output from `simulate_NB_counts()`.

n_degs

Total number of DEGs to inject.

log2fc

Log2 fold change for DEGs.

prop_interaction

Proportion of DEGs that should have interaction effects.

seed

Optional random seed.

Value

A list with updated counts, sample info, and DEG metadata.