INNER CODE UNIT · Rust

mean_qual

google/best · src/stats.rs:273

    pub fn mean_qual(&self) -> f64 {
        // only include quality scores from matches and mismatches
        error_to_qual(self.total_qual_error / ((self.matches + self.mismatches) as f64))
    }
}

impl<'a> AlnStats<'a> {
    pub fn from_record(
        references: &sam::header::ReferenceSequences,
        reference_seqs: &FxHashMap<String, fasta::Record>,
        r: &bam::lazy::Record,
        intervals: &[&'a FeatureInterval],
    ) -> Self {
        let chr = references[r.reference_sequence_id().unwrap().unwrap()]
            .name()
            .to_string();
        let mut ref_pos = usize::from(r.alignment_start().unwrap().unwrap());
        let sequence = sam::record::Sequence::try_from(r.sequence()).unwrap();

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…