Learn R Programming

rxSeq (version 0.99.3)

simRX: Produce simulated counts

Description

This function is producing simulated counts for the joint model with Negative-Binomial distribution for TReC and Beta-Binomial for ASE counts. The simulated dataset should be reformatted to readCounts format to be used for optimization.

Usage

simRX(b0f, b0m, b1f, b1m, beta_sex, beta_dom, beta_k=1, phi=1, theta=1, n=6, mean.base.cnt=50, range.base.cnt=60, perc.ase=.35, n.simu=1E4, is.X=FALSE, tauB=NULL, seed=NULL)

Arguments

b0f
a female additive strain effect
b0m
a male additive strain effect
b1f
a female parent of origin effect
b1m
a male parent of origin effect
beta_sex
a sex effect
beta_dom
a dominance effect
beta_k
an effect associated with the library size kappas
phi
a Negative-Binomial overdispersion, default value is 1
theta
a Beta-Binomial overdispersion, default value is 1
n
a vector defining number of mice in each cross, default value is 6
mean.base.cnt
a target expected number of counts for the base group (with no effects), default value is 50
range.base.cnt
a range in which the expected number of counts for the base group will vary, default value is 60
perc.ase
a percent reads that are allele-specific, default value is 35%
n.simu
a number of simulations, default value is 1E4
is.X
a flag if the value to be simulated is X for chromosome (otherwise autosome), default value is FALSE
tauB
a value describing allelic imbalance - Xce effect for the cross, default value is NULL, in which case 50% will be simulated
seed
a random seed to be set, no set by default.

Value

output - 3 matrices with one row - one gene, one column - one mouse:

See Also

process,readCounts.

Examples

Run this code
# simulating autosomal data:
dat.A = simRX(b0f=.5, b0m=.6, b1f=.3, b1m=.4, beta_sex=.1, beta_dom=.1, n.simu=1E1)
names(dat.A)
# simulating autosomal data:
dat.X = simRX(b0f=.5, b0m=.6, b1f=.3, b1m=.4, beta_sex=.1, beta_dom=.1, n.simu=1E1, 
              is.X=TRUE, tauB=.3)
names(dat.X)

Run the code above in your browser using DataLab