pub trait PartialTranslationTable<A: Codec, B: Codec> {
// Required methods
fn try_to_amino(
&self,
codon: &SeqSlice<A>,
) -> Result<B, TranslationError<A, B>>;
fn try_to_codon(&self, amino: B) -> Result<Seq<A>, TranslationError<A, B>>;
}Expand description
A partial translation table where not all triples of characters map to amino acids
Required Methods§
Sourcefn try_to_amino(&self, codon: &SeqSlice<A>) -> Result<B, TranslationError<A, B>>
fn try_to_amino(&self, codon: &SeqSlice<A>) -> Result<B, TranslationError<A, B>>
§Errors
Will return an Err if a codon does not map to an amino acid. This would be
the case for a translation table from codons with ambiguous nucleotide codes such as ANC, SWS, NNN, etc.
Sourcefn try_to_codon(&self, amino: B) -> Result<Seq<A>, TranslationError<A, B>>
fn try_to_codon(&self, amino: B) -> Result<Seq<A>, TranslationError<A, B>>
§Errors
Will return an Err if the amino acid can be translated from different codons