featureQC: Quality control on features

View source: R/QC.R

featureQCR Documentation

Quality control on features

Description

Quality control on features

Usage

featureQC(sce, spike, detection_limit = 1, threshold = 0.25, sd = 0.03, pc = 2)

Arguments

sce

SingleCellExperiment with counts and ratio

spike

the character name of spike genes. The default is Ercc

detection_limit

Numeric scalar providing the value above which observations are deemed to be expressed.

threshold

A numeric scalar specifying the threshold above which percentage of cells expressed within each cell type. Default is 0.25

sd

A numeric scalar specifying the cell type weighted allelic ratio mean standard deviation threshold above which are interested features with highly variation. Default is 0.03

pc

pseudocount in the preprocess step

Value

A DataFrame of QC statistics includes

  • filter_celltype indicate whether genes expressed in more than threshold cells for all cell types

  • sd read counts standard deviation for each feature

  • filter_sd indicate whether gene standard deviation exceed sd

  • filter_spike indicate no spike genes

Examples


sce <- makeSimulatedData()
sce <- preprocess(sce)
featureQCmetric <- featureQC(sce)
keep_feature <- (featureQCmetric$filter_celltype &
  featureQCmetric$filter_sd &
  featureQCmetric$filter_spike)
sce <- sce[keep_feature, ]

# or manually setting threshold
featureQCmetric <- featureQC(sce,
  spike = "Ercc",
  threshold = 0.25, sd = 0.03, pc = 2
)
keep_feature <- (featureQCmetric$filter_celltype &
  featureQCmetric$sd > 0.02)

Wancen/airpart documentation built on March 12, 2023, 11:53 a.m.