Skip to main content

CodonExtension

Trait CodonExtension 

Source
pub trait CodonExtension {
    // Required methods
    fn is_std_stop_codon(&self) -> bool;
    fn maybe_std_stop_codon(&self) -> bool;
    fn is_amino_acid(&self) -> bool;
    fn is_resolvable_codon(&self) -> bool;
    fn is_partial_codon(&self) -> bool;
}
Expand description

Extension trait for codon-like objects ([u8; 3] in Zoe) providing common classification methods.

Required Methods§

Source

fn is_std_stop_codon(&self) -> bool

Returns true if the codon is a standard stop codon (TAA, TAG, TGA, or RNA equivalents including some ambiguous forms).

Source

fn maybe_std_stop_codon(&self) -> bool

Returns true if the codon potentially codes for a standard stop codon.

This returns true for unresolvable codons such as TGR which could be a stop codon. NNN also returns true.

Source

fn is_amino_acid(&self) -> bool

Returns true if the codon translates to an amino acid.

Ambiguous codons are supported, but they must unambiguously translate to an amino acid in order to return true. Stop codons, partial codons, deletions (e.g., ---), and the ambiguous codon NNN all return false.

Source

fn is_resolvable_codon(&self) -> bool

Returns true if the codon can be resolved to a translation (amino acid, deletion, missing codon, or stop codon) under the standard genetic code.

Source

fn is_partial_codon(&self) -> bool

Returns true if the codon is partial, meaning that it contains one or two gaps (- or .).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl CodonExtension for [u8; 3]

Implementors§