flag_contaminants: Flag contaminants

flag_contaminantsR Documentation

Flag contaminants

Description

Flags contaminant features by comparing the median values of blanks and biological samples. Biological sampels are defined as samples that are not marked as blanks and are not QCs. If the median of blanks > the median of biological samples times a set ratio, the feature is flagged as contaminant

Usage

flag_contaminants(
  object,
  blank_col,
  blank_label,
  flag_thresh = 0.05,
  flag_label = "Contaminant"
)

Arguments

object

a MetaboSet object

blank_col

character, the column name in pData with blank labels

blank_label

character, the label for blank samples in blank_col

flag_thresh

numeric, the ratio threshold for flagging contaminants. If the median of blanks > flag_thresh * median of biological samples, the feature gets flagged.

flag_label

character, the label used when flagging contaminants. Can be changed if sample processing contaminants and carryover contaminants are flagged separately.


antonvsdata/notame documentation built on Sept. 14, 2024, 11:09 p.m.