Detect invalid IUPAC DNA characters

is_valid_dna_character(x, negate = FALSE)

Arguments

x

A character vector which convert to a bstr object.

negate

If TRUE, return non-matching elements.

Examples

test <- c("a", "B", "c", "D", "e") is_valid_dna_character(test)
#> [1] TRUE TRUE TRUE TRUE FALSE
is_valid_dna_character(test, negate = TRUE) %>% test[.]
#> [1] "e"