pub struct QualityScores { /* private fields */ }Expand description
Decoded Phred quality scores.
Stores raw Phred values (typically 0–41), not ASCII-encoded bytes.
Implementations§
Source§impl QualityScores
impl QualityScores
Sourcepub fn from_raw(scores: Vec<u8>) -> Self
pub fn from_raw(scores: Vec<u8>) -> Self
Create from raw Phred quality values (already decoded).
Sourcepub fn from_ascii(ascii: &[u8], encoding: PhredEncoding) -> Result<Self>
pub fn from_ascii(ascii: &[u8], encoding: PhredEncoding) -> Result<Self>
Decode from ASCII-encoded quality bytes.
Sourcepub fn to_ascii(&self, encoding: PhredEncoding) -> Vec<u8> ⓘ
pub fn to_ascii(&self, encoding: PhredEncoding) -> Vec<u8> ⓘ
Encode back to ASCII using the given encoding.
Sourcepub fn fraction_above(&self, threshold: u8) -> f64
pub fn fraction_above(&self, threshold: u8) -> f64
Fraction of scores at or above the given threshold.
Sourcepub fn error_probability(phred: u8) -> f64
pub fn error_probability(phred: u8) -> f64
Error probability for a single Phred quality score: 10^(-Q/10).
Trait Implementations§
Source§impl Clone for QualityScores
impl Clone for QualityScores
Source§fn clone(&self) -> QualityScores
fn clone(&self) -> QualityScores
Returns a duplicate 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 QualityScores
impl Debug for QualityScores
Source§impl PartialEq for QualityScores
impl PartialEq for QualityScores
impl Eq for QualityScores
impl StructuralPartialEq for QualityScores
Auto Trait Implementations§
impl Freeze for QualityScores
impl RefUnwindSafe for QualityScores
impl Send for QualityScores
impl Sync for QualityScores
impl Unpin for QualityScores
impl UnsafeUnpin for QualityScores
impl UnwindSafe for QualityScores
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