Description Usage Arguments Value Author(s) Examples
View source: R/create_read_numbers.R
Generate a simulated data set based on known model parameters
1 2 |
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
1 2 3 4 5 6 7 8 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.