fn lower_ambiguity_q(&mut self){
        let zero_score:char  = 33 as char;
        let low_score :char  = (33 + 0) as u8 as char;

        let mut low_qual_idx = vec![false; self.seq.len()];
        // First find the indices b/c it is so slow to
        // edit a string in-place one char at a time.
        for (i,nt) in self.seq.chars().enumerate(){
            if nt == 'N' || nt == 'n' || self.qual.chars().nth(i).expect("Expected a char") < low_score {
                low_qual_idx[i] = true;
            }
        }
        
        let mut new_seq =String::new();
        let mut new_qual=String::new();
        for (i,nt) in self.seq.chars().enumerate(){
            if low_qual_idx[i] {
                new_seq.push('N');
                new_qual.push(zero_score);
            } else{
                new_seq.push(nt);
                new_qual.push_str(&self.qual[i..i+1]);
            }
        }

        self.seq=new_seq;
        self.qual=new_qual;
    }
/// Alter any ambiguity site with a quality=0
Alter any ambiguity site with a quality=0
Alter any ambiguity site with a quality = 0
fn lower_ambiguity_q(&mut self){
        let zero_score:char  = 33 as char;
        let low_score :char  = (33 + 0) as u8 as char;
        let mut low_qual_idx = vec![false; self.seq.len()];
        // First find the indices b/c it is so slow to
        // edit a string in-place one char at a time.
        for (i,nt) in self.seq.chars().enumerate(){
            if nt == 'N' || nt == 'n' || self.qual.chars().nth(i).expect("Expected a char") < low_score {
                low_qual_idx[i] = true;
            }
        }
        let mut new_seq =String::new();
        let mut new_qual=String::new();
        for (i,nt) in self.seq.chars().enumerate(){
            if low_qual_idx[i] {
                new_seq.push('N');
                new_qual.push(zero_score);
            } else{
                new_seq.push(nt);
                new_qual.push_str(&self.qual[i..i+1]);
            }
        }
        self.seq=new_seq;
        self.qual=new_qual;
    }
fn lower_ambiguity_q ( & mut self ) { let zero_score : char = 33 as char ; let low_score : char = ( 33 + 0 ) as u8 as char ; let mut low_qual_idx = vec ! [ false self seq len ( ) ] ; // First find the indices b/c it is so slow to // edit a string in-place one char at a time. for ( i , nt ) in self . seq . chars ( ) . enumerate ( ) { if nt == 'N' || nt == 'n' || self . qual . chars ( ) . nth ( i ) . expect ( " " ) < low_score { low_qual_idx [ i ] = true ; } } let mut new_seq = String :: new ( ) ; let mut new_qual = String :: new ( ) ; for ( i , nt ) in self . seq . chars ( ) . enumerate ( ) { if low_qual_idx [ i ] { new_seq . push ( 'N' ) ; new_qual . push ( zero_score ) ; } else { new_seq . push ( nt ) ; new_qual . push_str ( & self . qual [ i .. i + 1 ] ) ; } } self . seq = new_seq ; self . qual = new_qual ; }
Alter any ambiguity site with a quality=0
Alter any ambiguity site with a quality = 0
&mut self
&mut self