check_validity: Detect invalid IUPAC DNA characters

Description Usage Arguments Examples

Description

Detect invalid IUPAC DNA characters

Detect invalid IUPAC Amino Acid characters

Usage

1
2
3

Arguments

x

A character vector which convert to a bstr object.

negate

If TRUE, return non-matching elements.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
test <- c("a", "B", "c", "D", "e")
is_valid_dna_character(test)
is_valid_dna_character(test, negate = TRUE) %>%
  test[.]

test <- c(letters[1:10])
test2 <-
  c(paste(test[1:5], collapse = ""), paste(test[6:10], collapse = ""))
is_valid_aa_character(test) %>% table
is_valid_aa_character(test, negate = TRUE) %>% test[.]
is_valid_aa_character(test2)

t-arae/bstringr documentation built on March 18, 2021, 3:08 a.m.