fn trim(&mut self) {
        let min_qual = *self.thresholds.entry("min_trim_qual".to_string())
            .or_insert(0.0) as u8;

        let mut trim5=0;
        let mut trim3=&self.qual.len()-0;
        
        // 5'
        for qual in self.qual.chars(){
            if qual as u8 - 33 < min_qual {
                trim5+=1;
            } else {
                break;
            }
        }

        // 3'
        for qual in self.qual.chars().rev() {
            if qual as u8  - 33 < min_qual {
                trim3-=1;
            } else {
                break;
            }
        }
        
        if trim5 >= trim3 {
            self.qual = String::new();
            self.seq  = String::new();
        } else {
            self.qual = self.qual[trim5..trim3].to_string();
            self.seq  = self.seq[trim5..trim3].to_string();
        }
    }
/// Trim the ends of reads with low quality
Trim the ends of reads with low quality
Trim the ends of reads with low quality
fn trim(&mut self) {
        let min_qual = *self.thresholds.entry("min_trim_qual".to_string())
            .or_insert(0.0) as u8;
        let mut trim5=0;
        let mut trim3=&self.qual.len()-0;
        // 5'
        for qual in self.qual.chars(){
            if qual as u8 - 33 < min_qual {
                trim5+=1;
            } else {
                break;
            }
        }
        // 3'
        for qual in self.qual.chars().rev() {
            if qual as u8  - 33 < min_qual {
                trim3-=1;
            } else {
                break;
            }
        }
        if trim5 >= trim3 {
            self.qual = String::new();
            self.seq  = String::new();
        } else {
            self.qual = self.qual[trim5..trim3].to_string();
            self.seq  = self.seq[trim5..trim3].to_string();
        }
    }
fn trim ( & mut self ) { let min_qual = * self . thresholds . entry ( " " . to_string ( ) ) . or_insert ( 0.0 ) as u8 ; let mut trim5 = 0 ; let mut trim3 = & self . qual . len ( ) - 0 ; // 5' for qual in self . qual . chars ( ) { if qual as u8 - 33 < min_qual { trim5 += 1 ; } else { break ; } } // 3' for qual in self . qual . chars ( ) . rev ( ) { if qual as u8 - 33 < min_qual { trim3 -= 1 ; } else { break ; } } if trim5 >= trim3 { self . qual = String :: new ( ) ; self . seq = String :: new ( ) ; } else { self . qual = self . qual [ trim5 .. trim3 ] . to_string ( ) ; self . seq = self . seq [ trim5 .. trim3 ] . to_string ( ) ; } }
Trim the ends of reads with low quality
Trim the ends of reads with low quality
&mut self
&mut self