reverseComplement {microseq} | R Documentation |
Reverse-complementation of DNA
Description
The standard reverse-complement of nucleotide sequences.
Usage
reverseComplement(nuc.sequences, reverse = TRUE)
Arguments
nuc.sequences |
Character vector containing the nucleotide sequences. |
reverse |
Logical indicating if complement should be reversed. |
Details
With ‘reverse = FALSE’ the DNA sequence is only complemented, not reversed.
This function will handle the IUPAC ambiguity symbols, i.e. ‘R’ is reverse-complemented to ‘Y’ etc.
Value
A character vector of reverse-complemented sequences.
Author(s)
Lars Snipen and Kristian Hovde Liland.
See Also
Examples
fa.file <- file.path(file.path(path.package("microseq"),"extdata"),"small.ffn")
fa <- readFasta(fa.file)
reverseComplement(fa$Sequence)
#' # Or, make use of dplyr to manipulate tables
readFasta(fa.file) %>%
mutate(RevComp = reverseComplement(Sequence)) -> fa.tbl
[Package microseq version 2.1.6 Index]