#[repr(u8)]pub enum Nucleotide {
T = 0,
C = 1,
A = 2,
G = 3,
}Expand description
A DNA nucleotide. The u8 repr is for use with a compact binary format. This is the same nucleotide mapping as .2bit format.
Variants§
Implementations§
Source§impl Nucleotide
impl Nucleotide
Sourcepub fn from_u8_letter(val_u8: u8) -> Result<Self>
pub fn from_u8_letter(val_u8: u8) -> Result<Self>
For interop with FASTA, GenBank, and SnapGene formats.
Sourcepub fn to_u8_letter(&self) -> u8
pub fn to_u8_letter(&self) -> u8
For interop with FASTA, GenBank, and SnapGene formats.
pub fn as_str(&self) -> &str
pub fn complement(self) -> Self
Sourcepub fn weight(&self) -> f32
pub fn weight(&self) -> f32
Molecular weight, in Daltons, in a DNA strand. Weight source: NorthWestern
Sourcepub fn a_max(&self) -> f32
pub fn a_max(&self) -> f32
Optical density of a 1mL solution, in a cuvette with 1cm pathlength. Result is in nm. http://biotools.nubic.northwestern.edu/OligoCalc.html
Sourcepub fn molar_density(&self) -> f32
pub fn molar_density(&self) -> f32
Optical density of a 1mL solution, in a cuvette with 1cm pathlength. Result is in 1/(Moles x cm) http://biotools.nubic.northwestern.edu/OligoCalc.html
Trait Implementations§
Source§impl<'__de> BorrowDecode<'__de> for Nucleotide
impl<'__de> BorrowDecode<'__de> for Nucleotide
Source§fn borrow_decode<__D: BorrowDecoder<'__de>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl Clone for Nucleotide
impl Clone for Nucleotide
Source§fn clone(&self) -> Nucleotide
fn clone(&self) -> Nucleotide
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Nucleotide
impl Debug for Nucleotide
Source§impl Decode for Nucleotide
impl Decode for Nucleotide
Source§impl Encode for Nucleotide
impl Encode for Nucleotide
Source§impl Hash for Nucleotide
impl Hash for Nucleotide
Source§impl PartialEq for Nucleotide
impl PartialEq for Nucleotide
Source§impl TryFrom<u8> for Nucleotide
impl TryFrom<u8> for Nucleotide
Source§type Error = TryFromPrimitiveError<Nucleotide>
type Error = TryFromPrimitiveError<Nucleotide>
The type returned in the event of a conversion error.
Source§impl TryFromPrimitive for Nucleotide
impl TryFromPrimitive for Nucleotide
const NAME: &'static str = "Nucleotide"
type Primitive = u8
type Error = TryFromPrimitiveError<Nucleotide>
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
impl Copy for Nucleotide
impl Eq for Nucleotide
impl StructuralPartialEq for Nucleotide
Auto Trait Implementations§
impl Freeze for Nucleotide
impl RefUnwindSafe for Nucleotide
impl Send for Nucleotide
impl Sync for Nucleotide
impl Unpin for Nucleotide
impl UnwindSafe for Nucleotide
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more