Skip to main content

Module amino_acids

Module amino_acids 

Source
Expand description

Amino acid conversion utilities.

Single-letter ↔ three-letter ↔ integer mappings for the 20 standard amino acids plus the catch-all UNK / 'X' / index 20.

Structs§

AminoAcidIter
An iterator over the variants of AminoAcid

Enums§

AminoAcid
The 20 standard amino acids plus Unknown, with integer discriminants matching the conventional protein-ML encoding (Ala=0 … Unknown=20).

Constants§

ALPHABET
One-letter code alphabet for the 20 standard amino acids plus UNK.

Functions§

aa1to_int
Convert a 1-letter amino acid code to an integer index (0–20, UNK→20).
aa3to1
Convert a 3-letter amino acid code to a 1-letter code.
int_to_aa1
Convert an integer index (0–20) to a 1-letter amino acid code.