create_read_numbers {polyester} | R Documentation |
Generate a simulated data set based on known model parameters
create_read_numbers(mu, fit, p0, m = NULL, n = NULL, mod = NULL, beta = NULL, seed = NULL)
mu |
Baseline mean expression for negative binomial model |
fit |
Fitted relationship between log mean and log size |
p0 |
A vector of the probabilities a count is zero |
m |
Number of genes/transcripts to simulate (not necessary if mod, beta are specified) |
n |
Number of samples to simulate (not necessary if mod, beta are specified) |
mod |
Model matrix you would like to simulate from without an intercept |
beta |
set of coefficients for the model matrix (must have same number of columns as mod) |
seed |
optional seed to set (for reproducibility) |
counts Data matrix with counts for genes in rows and samples in columns
Jeff Leek
library(ballgown) data(bg) countmat = fpkm_to_counts(bg, mean_rps=400000) params = get_params(countmat) Ntranscripts = 50 Nsamples = 10 custom_readmat = create_read_numbers(mu=params$mu, fit=params$fit, p0=params$p0, m=Ntranscripts, n=Nsamples, seed=103)