Skip to main content

Translation

Struct Translation 

Source
pub struct Translation {
    pub table: u8,
    pub table_name: &'static str,
    pub strand: CodingStrand,
    pub codon_start: u8,
    pub protein: String,
    pub codons: Vec<Codon>,
    pub internal_stops: Vec<usize>,
    pub terminal_stop: bool,
    pub trailing_bases: usize,
    pub ambiguous_codons: usize,
    pub starts_with_atg: bool,
    pub initiator_as_methionine: bool,
}
Expand description

Translation of an explicit coding sequence.

Fields§

§table: u8§table_name: &'static str§strand: CodingStrand§codon_start: u8

1-based offset into the coding sequence of the first translated base.

§protein: String

One letter per codon; stops are * wherever they occur.

§codons: Vec<Codon>§internal_stops: Vec<usize>

Codon indices of stops before the final codon.

§terminal_stop: bool§trailing_bases: usize

Coding bases left over after the last complete codon (0–2).

§ambiguous_codons: usize

Codons translated as X because their ambiguity codes disagree.

§starts_with_atg: bool§initiator_as_methionine: bool

A complete feature CDS (codon_start 1, table start codon, terminal stop) whose first codon is an alternative start is translated with an initiator M (NCBI/Biopython cds=True convention). Never applied to ranges.

Trait Implementations§

Source§

impl Clone for Translation

Source§

fn clone(&self) -> Translation

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Translation

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Translation

Source§

impl PartialEq for Translation

Source§

fn eq(&self, other: &Translation) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Translation

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Translation

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.