# Class GenotypeQualityFilter

java.lang.Object
htsjdk.variant.variantcontext.filter.GenotypeQualityFilter

All Implemented Interfaces:
  `VariantContextFilter, Predicate<VariantContext>`

public class GenotypeQualityFilter extends Object implements VariantContextFilter
A Predicate on VariantContexts that returns true at sites that are either unfiltered, or passing (as variants).

## Constructor Summary

Constructors
Constructor
Description
`GenotypeQualityFilter(int gqThreshold)`
Constructor as above that doesn't take a sample, instead it will look at the first genotype of the variant context.
`GenotypeQualityFilter(int gqThreshold, String sample)`
Constructor for a filter that will keep VC for which the genotype quality (GQ) of sample passes a threshold.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`test(VariantContext variantContext)`

### Methods inherited from class Object

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

### Methods inherited from interface Predicate

`and, negate, or`

## Constructor Details

### GenotypeQualityFilter

public GenotypeQualityFilter(int gqThreshold, String sample)
Constructor for a filter that will keep VC for which the genotype quality (GQ) of sample passes a threshold. If sample is null, the first genotype in the variant context will be used.

Parameters:
  `gqThreshold` - the smallest value of GQ that this filter will pass
  `sample` - the name of the sample in the variant context whose genotype should be examined.

### GenotypeQualityFilter

public GenotypeQualityFilter(int gqThreshold)
Constructor as above that doesn't take a sample, instead it will look at the first genotype of the variant context.

Parameters:
  `gqThreshold` - the smallest value of GQ that this filter will pass

## Method Details

### test

public boolean test(VariantContext variantContext)

Specified by:
  `test` in interface `Predicate<VariantContext>`
Parameters:
  `variantContext` - the record to examine for GQ
Returns:
  true if variantContext is to be kept, otherwise false Assumes that this.sample is a sample in the variantContext, if not null, otherwise looks for the first genotype (and assumes it exists).