# Class VcfAnnotatorChain

java.lang.Object
org.snpeff.snpEffect.VcfAnnotatorChain

All Implemented Interfaces:
  `CommandLine, VcfAnnotator`

public class VcfAnnotatorChain extends Object implements VcfAnnotator
Maintains a list of VcfAnnotators and applies them one by one in the specified order

## Constructor Summary

Constructors
Constructor
Description
`VcfAnnotatorChain()`

## Method Summary

Modifier and Type
Method
Description
`void`
`add(VcfAnnotator vcfAnnotator)`
Add a new annotator
`boolean`
`addHeaders(VcfFileIterator vcfFile)`
Add annotation headers to VCF file
`boolean`
`annotate(VcfEntry vcfEntry)`
Annotate a VCF file entry
`boolean`
`annotateFinish(VcfFileIterator vcf)`
This method is called after all annotations have been performed.
`boolean`
`annotateInit(VcfFileIterator vcfFile)`
Initialize annotator: This method is called after vcfFile is opened, but before the header is output.
`String[]`
`getArgs()`
`void`
`parseArgs(String[] args)`
Parse command line arguments
`boolean`
`run()`
Run the command
`void`
`setConfig(Config config)`
Set configuration
`void`
`setDebug(boolean debug)`
Set debug mode
`void`
`setVerbose(boolean verbose)`
Set verbose mode
`void`
`usage(String message)`
Show 'usage' message and exit with an error code '-1'

### Methods inherited from class Object

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

## Constructor Details

### VcfAnnotatorChain

public VcfAnnotatorChain()

## Method Details

### add

public void add(VcfAnnotator vcfAnnotator)
Add a new annotator

### addHeaders

public boolean addHeaders(VcfFileIterator vcfFile)
Description copied from interface: `VcfAnnotator`
Add annotation headers to VCF file

Specified by:
  `addHeaders` in interface `VcfAnnotator`
Returns:
  true if OK, false on error

### annotate

public boolean annotate(VcfEntry vcfEntry)
Description copied from interface: `VcfAnnotator`
Annotate a VCF file entry

Specified by:
  `annotate` in interface `VcfAnnotator`
Returns:
  true if the entry was annotated

### annotateFinish

public boolean annotateFinish(VcfFileIterator vcf)
Description copied from interface: `VcfAnnotator`
This method is called after all annotations have been performed. The vcfFile might have already been closed by this time (i.e. the VcfFileIterator reached the end).

Specified by:
  `annotateFinish` in interface `VcfAnnotator`
Returns:
  true if OK, false on error

### annotateInit

public boolean annotateInit(VcfFileIterator vcfFile)
Description copied from interface: `VcfAnnotator`
Initialize annotator: This method is called after vcfFile is opened, but before the header is output. The first vcfEntry might have (and often has) already been read from the file.

Specified by:
  `annotateInit` in interface `VcfAnnotator`
Returns:
  true if OK, false on error

### getArgs

public String[] getArgs()

Specified by:
  `getArgs` in interface `CommandLine`

### parseArgs

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

Specified by:
  `parseArgs` in interface `CommandLine`

### run

public boolean run()
Description copied from interface: `CommandLine`
Run the command

Specified by:
  `run` in interface `CommandLine`

### setConfig

public void setConfig(Config config)
Description copied from interface: `VcfAnnotator`
Set configuration

Specified by:
  `setConfig` in interface `VcfAnnotator`

### setDebug

public void setDebug(boolean debug)
Description copied from interface: `VcfAnnotator`
Set debug mode

Specified by:
  `setDebug` in interface `VcfAnnotator`

### setVerbose

public void setVerbose(boolean verbose)
Description copied from interface: `VcfAnnotator`
Set verbose mode

Specified by:
  `setVerbose` in interface `VcfAnnotator`

### usage

public void usage(String message)
Description copied from interface: `CommandLine`
Show 'usage' message and exit with an error code '-1'

Specified by:
  `usage` in interface `CommandLine`