View source: R/helper-compress.R

makeInfReps | R Documentation |

Makes pseudo-inferential replicate counts from
`mean`

and `variance`

assays. The simulated
counts are drawn from a negative binomial distribution,
with `mu=mean`

and `size`

set using a method
of moments estimator for dispersion.

```
makeInfReps(y, numReps, minDisp = 0.001)
```

`y` |
a SummarizedExperiment |

`numReps` |
how many inferential replicates |

`minDisp` |
the minimal dispersion value, set after method of moments estimation from inferential mean and variance |

Note that these simulated counts only reflect marginal
variance (one transcript or gene at a time),
and do not capture the covariance of counts across
transcripts or genes, unlike imported inferential
replicate data. Therefore, `makeInfReps`

should
not be used with `summarizeToGene`

to create
gene-level inferential replicates if inferential
replicates were originally created on the transcript
level. Instead, import the original inferential
replicates.

a SummarizedExperiment

Van Buren, S., Sarkar, H., Srivastava, A., Rashid, N.U., Patro, R., Love, M.I. (2020) Compression of quantification uncertainty for scRNA-seq counts. bioRxiv. https://doi.org/10.1101/2020.07.06.189639

```
library(SummarizedExperiment)
mean <- matrix(1:4,ncol=2)
variance <- mean
se <- SummarizedExperiment(list(mean=mean, variance=variance))
se <- makeInfReps(se, numReps=50)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.