Learn R Programming

polyester (version 1.8.3)

create_read_numbers: Generate a simulated data set based on known model parameters

Description

Generate a simulated data set based on known model parameters

Usage

create_read_numbers(mu, fit, p0, m = NULL, n = NULL, mod = NULL, beta = NULL, seed = NULL)

Arguments

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)

Value

counts Data matrix with counts for genes in rows and samples in columns

Examples

Run this code
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)

Run the code above in your browser using DataLab