mixtureModel {miQC} | R Documentation |
Function to fit a two-distribution mixture model on a SingleCellExperiment object.
mixtureModel(sce, model_type = "linear")
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". |
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.
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)