tidymut.core.codon module

class tidymut.core.codon.CodonTable(name: str, codon_map: Dict[str, str], start_codons: Collection[str] | None = None, stop_codons: Collection[str] | None = None)[source]

Bases: object

codon table used to translate codons to amino acids

classmethod get_standard_table(seq_type: Literal['DNA', 'RNA'] = 'DNA') CodonTable[source]

get standard codon table (NCBI standard)

classmethod get_table_by_name(name: str, seq_type: Literal['DNA', 'RNA'] = 'DNA') CodonTable[source]

get codon table by name

is_start_codon(codon: str) bool[source]

check if codon is a start codon

is_stop_codon(codon: str) bool[source]

check if codon is a stop codon

translate_codon(codon: str) str[source]

translate single codon to corresponding amino acid