mixtureModel {miQC}R Documentation

mixtureModel

Description

Function to fit a two-distribution mixture model on a SingleCellExperiment object.

Usage

mixtureModel(sce, model_type = "linear")

Arguments

sce

(SingleCellExperiment) Input data object.

model_type

(character) What type of model to generate. A linear mixture model ("linear") is recommended, but currently b-spline ("spline") and two-degree polynomial ("polynomial") are also supported Default = "linear".

Value

Returns a flexmix object with mixture model parameters, which is used to calculate posterior probability for each cell being compromised and make final filtering decisions.

Examples

library(scRNAseq)
library(scater)
library(BiocParallel)
sce <- ZeiselBrainData()
mt_genes <- grepl("^mt-",  rownames(sce))
feature_ctrls <- list(mito = rownames(sce)[mt_genes])
sce <- addPerCellQC(sce, subsets = feature_ctrls, BPPARAM = MulticoreParam())
model <- mixtureModel(sce)

[Package miQC version 1.0.0 Index]