simRX {rxSeq} | R Documentation |
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:
index |
vector defining the cross of the mouse, female - AB=1, BA=2, AA=3, BB=4, and male - AB=5, BA=6, AA=7, BB=8. If mice are of only one sex, AB=1, BA=2, AA=3, BB=4. |
y |
A matrix of total read counts |
n |
A matrix of allele specific counts |
n0B |
A matrix of allele specific counts associated with allele B |
kappas |
Offset parameter, given as overall TReC for the mouse. |
tausB |
In case of the simulating X chromosome the provided Xce effect is returned: expression of allele B relative to the overall allele specific count for each mouse. |
Author(s)
Vasyl Zhabotynsky vasyl@unc.edu
See Also
Examples
# 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)