View source: R/simulate-counts.R
simulate_counts | R Documentation |
Simulate an RNASeq count matrix. Adapted from edgeR documentation. This function is not meant for any serious modelling. It's really used mostly for testing plotting and summarizing functions internally. It's good for generating test data.
simulate_counts(
n_genes = 1000,
n_up = 50,
n_down = 50,
n_samples = 6,
groups = c("ctl", "trt"),
de_group = "trt",
mu = 10,
phi = 0.1,
count_offset = 10
)
n_genes |
integer. The number of gene to simulate |
n_up |
integer. The number of genes the count offset will be added to |
n_down |
integer. the number of genes the count offset will be subtracted from. Negative numbers will be coerced to zeros. |
n_samples |
integer. The number of samples to simulate |
groups |
character vector. Character vector specifying the names of the groups to simulate |
de_group |
character. The name of the group to be differentially expressed |
mu |
numeric. Mean value of counts |
phi |
numeric. Dispersion parameter |
count_offset |
numeric. Count offset to be applied to the up/down genes. |
list containing the count matrix and a vectors indicating which rows were modified.
# simulate counts using default parameters
sim <- simulate_counts()
# extract the count matrix from the simulation result
counts <- sim$table
# show rows where counts were modified
counts[sim$de_genes, ]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.