R/sequence.R
grevcomp.Rd
Takes a DNA sequence string and returns its reverse complement.
grevcomp(seq)
A character vector containing DNA sequences (using A,C,G,T). Ignores other characters and NA values.
A character vector of the same length as the input, containing the reverse complement sequences
grevcomp("ACTG") # Returns "CAGT" #> [1] "CAGT" grevcomp(c("ACTG", "GGCC")) # Returns c("CAGT", "GGCC") #> [1] "CAGT" "GGCC" grevcomp(c("ACTG", NA, "GGCC")) # Returns c("CAGT", NA, "GGCC") #> [1] "CAGT" NA "GGCC"