# Class TargetMetricsCollector.Coverage

java.lang.Object
picard.analysis.directed.TargetMetricsCollector.Coverage

Enclosing class:
  `TargetMetricsCollector<METRIC_TYPE extends MultilevelMetrics>`

public static class TargetMetricsCollector.Coverage extends Object
A simple class that is used to store the coverage information about an interval.

## Field Summary

Fields
Modifier and Type
Field
Description
`long`
`readCount`

## Constructor Summary

Constructors
Constructor
Description
`Coverage(htsjdk.samtools.util.Interval i, int padding)`
Constructs a new coverage object for the provided mapping with the desired padding either side.

## Method Summary

Modifier and Type
Method
Description
`void`
`addBase(int offset)`
Adds a single point of depth at the desired offset into the coverage array.
`void`
`addBase(int offset, int depth)`
Adds some depth at the desired offset into the coverage array.
`int[]`
`getDepths()`
Gets the coverage depths as an array of ints.
`long`
`getTotal()`
`boolean`
`hasCoverage()`
Returns true if any base in the range has coverage of > 0
`void`
`incrementReadCount()`
Increments the # of reads mapping to this target.
`String`
`toString()`

### Methods inherited from class Object

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

## Field Details

### readCount

public long readCount

## Constructor Details

### Coverage

public Coverage(htsjdk.samtools.util.Interval i, int padding)
Constructs a new coverage object for the provided mapping with the desired padding either side.

## Method Details

### addBase

public void addBase(int offset)
Adds a single point of depth at the desired offset into the coverage array.

### addBase

public void addBase(int offset, int depth)
Adds some depth at the desired offset into the coverage array.

### incrementReadCount

public void incrementReadCount()
Increments the # of reads mapping to this target.

### hasCoverage

public boolean hasCoverage()
Returns true if any base in the range has coverage of > 0

### getDepths

public int[] getDepths()
Gets the coverage depths as an array of ints.

### getTotal

public long getTotal()

### toString

public String toString()

Overrides:
  `toString` in class `Object`