Skip to contents

As is_decoy, but for contaminant entries (keratin, trypsin, BSA, ...). Built-in anchored default prefixes unioned with an optional configured pattern; empty / NULL uses the defaults only.

Usage

is_contaminant(ids, pattern = NULL)

Arguments

ids

character vector of (prefixed) identifiers

pattern

optional additional contaminant regex, unioned with defaults

Value

logical vector, TRUE where an id looks like a contaminant

Examples

is_contaminant(c("zz|Cont00001|X", "sp|P2|X", "CON__ALBU"))
#> [1]  TRUE FALSE  TRUE