Reverse and complement sequences

seq_complement(x)

seq_reverse(x)

Arguments

x

a DNA or RNA vector. Function seq_reverse also accepts AA vectors.

Value

A reverse or complement sequence (same class as the input).

See also

Other biological operations: seq_rev_translate(), seq_translate(), transcription

Examples

x <- dna("ACTTTGGCTAAG")
seq_reverse(x)
#> DNA vector of 1 sequences
#> >   GAATCGGTTTCA
seq_complement(x)
#> DNA vector of 1 sequences
#> >   TGAAACCGATTC