Detect invalid IUPAC Amino Acid characters

is_valid_aa_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(letters[1:10]) test2 <- c(paste(test[1:5], collapse = ""), paste(test[6:10], collapse = "")) is_valid_aa_character(test) %>% table
#> . #> FALSE TRUE #> 2 8
is_valid_aa_character(test, negate = TRUE) %>% test[.]
#> [1] "b" "j"
is_valid_aa_character(test2)
#> [1] FALSE FALSE