# Class UmiMetrics

java.lang.Object
htsjdk.samtools.metrics.MetricBase
picard.sam.markduplicates.UmiMetrics

@DocumentedFeature(groupName="Metrics", summary="Metrics") public class UmiMetrics extends htsjdk.samtools.metrics.MetricBase
Metrics that are calculated during the process of marking duplicates within a stream of SAMRecords using the UmiAwareDuplicateSetIterator.

## Field Summary

Fields
Modifier and Type
Field
Description
`long`
`DUPLICATE_SETS_IGNORING_UMI`
Number of duplicate sets found before taking UMIs into account
`long`
`DUPLICATE_SETS_WITH_UMI`
Number of duplicate sets found after taking UMIs into account
`double`
`INFERRED_UMI_ENTROPY`
Entropy (in base 4) of the inferred UMI sequences, indicating the effective number of bases in the inferred UMIs.
`long`
`INFERRED_UNIQUE_UMIS`
Number of different inferred UMI sequences derived
`String`
`LIBRARY`
Library that was used to generate UMI data.
`double`
`MEAN_UMI_LENGTH`
Number of bases in each UMI
`long`
`OBSERVED_BASE_ERRORS`
Number of errors inferred by comparing the observed and inferred UMIs
`double`
`OBSERVED_UMI_ENTROPY`
Entropy (in base 4) of the observed UMI sequences, indicating the effective number of bases in the UMIs.
`long`
`OBSERVED_UNIQUE_UMIS`
Number of different UMI sequences observed
`double`
`PCT_UMI_WITH_N`
The percentage of reads that contain an UMI that contains at least one N
`double`
`UMI_BASE_QUALITIES`
Estimation of Phred scaled quality scores for UMIs

## Constructor Summary

Constructors
Constructor
Description
`UmiMetrics()`
`UmiMetrics(String library)`
`UmiMetrics(String library, double length, int observedUniqueUmis, int inferredUniqueUmis, int observedBaseErrors, int duplicateSetsWithoutUmi, int duplicateSetsWithUmi, double effectiveLengthOfInferredUmis, double effectiveLengthOfObservedUmis, double estimatedBaseQualityOfUmis, double percentUmiWithN)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addUmiObservation(String observedUmi, String inferredUmi)`
Add an observation of a UMI to the metrics
`void`
`addUmiObservationN()`
Add an observation of a UMI containing at least one N to the metrics
`void`
`calculateDerivedFields()`

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

`equals, hashCode, toString`

### Methods inherited from class Object

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

## Field Details

### LIBRARY

public String LIBRARY
Library that was used to generate UMI data.

### MEAN_UMI_LENGTH

public double MEAN_UMI_LENGTH
Number of bases in each UMI

### OBSERVED_UNIQUE_UMIS

public long OBSERVED_UNIQUE_UMIS
Number of different UMI sequences observed

### INFERRED_UNIQUE_UMIS

public long INFERRED_UNIQUE_UMIS
Number of different inferred UMI sequences derived

### OBSERVED_BASE_ERRORS

public long OBSERVED_BASE_ERRORS
Number of errors inferred by comparing the observed and inferred UMIs

### DUPLICATE_SETS_IGNORING_UMI

public long DUPLICATE_SETS_IGNORING_UMI
Number of duplicate sets found before taking UMIs into account

### DUPLICATE_SETS_WITH_UMI

public long DUPLICATE_SETS_WITH_UMI
Number of duplicate sets found after taking UMIs into account

### OBSERVED_UMI_ENTROPY

public double OBSERVED_UMI_ENTROPY
Entropy (in base 4) of the observed UMI sequences, indicating the effective number of bases in the UMIs. If this is significantly smaller than UMI_LENGTH, it indicates that the UMIs are not distributed uniformly.

### INFERRED_UMI_ENTROPY

public double INFERRED_UMI_ENTROPY
Entropy (in base 4) of the inferred UMI sequences, indicating the effective number of bases in the inferred UMIs. If this is significantly smaller than UMI_LENGTH, it indicates that the UMIs are not distributed uniformly.

### UMI_BASE_QUALITIES

public double UMI_BASE_QUALITIES
Estimation of Phred scaled quality scores for UMIs

### PCT_UMI_WITH_N

public double PCT_UMI_WITH_N
The percentage of reads that contain an UMI that contains at least one N

## Constructor Details

### UmiMetrics

public UmiMetrics()

### UmiMetrics

public UmiMetrics(String library)

### UmiMetrics

public UmiMetrics(String library, double length, int observedUniqueUmis, int inferredUniqueUmis, int observedBaseErrors, int duplicateSetsWithoutUmi, int duplicateSetsWithUmi, double effectiveLengthOfInferredUmis, double effectiveLengthOfObservedUmis, double estimatedBaseQualityOfUmis, double percentUmiWithN)

## Method Details

### calculateDerivedFields

public void calculateDerivedFields()

### addUmiObservation

public void addUmiObservation(String observedUmi, String inferredUmi)
Add an observation of a UMI to the metrics

Parameters:
  `observedUmi` - String containing the observed UMI
  `inferredUmi` - String containing the UMI inferred after error correcting the observed UMI

### addUmiObservationN

public void addUmiObservationN()
Add an observation of a UMI containing at least one N to the metrics