Expand description
Return complement of given RNA alphabet character (IUPAC alphabet supported).
Casing of input character is preserved, e.g. u
→ a
, but U
→ A
.
All N
s and Z
s remain as they are.
use bio::alphabets::rna;
assert_eq!(rna::complement(65), 85); // A → U
assert_eq!(rna::complement(103), 99); // g → c
assert_eq!(rna::complement(89), 82); // Y → R
assert_eq!(rna::complement(115), 115); // s → s
assert_eq!(rna::complement(78), 78); // N → N