Learn R Programming

baseq (version 0.1.4)

reverse_complement: Generate Reverse Complement of DNA sequence

Description

Given a DNA sequence, the function generates the reverse complement of the sequence and returns it.

Usage

reverse_complement(sequence)

Value

A character string containing the reverse complement of the input DNA sequence

Arguments

sequence

A character string containing the DNA sequence to be reversed and complemented

Examples

Run this code
sequence <- "ATCGAGCTAGCTAGCTAGCTAGCT"
reverse_complement(sequence)
# [1] "AGCTAGCTAGCTAGCTAGCTCGAT"

Run the code above in your browser using DataLab