Flags identifiers that look like decoy (reversed) database entries. Built-in
anchored default prefixes are always considered, unioned with an optional
configured pattern. An empty string or NULL pattern uses the
defaults only.
Usage
is_decoy(ids, pattern = NULL)
Arguments
- ids
character vector of (prefixed) identifiers
- pattern
optional additional decoy regex, unioned with the defaults
Value
logical vector, TRUE where an id looks like a decoy
See also
Other utilities:
INTERNAL_FUNCTIONS_BY_FAMILY,
effective_contaminant_pattern(),
effective_decoy_pattern(),
get_uniprot_id_from_fasta_header(),
is_contaminant(),
matrix_to_tibble(),
multigroup_volcano(),
names_to_matrix(),
pairs_smooth(),
panel_cor(),
remove_na_rows(),
table_facade()
Examples
is_decoy(c("REV_sp|P1|X", "sp|P2|X", "decoy_3", "normalProtein"))
#> [1] TRUE FALSE TRUE FALSE
is_decoy(c("shuffled_1", "P2"), pattern = "^shuffled_")
#> [1] TRUE FALSE