Description Usage Arguments Value Author(s) References See Also Examples
View source: R/sim_fixTotalD.R
This function simulates an MPRA dataset with specified input distribution and total depth across tags/barcodes.
1 | sim_fixTotalD(datMean, totalDepth = total, sigma2_DNA_a0, sigma2_DNA_a1, sigma2_RNA_a0, sigma2_RNA_a1, ntag = ntagsV, nsim = nelements, nrep = 5, measurementERROR = TRUE, slope)
|
datMean |
A vector of numeric values indicating the input DNA count distribution, which is a pool of relative abundance of reads across tags. There is no requirement in length. The true input counts for each tag will be sampled from this vector (before scaling). |
totalDepth |
A numeric number indicating the total read depth over all tags. |
sigma2_DNA_a0 |
This parameter and the |
sigma2_DNA_a1 |
This parameter and the |
sigma2_RNA_a0 |
This parameter and the |
sigma2_RNA_a1 |
This parameter and the |
ntag |
An integer indicating the number of tags/barcodes for each oligonucleotide (oligos) or each allele. |
nsim |
An integer indicating the number of simulations or number of SNPs included in the dataset. |
nrep |
An integer indicating the number of replicates. |
measurementERROR |
A logical value indicating whether there is randomness in the observed input counts for each tag/barcode. If FALSE, the true input count is used for all DNA replicates. Otherwise, TRUE (default). |
slope |
A numeric vector of length 2* |
datt |
A simulated data frame with ntag*nsim*2 number of rows and 2+nrep*2 number of columns. The first two columns are the allele and SNP name for each tag. The other columns are the generated DNA or RNA counts for the nrep replicates. |
Dandi Qiao
Qiao, D., Zigler, C., Cho, M.H., Silverman, E.K., Zhou, X., et al. (2018). Statistical considerations for the analysis of massively parallel reporter assays data.
1 2 3 4 5 6 7 | nsim = 10
ntag = 10
slope=c(rep(1, ntag*nsim), rep(1.5, ntag*nsim))
nrep=5
data(datMean)
simData = sim_fixTotalD(datMean=datMean, totalDepth=200000, sigma2_DNA_a0=0.001, sigma2_DNA_a1=0.23, sigma2_RNA_a0=0.18, sigma2_RNA_a1=35, ntag=ntag, nsim=nsim, nrep=nrep, slope=slope)
results = analyzeMPRA(simData, nrep, rnaCol=2+nrep+1, nrep, nsim, ntag, method=c("MW","mpralm", "edgeR", "DESeq2"), cutoff=0, cutoffo=0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.