Package 'fastrc'

Title: Fast Reverse Complement of DNA and RNA Sequences
Description: Fast reverse complement of DNA and RNA sequences using a 'C++' lookup table for O(1) per-base complement mapping. Supports full IUPAC ambiguity codes, DNA and RNA modes, case preservation, and NA handling. Much faster than other packages for computing reverse complements of many short sequences such as primers, probes, and, k-mers.
Authors: Steven G. Rozen [aut, cre]
Maintainer: Steven G. Rozen <[email protected]>
License: GPL (>= 3)
Version: 0.0.2
Built: 2026-06-02 07:05:40 UTC
Source: https://github.com/steverozen/fastrc

Help Index


Fast Reverse Complement of DNA/RNA Sequences

Description

Computes the reverse complement of one or more DNA or RNA sequences using a C++ lookup table for O(1) complement mapping. Supports full IUPAC ambiguity codes and preserves case.

Usage

fast_rc(seqs, type = "DNA")

Arguments

seqs

A character vector of DNA or RNA sequences.

type

Either "DNA" (A\leftrightarrowT) or "RNA" (A\leftrightarrowU).

Value

A character vector of reverse-complemented sequences, with NA values preserved.

Examples

fast_rc("ATCG")
fast_rc(c("ATCG", "AAGG", NA))
fast_rc("AUCG", type = "RNA")