View source: R/find_invalid_letters.R
find_invalid_letters | R Documentation |
Finds elements in given sequence not contained in amino acid or nucleotide alphabet.
find_invalid_letters(x, dest_type, ...)
## S3 method for class 'sq'
find_invalid_letters(
x,
dest_type,
...,
NA_letter = getOption("tidysq_NA_letter")
)
x |
[ |
dest_type |
[ |
... |
further arguments to be passed from or to other methods. |
NA_letter |
[ |
Amino acid, DNA and RNA standard alphabets have predefined letters. This function allows the user to check which letters from input sequences are not contained in selected one of these alphabets.
Returned list contains a character vector for each input sequence. Each element of a vector is a letter that appear in corresponding sequence and not in the target alphabet.
You can check which letters are valid for specified type in
alphabet
documentation.
A list of mismatched elements for every sequence from
sq
object.
alphabet()
Functions that manipulate type of sequences:
is.sq()
,
sq_type()
,
substitute_letters()
,
typify()
# Creating objects to work on:
sq_unt <- sq(c("ACGPOIUATTAGACG","GGATFGHA"), alphabet = "unt")
sq_ami <- sq(c("QWERTYUIZXCVBNM","LKJHGFDSAZXCVBN"), alphabet = "ami_ext")
# Mismatched elements might be from basic type:
find_invalid_letters(sq_ami, "ami_bsc")
# But also from type completely unrelated to the current one:
find_invalid_letters(sq_unt, "dna_ext")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.