makeInfReps {fishpond} | R Documentation

## Make pseudo-inferential replicates from mean and variance

### Description

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.

### Usage

    makeInfReps(y, numReps, minDisp = 0.001)

### Arguments

`y` | a SummarizedExperiment
`numReps` | how many inferential replicates
`minDisp` | the minimal dispersion value, set after method of moments estimation from inferential mean and variance

### Details

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.

### Value

a SummarizedExperiment

### References

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

### Examples

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

[Package fishpond version 1.8.0 Index]