Package org.snpsift

# Class SnpSiftCmdAnnotate

java.lang.Object
org.snpsift.SnpSift
org.snpsift.SnpSiftCmdAnnotate

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

public class SnpSiftCmdAnnotate extends SnpSift
Annotate a VCF file with ID from another VCF file (database)

Author:
  pcingola

## Field Summary

Fields
Modifier and Type
Field
Description
`protected AnnotateVcfDb`
`annotateDb`
`protected boolean`
`annotateEmpty`
`protected String`
`chrPrev`
`protected int`
`countBadRef`
`protected String`
`existsInfoField`
`protected ArrayList<String>`
`infoFields`
`protected int`
`maxBlockSize`
`protected org.snpsift.SnpSiftCmdAnnotate.AnnotationMethod`
`method`
`protected String`
`prependInfoFieldName`
`static final int`
`SHOW`
`protected boolean`
`useId`
`protected boolean`
`useInfoField`
`protected boolean`
`useRefAlt`
`protected org.snpeff.fileIterator.VcfFileIterator`
`vcfFile`

### Fields inherited from class org.snpsift.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
`SnpSiftCmdAnnotate()`
`SnpSiftCmdAnnotate(String[] args)`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`annotate(org.snpeff.vcf.VcfEntry vcfEntry)`
`boolean`
`annotateInit(org.snpeff.fileIterator.VcfFileIterator vcfFile)`
Initialize database for annotation process
`protected List<org.snpeff.vcf.VcfHeaderEntry>`
`headers()`
Build headers to add
`void`
`init()`
Initialize default values
`void`
`parseArgs(String[] args)`
Parse command line arguments
`boolean`
`run()`
Annotate each entry of a VCF file
`List<org.snpeff.vcf.VcfEntry>`
`run(boolean createList)`
Run annotations
`void`
`setAnnotateEmpty(boolean annotateEmpty)`
`void`
`usage(String msg)`
Show usage message

### Methods inherited from class org.snpsift.SnpSift

`addHeaders, annotateFinish, 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 java.lang.Object

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

## Field Details

### SHOW

public static final int SHOW

See Also:
  - Constant Field Values

### annotateEmpty

protected boolean annotateEmpty

### useId

protected boolean useId

### useInfoField

protected boolean useInfoField

### useRefAlt

protected boolean useRefAlt

### method

protected org.snpsift.SnpSiftCmdAnnotate.AnnotationMethod method

### countBadRef

protected int countBadRef

### maxBlockSize

protected int maxBlockSize

### chrPrev

protected String chrPrev

### prependInfoFieldName

protected String prependInfoFieldName

### existsInfoField

protected String existsInfoField

### infoFields

protected ArrayList<String> infoFields

### vcfFile

protected org.snpeff.fileIterator.VcfFileIterator vcfFile

### annotateDb

protected AnnotateVcfDb annotateDb

## Constructor Details

### SnpSiftCmdAnnotate

public SnpSiftCmdAnnotate()

### SnpSiftCmdAnnotate

public SnpSiftCmdAnnotate(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`

### annotateInit

public boolean annotateInit(org.snpeff.fileIterator.VcfFileIterator vcfFile)
Initialize database for annotation process

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

### headers

protected List<org.snpeff.vcf.VcfHeaderEntry> headers()
Build 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 arguments

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

### run

public boolean run()
Annotate each entry of a VCF file

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 annotations

Parameters:
  `createList` - : If true, return a list with all annotated entries (used for test cases invalid input: '&' debugging)

### setAnnotateEmpty

public void setAnnotateEmpty(boolean annotateEmpty)

### usage

public void usage(String msg)
Show usage message

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