## A minimal sequence alignment:
x <- list(
seqA = c("a", "a", "c", "c", "g", "t"),
seqB = c("n", "-", "r", "y", "g", "t"))
x <- as.DNAbin(x)
## Three choices of manipulation:
as.character(x)
as.character(rc(x)) ## reverse-complement
as.character(rc(x, complement = FALSE)) ## only reverse
as.character(rc(x, reverse = FALSE)) ## only complement
## You can remove gaps:
as.character(rc(x, delete.gaps = TRUE)) ## gaps/indels removed
Run the code above in your browser using DataLab