View source: R/dnaManipulate.R
reverseComplement | R Documentation |
The standard reverse-complement of nucleotide sequences.
reverseComplement(nuc.sequences, reverse = TRUE)
nuc.sequences |
Character vector containing the nucleotide sequences. |
reverse |
Logical indicating if complement should be reversed. |
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.
A character vector of reverse-complemented sequences.
Lars Snipen and Kristian Hovde Liland.
iupac2regex
, regex2iupac
.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.