mfaEstimate: Estimate mfa simulation parameters

Description Usage Arguments Details Value Examples

View source: R/mfa-estimate.R

Description

Estimate simulation parameters for the mfa simulation from a real dataset.

Usage

1
2
3
4
5
6
7
mfaEstimate(counts, params = newMFAParams())

## S3 method for class 'SingleCellExperiment'
mfaEstimate(counts, params = newMFAParams())

## S3 method for class 'matrix'
mfaEstimate(counts, params = newMFAParams())

Arguments

counts

either a counts matrix or a SingleCellExperiment object containing count data to estimate parameters from.

params

MFAParams object to store estimated values in.

Details

The nGenes and nCells parameters are taken from the size of the input data. The dropout lambda parameter is estimate using empirical_lambda. See MFAParams for more details on the parameters.

Value

MFAParams object containing the estimated parameters.

Examples

1
2
3
4
5
6
7
8
9
# Load example data
if (requireNamespace("mfa", quietly = TRUE)) {
    library(mfa)
    synth <- create_synthetic(C = 20, G = 5, zero_negative = TRUE,
                              model_dropout = TRUE)

    params <- mfaEstimate(synth$X)
    params
}

splatter documentation built on Dec. 3, 2020, 2:01 a.m.