calculates the sum of error probabilities for all read bases in the sam record . takes the sam record as opposed to the qualities directly so that it can make sure to count no-calls as 1 instead of what the quality score says . concode_field_sep double[] errorProbabilityByPhredScore concode_field_sep int getPhredScoreFromErrorProbability concode_elem_sep double getErrorProbabilityFromPhredScore concode_elem_sep int getPhredScoreFromObsAndErrors
double function ( final SAMRecord arg0 ) { final byte [ ] loc0 = arg0 . getReadBases ( ) ; final byte [ ] loc1 = arg0 . getBaseQualities ( ) ; double loc2 = 0 ; for ( int loc3 = 0 ; loc3 < loc0 . length ; ++ loc3 ) { if ( SequenceUtil . isNoCall ( loc0 [ loc3 ] ) ) ++ loc2 ; else loc2 += QualityUtil . getErrorProbabilityFromPhredScore ( loc1 [ loc3 ] ) ; } return loc2 ; }