Package picard.sam.SamErrorMetric

# Class ErrorMetric

java.lang.Object
htsjdk.samtools.metrics.MetricBase
picard.analysis.MergeableMetricBase
picard.sam.SamErrorMetric.ErrorMetric

Direct Known Subclasses:
  `BaseErrorMetric`, `OverlappingErrorMetric`

@DocumentedFeature(groupName="Metrics", summary="Metrics") public class ErrorMetric extends MergeableMetricBase
Created by farjoun on 6/26/18.

## Nested Class Summary

## Nested classes/interfaces inherited from class picard.analysis.MergeableMetricBase

`MergeableMetricBase.MergeByAdding, MergeableMetricBase.MergeByAssertEquals, MergeableMetricBase.MergingIsManual, MergeableMetricBase.NoMergingIsDerived, MergeableMetricBase.NoMergingKeepsValue`

## Field Summary

Fields
Modifier and Type
Field
Description
`String`
`COVARIATE`
The value of the covariate define the bases included in this metric
`protected static double`
`PRIOR_ERROR`
`long`
`TOTAL_BASES`
The total number of bases included in the calculation of this metric

## Constructor Summary

Constructors
Constructor
Description
`ErrorMetric()`
`ErrorMetric(String covariate, long totalBases)`

## Method Summary

Modifier and Type
Method
Description
`protected int`
`computeQScore(long numberOfErrors)`
compute a qscore given the number of errors and the total number of bases.
`protected int`
`computeQScore(long numberOfErrors, long nTotalBases)`
compute a qscore given the number of errors and the total number of bases.
`static void`
`setPriorError(double priorError)`

### Methods inherited from class picard.analysis.MergeableMetricBase

`calculateDerivedFields, canMerge, merge, merge, mergeIfCan`

### Methods inherited from class htsjdk.samtools.metrics.MetricBase

`equals, hashCode, toString`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### PRIOR_ERROR

protected static double PRIOR_ERROR

### COVARIATE

public String COVARIATE
The value of the covariate define the bases included in this metric

### TOTAL_BASES

public long TOTAL_BASES
The total number of bases included in the calculation of this metric

## Constructor Details

### ErrorMetric

public ErrorMetric(String covariate, long totalBases)

### ErrorMetric

public ErrorMetric()

## Method Details

### setPriorError

public static void setPriorError(double priorError)

### computeQScore

protected int computeQScore(long numberOfErrors)
compute a qscore given the number of errors and the total number of bases. Uses a false count of 1 int the numerator and 1/PRIOR_ERROR in the denominator.

### computeQScore

protected int computeQScore(long numberOfErrors, long nTotalBases)
compute a qscore given the number of errors and the total number of bases. Uses a false count of 1 int the denominator and 1 in the numerator.