reverse | R Documentation |
Reverse given list of sequences.
reverse(x, ...)
## S3 method for class 'sq'
reverse(x, ..., NA_letter = getOption("tidysq_NA_letter"))
x |
[ |
... |
further arguments to be passed from or to other methods. |
NA_letter |
[ |
reverse()
function reverses each sequence in supplied sq
object
(e.q. transforms "MIAANYTWIL"
to "LIWTYNAAIM"
). This operation
does not alter the type of the input object nor its alphabet.
An sq
object of the same type as input
object but each sequence is reversed.
Functions that affect order of elements:
bite()
,
collapse()
,
paste()
# Creating objects to work on:
sq_ami <- sq(c("MIAANYTWIL","TIAALGNIIYRAIE", "NYERTGHLI", "MAYXXXIALN"),
alphabet = "ami_ext")
sq_dna <- sq(c("ATGCAGGA", "GACCGAACGAN", ""), alphabet = "dna_ext")
sq_unt <- sq(c("ATGCAGGA?", "TGACGAGCTTA", "", "TIAALGNIIYRAIE"))
# Reversing sequences:
reverse(sq_ami)
reverse(sq_dna)
reverse(sq_unt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.