control_quality: Control for Specified Quality Flags

View source: R/quality.R

control_qualityR Documentation

Control for Specified Quality Flags

Description

[Stable]

Control function which specifies the quality flag settings. One or more settings can be customized. Not specified settings are left at defaults.

Usage

control_quality(
  min_cpm = 1,
  min_cpm_prop = 0.25,
  min_corr = 0.5,
  min_depth = NULL
)

Arguments

min_cpm

(non-negative number)
minimum Counts per Million (CPM) for each gene within the sample.

min_cpm_prop

(proportion)
minimum proportion of samples with acceptable CPM of certain gene for low expression flagging.

min_corr

(proportion)
minimum Pearson correlation coefficient of CPM between samples for technical failure flagging.

min_depth

(non-negative count or NULL)
minimum library depth for low depth flagging. If NULL, this will be calculated as the first quartile minus 1.5 times the inter-quartile range of the library size (depth) of all samples. (So anything below the usual lower boxplot whisker would be too low.)

Value

List with the above criteria to flag observations.

Note

To be used with the add_quality_flags() function.

Examples

# Default settings.
control_quality()

# One or more settings can be customized.
control_quality(min_cpm = 5, min_cpm_prop = 0.001)

insightsengineering/hermes documentation built on Sept. 19, 2024, 9:06 p.m.