pub fn update_max_cigar_ops_len(&mut self, record: &bam::Record) -> bool {
        let norm = |j| NotNan::new(j as f64 / record.seq().len() as f64).unwrap();

        let mut is_regular = true;
        for c in record.cigar().iter() {
            match c {
                &Cigar::SoftClip(l) => {
                    let s = norm(l);
                    self.frac_max_softclip =
                        *cmp::max(s, NotNan::new(self.frac_max_softclip).unwrap());
                    is_regular = false;
                }
                &Cigar::Del(l) => {
                    self.max_del_cigar_len = cmp::max(l, self.max_del_cigar_len);
                    is_regular = false;
                }
                &Cigar::Ins(l) => {
                    self.max_ins_cigar_len = cmp::max(l, self.max_ins_cigar_len);
                    is_regular = false;
                }
                &Cigar::HardClip(_) => {
                    is_regular = false;
                }
                _ => continue,
            }
        }

        is_regular
    }
/// Update maximum observed cigar operation lengths. Return whether any D, I, S, or H operation
/// was found in the cigar string.
Update maximum observed cigar operation lengths. Return whether any D, I, S, or H operation
was found in the cigar string.
Update maximum observed cigar operation lengths . Return whether any D I S or H operation was found in the cigar string .
pub fn update_max_cigar_ops_len(&mut self, record: &bam::Record) -> bool {
        let norm = |j| NotNan::new(j as f64 / record.seq().len() as f64).unwrap();
        let mut is_regular = true;
        for c in record.cigar().iter() {
            match c {
                &Cigar::SoftClip(l) => {
                    let s = norm(l);
                    self.frac_max_softclip =
                        *cmp::max(s, NotNan::new(self.frac_max_softclip).unwrap());
                    is_regular = false;
                }
                &Cigar::Del(l) => {
                    self.max_del_cigar_len = cmp::max(l, self.max_del_cigar_len);
                    is_regular = false;
                }
                &Cigar::Ins(l) => {
                    self.max_ins_cigar_len = cmp::max(l, self.max_ins_cigar_len);
                    is_regular = false;
                }
                &Cigar::HardClip(_) => {
                    is_regular = false;
                }
                _ => continue,
            }
        }
        is_regular
    }
pub fn update_max_cigar_ops_len ( & mut self , record : & bam :: Record ) -> bool { let norm = | j | NotNan :: new ( j as f64 / record . seq ( ) . len ( ) as f64 ) . unwrap ( ) ; let mut is_regular = true ; for c in record . cigar ( ) . iter ( ) { match c { & Cigar :: SoftClip ( l ) => { let s = norm ( l ) ; self . frac_max_softclip = * cmp :: max ( s , NotNan :: new ( self . frac_max_softclip ) . unwrap ( ) ) ; is_regular = false ; } & Cigar :: Del ( l ) => { self . max_del_cigar_len = cmp :: max ( l , self . max_del_cigar_len ) ; is_regular = false ; } & Cigar :: Ins ( l ) => { self . max_ins_cigar_len = cmp :: max ( l , self . max_ins_cigar_len ) ; is_regular = false ; } & Cigar :: HardClip ( _ ) => { is_regular = false ; } _ => continue , } } is_regular }
Update maximum observed cigar operation lengths.
Update maximum observed cigar operation lengths .
&mut self
record
&bam::Record
&mut self
record
&bam::Record