RAW_NT: IUPAC DNA nucleotides as raw bytes

RAW_NTR Documentation

IUPAC DNA nucleotides as raw bytes

Description

RAW_NT is a named vector of raw bytes allowing fast comparison of IUPAC DNA nucleotide characters. A, C, G, and T are assigned single individual bits, and the standard IUPAC characters are assigned bitwise combinations of these. This way RAW_NT["A"] & RAW_NT["G"] is zero, while RAW_NT["A"] & RAW_NT["R"] is nonzero. The gap characters - and . are assigned one remaining bit, leaving 3 bits unspecified.

Usage

RAW_NT

Format

An object of class raw of length 17.

Details

     - TGCA
A 0000 0001  01
C 0000 0010  02
G 0000 0100  04
T 0000 1000  08

R 0000 0101  05
Y 0000 1010  0A
S 0000 0110  06
W 0000 1001  09
K 0000 1100  0C
M 0000 0011  03

B 0000 1110  0E
D 0000 1101  0D
H 0000 1011  0B
V 0000 0111  07

N 0000 1111  0F

- 0001 0000  10
. 0001 0000  10

ShawHahnLab/microsat documentation built on Aug. 25, 2023, 11:16 p.m.