reverseSeq {Biostrings}R Documentation

Reverse Sequence

Description

WARNING: The functions described in this man page are now defunct and will be removed soon together with this man page. See the examples at the bottom of the man page for how to use reverse,XString-method and reverseComplement instead.

Functions to obtain the reverse and reverse complement of a sequence

Usage

reverseSeq(seq)
revcompDNA(seq)
revcompRNA(seq)

Arguments

seq Character vector. For revcompRNA and revcompDNA the sequence should consist of appropriate letter codes: [ACGUN] and ACGTN, respectively.

Details

The function reverses the order of the constituent character strings of its argument.

Value

A character vector of the same length as seq.

Author(s)

R. Gentleman, W. Huber, S. Falcon

See Also

alphabetFrequency, reverseComplement

Examples

 w <-  c("hey there", "you silly fool")
 ## You can't do this anymore (defunct):
 if (interactive()) {
   reverseSeq(w)  # was inefficient on large vectors
 }
 ## But you can do this instead:
 reverse(BStringSet(w))

 w <- "able was I ere I saw Elba"
 ## You can't do this anymore (defunct):
 if (interactive()) {
   reverseSeq(w)  # was inefficient on large vectors
 }
 ## But you can do this instead:
 reverse(BStringSet(w))

 rna1 <- "UGCA"
 ## You can't do this anymore (defunct):
 if (interactive()) {
   revcompRNA(rna1)  # was inefficient on large vectors
 }
 ## But you can do this instead:
 reverseComplement(RNAString(rna1))

 dna1 <- "TGCA"
 ## You can't do this anymore (defunct):
 if (interactive()) {
   revcompDNA(dna1)  # was inefficient on large vectors
 }
 ## But you can do this instead:
 reverseComplement(DNAString(dna1))

[Package Biostrings version 2.20.1 Index]