pub struct BaseCounts {
pub a: u64,
pub c: u64,
pub g: u64,
pub t: u64,
pub n: u64,
pub other: u64,
}Expand description
Per-base counts of a nucleotide sequence, case-insensitive.
Fields§
§a: u64Adenine.
c: u64Cytosine.
g: u64Guanine.
t: u64Thymine, or uracil in RNA.
n: u64N and other IUPAC ambiguity codes.
other: u64Anything that is not a nucleotide code (gaps, *, …).
Implementations§
Source§impl BaseCounts
impl BaseCounts
Sourcepub fn of(seq: &[u8]) -> BaseCounts
pub fn of(seq: &[u8]) -> BaseCounts
Count the bases of seq.
Sourcepub fn gc_content(&self) -> Option<f64>
pub fn gc_content(&self) -> Option<f64>
GC fraction over unambiguous bases, or None when there are none.
Sourcepub fn merge(&mut self, other: &BaseCounts)
pub fn merge(&mut self, other: &BaseCounts)
Add another set of counts.
Trait Implementations§
Source§impl Clone for BaseCounts
impl Clone for BaseCounts
Source§fn clone(&self) -> BaseCounts
fn clone(&self) -> BaseCounts
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BaseCounts
Source§impl Debug for BaseCounts
impl Debug for BaseCounts
Source§impl Default for BaseCounts
impl Default for BaseCounts
Source§fn default() -> BaseCounts
fn default() -> BaseCounts
Returns the “default value” for a type. Read more
impl Eq for BaseCounts
Source§impl PartialEq for BaseCounts
impl PartialEq for BaseCounts
impl StructuralPartialEq for BaseCounts
Auto Trait Implementations§
impl Freeze for BaseCounts
impl RefUnwindSafe for BaseCounts
impl Send for BaseCounts
impl Sync for BaseCounts
impl Unpin for BaseCounts
impl UnsafeUnpin for BaseCounts
impl UnwindSafe for BaseCounts
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more