Package htsjdk.samtools.util
Class QualityUtil
java.lang.Object
htsjdk.samtools.util.QualityUtil
Utility class for working with quality scores and error probabilities.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic double
Given a phred score between 0 and 100 returns the probability of error.static int
getPhredScoreFromErrorProbability
(double probability) Gets the phred score for any given probability of error.static int
getPhredScoreFromObsAndErrors
(double observations, double errors) Gets the phred score given the specified observations and errors.static double
Calculates the sum of error probabilities for all read bases in the SAM record.
-
Constructor Details
-
QualityUtil
public QualityUtil()
-
-
Method Details
-
getErrorProbabilityFromPhredScore
public static double getErrorProbabilityFromPhredScore(int i) Given a phred score between 0 and 100 returns the probability of error. -
getPhredScoreFromErrorProbability
public static int getPhredScoreFromErrorProbability(double probability) Gets the phred score for any given probability of error. -
getPhredScoreFromObsAndErrors
public static int getPhredScoreFromObsAndErrors(double observations, double errors) Gets the phred score given the specified observations and errors. -
sumOfErrorProbabilities
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.
-