# Class CountingFilter

java.lang.Object
picard.filter.CountingFilter

All Implemented Interfaces:
  `htsjdk.samtools.filter.SamRecordFilter`

Direct Known Subclasses:
  `CountingAdapterFilter, CountingDuplicateFilter, CountingFilterWrapper, CountingMapQFilter, CountingPairedFilter`

public abstract class CountingFilter extends Object implements htsjdk.samtools.filter.SamRecordFilter
A SamRecordFilter that counts the number of bases in the reads which it filters out. Abstract and designed to be sub-classed to implement the desired filter. The filterOut method will count the number of records and bases that would be filtered out using the result of the reallyFilterOut method.

## Constructor Summary

Constructors
Constructor
Description
`CountingFilter()`

## Method Summary

Modifier and Type
Method
Description
`final boolean`
`filterOut(htsjdk.samtools.SAMRecord record)`
`boolean`
`filterOut(htsjdk.samtools.SAMRecord first, htsjdk.samtools.SAMRecord second)`
`long`
`getFilteredBases()`
Gets the number of bases that have been filtered out thus far.
`long`
`getFilteredRecords()`
Gets the number of records that have been filtered out thus far.
`abstract boolean`
`reallyFilterOut(htsjdk.samtools.SAMRecord record)`
Return true if we are to filter this record out, false otherwise.

### Methods inherited from class Object

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

## Constructor Details

### CountingFilter

public CountingFilter()

## Method Details

### getFilteredRecords

public long getFilteredRecords()
Gets the number of records that have been filtered out thus far.

### getFilteredBases

public long getFilteredBases()
Gets the number of bases that have been filtered out thus far.

### filterOut

public final boolean filterOut(htsjdk.samtools.SAMRecord record)

Specified by:
  `filterOut` in interface `htsjdk.samtools.filter.SamRecordFilter`

### reallyFilterOut

public abstract boolean reallyFilterOut(htsjdk.samtools.SAMRecord record)
Return true if we are to filter this record out, false otherwise.

### filterOut

public boolean filterOut(htsjdk.samtools.SAMRecord first, htsjdk.samtools.SAMRecord second)

Specified by:
  `filterOut` in interface `htsjdk.samtools.filter.SamRecordFilter`