This function generates a matrix of negative-binomial count data
using the nonlinear GxT parametrization consistent with the models
fit by map_qtl when fn = "nonlinear".
Each feature is associated with its own SNP. When geno is
NULL, a separate genotype vector is simulated per feature.
A data frame containing sample IDs (character strings or integers), subject IDs (character strings or integers), and treatment conditions (0 or 1). The columns must be named as "sample", "subject", and "condition".
An integer specifying the number of features (e.g., genes and ATAC-seq peaks).
An integer specifying the number of samples.
An n.feat x n.sub matrix of genotype values (0, 1, 2).
Column names must match unique(anno$subject). Row i
gives the subject-level genotypes for feature i. When
NULL (the default), a separate genotype vector is simulated
for each feature using lb.maf and ub.maf.
A numeric vector of length three specifying the standard
deviations of the genotype, treatment, and interaction effects,
respectively. Each effect is drawn independently per feature from
Normal(0, sd). Default c(0, 0, 0) gives no effects. For each
effect, exactly one of the corresponding elements of sd and
coef must be non-NA.
A numeric vector of length three specifying fixed values
for the genotype, treatment, and interaction effects, respectively.
For each effect, exactly one of the corresponding elements of
sd and coef must be non-NA.
A scalar specifying the lower bound of the MAF used
when simulating genotypes (geno = NULL).
A scalar specifying the upper bound of the MAF used
when simulating genotypes (geno = NULL).
A logical scalar. When TRUE and
geno = NULL, genotype simulation for each feature is repeated
until all three levels (0, 1, 2) are present.
A scalar specifying the mean of the per-feature
intercept b0 drawn from Normal(intercept.mean,
intercept.sd).
A scalar specifying the standard deviation of the per-feature intercept.
A function that maps exp(b0) (the
baseline mean count) to the negative-binomial dispersion
(size = 1 / dispersion in rnbinom).
A numeric vector of length n.sample
specifying multiplicative size factors applied to the count-scale
mean.
A matrix of non-negative integers with n.feat rows
and n.sample columns. Row names are "f1", "f2", ...
and column names are the sample IDs in anno$sample.