ICAMS (version 2.0.7)

revc: Reverse complement every string in string.vec.

Description

Based on reverseComplement. Handles IUPAC ambiguity codes but not "u" (uracil). (see <https://en.wikipedia.org/wiki/Nucleic_acid_notation>).

Usage

revc(string.vec)

Arguments

string.vec

A character vector.

Value

A character vector with the reverse complement of every string in string.vec.

Examples

Run this code
# NOT RUN {
revc("aTgc") # GCAT

# A vector and strings with ambiguity codes
revc(c("ATGC", "aTGc", "wnTCb")) # GCAT GCAT VGANW

# }
# NOT RUN {
revc("ACGU") # An error
# }

Run the code above in your browser using DataCamp Workspace