# Class SnpSiftCmdFilterGt

java.lang.Object
org.snpsift.SnpSift
org.snpsift.SnpSiftCmdFilterGt

All Implemented Interfaces:
  `org.snpeff.snpEffect.commandLine.CommandLine, org.snpeff.snpEffect.VcfAnnotator`

public class SnpSiftCmdFilterGt extends SnpSift
Generic SnpSift genotype filter Removes genotypes matching the filter: e.g. if the expression is "GQ invalid input: '<' 20", all genotypes with quality lower than 20 will be replaced by './.' (missing)

Author:
  pablocingolani

## Field Summary

### Fields inherited from class SnpSift

`args, BUILD, command, config, configFile, dataDir, dbFileName, dbTabix, dbType, debug, download, EMPTY_ARGS, errCount, genomeVersion, help, log, needsConfig, needsDb, needsGenome, numWorkers, output, quiet, REVISION, saveOutput, shiftArgs, SHOW_EVERY_VCFLINES, showVcfHeader, showVersion, SOFTWARE_NAME, suppressOutput, vcfHeaderAddProgramVersion, vcfHeaderProcessed, vcfInputFile, verbose, VERSION, VERSION_MAJOR, VERSION_NO_NAME, VERSION_SHORT`

## Constructor Summary

Constructors
Constructor
Description
`SnpSiftCmdFilterGt()`
`SnpSiftCmdFilterGt(String[] args)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addSet(String fileName)`
Read a file as a string set
`List<org.snpeff.vcf.VcfEntry>`
`filter(String fileName, String expression, boolean createList)`
Filter a file
`protected List<org.snpeff.vcf.VcfHeaderEntry>`
`headers()`
Headers to add
`void`
`init()`
Initialize default values
`void`
`parseArgs(String[] args)`
Parse command line options
`Expression`
`parseExpression(String expression)`
Parse expression
`boolean`
`run()`
`List<org.snpeff.vcf.VcfEntry>`
`run(boolean createList)`
Run filter
`void`
`usage(String msg)`
Usage message

### Methods inherited from class SnpSift

`addHeaders, annotate, annotateFinish, annotateInit, cmd, commandLineStr, databaseDownload, databaseFind, error, getArgs, getConfig, getConfigFile, getOutput, isOpt, loadConfig, main, openVcfInputFile, processVcfHeader, setCommand, setCommand, setConfig, setConfigFile, setDbFileName, setDebug, setQuiet, setSaveOutput, setShowVcfHeader, setShowVersion, setSuppressOutput, setVcfHeaderAddProgramVersion, setVerbose, showCmd, showVersion, unSanitize, usageGenericAndDb`

### Methods inherited from class Object

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

## Constructor Details

### SnpSiftCmdFilterGt

public SnpSiftCmdFilterGt()

### SnpSiftCmdFilterGt

public SnpSiftCmdFilterGt(String[] args)

## Method Details

### addSet

public void addSet(String fileName)
Read a file as a string set

### filter

public List<org.snpeff.vcf.VcfEntry> filter(String fileName, String expression, boolean createList)
Filter a file

### headers

protected List<org.snpeff.vcf.VcfHeaderEntry> headers()
Description copied from class: `SnpSift`
Headers to add

Overrides:
  `headers` in class `SnpSift`

### init

public void init()
Initialize default values

Overrides:
  `init` in class `SnpSift`

### parseArgs

public void parseArgs(String[] args)
Parse command line options

Specified by:
  `parseArgs` in interface `org.snpeff.snpEffect.commandLine.CommandLine`
Overrides:
  `parseArgs` in class `SnpSift`

### parseExpression

public Expression parseExpression(String expression) throws Exception
Parse expression

Throws:
  `Exception`

### run

public boolean run()

Specified by:
  `run` in interface `org.snpeff.snpEffect.commandLine.CommandLine`
Overrides:
  `run` in class `SnpSift`

### run

public List<org.snpeff.vcf.VcfEntry> run(boolean createList)
Run filter

Parameters:
  `createList` - : If true, create a list with the results. If false, show results on STDOUT
Returns:
  If 'createList' is true, return a list containing all vcfEntries that passed the filter. Otherwise return null.

### usage

public void usage(String msg)
Usage message

Specified by:
  `usage` in interface `org.snpeff.snpEffect.commandLine.CommandLine`
Overrides:
  `usage` in class `SnpSift`