# Class SnpSiftCmdVcfOperator

java.lang.Object
org.snpsift.SnpSift
org.snpsift.SnpSiftCmdVcfOperator

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

public class SnpSiftCmdVcfOperator extends SnpSift
Annotate a field based on an operation (max, min, etc.) of other VCF fields

Author:
  pcingola

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`SnpSiftCmdVcfOperator.Operator`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected String`
`fields`
`protected String[]`
`infoFields`
`protected SnpSiftCmdVcfOperator.Operator`
`operator`
`protected String`
`outField`

### 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
`SnpSiftCmdVcfOperator()`
`SnpSiftCmdVcfOperator(String[] args)`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`annotate(org.snpeff.vcf.VcfEntry vcfEntry)`
`Double`
`applyOp(List<Double> vals)`
`String[]`
`getArgs()`
`List<Double>`
`getValues(org.snpeff.vcf.VcfEntry vcfEntry)`
`List<Double>`
`getValues(org.snpeff.vcf.VcfEntry vcfEntry, String field)`
Parse an INFO field (can be multiple valued) and return a list of Double
`protected List<org.snpeff.vcf.VcfHeaderEntry>`
`headers()`
Headers to add
`protected double`
`initialValue()`
`void`
`parseArgs(String[] args)`
Parse command line arguments
`boolean`
`run()`
Annotate
`List<org.snpeff.vcf.VcfEntry>`
`run(boolean createList)`
Run filter
`void`
`usage(String msg)`
Show usage message

### Methods inherited from class SnpSift

`addHeaders, annotateFinish, annotateInit, cmd, commandLineStr, databaseDownload, databaseFind, error, getConfig, getConfigFile, getOutput, init, 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`

## Field Details

### fields

protected String fields

### outField

protected String outField

### operator

protected SnpSiftCmdVcfOperator.Operator operator

### infoFields

protected String[] infoFields

## Constructor Details

### SnpSiftCmdVcfOperator

public SnpSiftCmdVcfOperator()

### SnpSiftCmdVcfOperator

public SnpSiftCmdVcfOperator(String[] args)

## Method Details

### annotate

public boolean annotate(org.snpeff.vcf.VcfEntry vcfEntry)

Specified by:
  `annotate` in interface `org.snpeff.snpEffect.VcfAnnotator`
Overrides:
  `annotate` in class `SnpSift`

### applyOp

public Double applyOp(List<Double> vals)

### getArgs

public String[] getArgs()

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

### getValues

public List<Double> getValues(org.snpeff.vcf.VcfEntry vcfEntry)

### getValues

public List<Double> getValues(org.snpeff.vcf.VcfEntry vcfEntry, String field)
Parse an INFO field (can be multiple valued) and return a list of Double

### headers

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

Overrides:
  `headers` in class `SnpSift`

### initialValue

protected double initialValue()

### parseArgs

public void parseArgs(String[] args)
Description copied from class: `SnpSift`
Parse command line arguments

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

### run

public boolean run()
Annotate

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)
Description copied from class: `SnpSift`
Show usage message

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