# Class VcfEffect

java.lang.Object
org.snpeff.vcf.VcfEffect

public class VcfEffect extends Object
An 'ANN' or 'EFF' entry in a VCF INFO field Note: 'EFF' is the old version that has been replaced by the standardized 'ANN' field (2014-12) *

Author:
  pablocingolani

## Field Summary

Fields
Modifier and Type
Field
Description
`static String[]`
`ANN_FIELD_NAMES`
`static boolean`
`debug`
`static String[]`
`EFF_FIELD_NAMES`

## Constructor Summary

Constructors
Constructor
Description
`VcfEffect(String effectString)`
Constructor: Guess format version
`VcfEffect(String effectString, EffFormatVersion formatVersion)`
Constructor: Force format version
`VcfEffect(VariantEffect variantEffect, EffFormatVersion formatVersion)`
`VcfEffect(VariantEffect variantEffect, EffFormatVersion formatVersion, boolean useSequenceOntology, boolean useFirstEffect)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addEffectType(EffectType effectType)`
`EffFormatVersion`
`formatVersion()`
Guess effect format version
`protected EffFormatVersion`
`formatVersion(String effectString)`
Guess format 'main' version (either 'ANN' of 'EFF') without trying to guess sub-version
`String`
`getAa()`
`int`
`getAaLen()`
`int`
`getAaPos()`
`String`
`getAllele()`
`BioType`
`getBioType()`
`int`
`getcDnaLen()`
`int`
`getcDnaPos()`
`int`
`getCdsLen()`
`int`
`getCdsPos()`
`VariantEffect.Coding`
`getCoding()`
`String`
`getCodon()`
`int`
`getDistance()`
`String`
`getEffectDetails()`
`String`
`getEffectsStr()`
`String`
`getEffectsStrSo()`
`EffectType`
`getEffectType()`
`List<EffectType>`
`getEffectTypes()`
`String`
`getEffectTypesStr()`
`String`
`getEffString()`
`String`
`getErrorsWarning()`
`String`
`getExonId()`
`String`
`getFeatureId()`
`String`
`getFeatureType()`
`String`
`getFieldByName(String fieldName)`
Get a subfield by name
`EffFormatVersion`
`getFormatVersion()`
`VariantEffect.FunctionalClass`
`getFunClass()`
`String`
`getGeneId()`
`String`
`getGeneName()`
`String`
`getGenotype()`
`String`
`getHgvsC()`
`String`
`getHgvsDna()`
`String`
`getHgvsP()`
`String`
`getHgvsProt()`
`VariantEffect.EffectImpact`
`getImpact()`
`int`
`getRank()`
`int`
`getRankMax()`
`String`
`getTranscriptId()`
`String`
`getVcfFieldString()`
String from VCF file (original, unparsed, string)
`String`
`getVcfFieldString(int index)`
Get a subfield as an index
`boolean`
`hasEffectType(EffectType effType)`
Does it have 'effType' ?
`static String`
`infoFieldName(EffFormatVersion formatVersion)`
Get info field name based on format version
`void`
`setAa(String aa)`
`void`
`setAaLen(int aaLen)`
`void`
`setBioType(BioType bioType)`
`void`
`setCoding(VariantEffect.Coding coding)`
`void`
`setCodon(String codon)`
`void`
`setEffectDetails(String effectDetails)`
`void`
`setEffectType(EffectType effect)`
`void`
`setExonId(String exonId)`
`void`
`setFormatVersion(EffFormatVersion formatVersion)`
`void`
`setFunClass(VariantEffect.FunctionalClass funClass)`
`void`
`setGeneId(String geneId)`
`void`
`setGeneName(String geneName)`
`void`
`setGenotype(String genotype)`
`void`
`setImpact(VariantEffect.EffectImpact impact)`
`void`
`setTranscriptId(String transcriptId)`
`void`
`setUseFirstEffect(boolean useFirstEffect)`
`void`
`setUseGeneId(boolean useGeneId)`
`void`
`setUseHgvs(boolean useHgvs)`
`String[]`
`split(String eff)`
Split a 'effect' string to an array of strings
`String`
`toString()`

### Methods inherited from class Object

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

## Field Details

### debug

public static boolean debug

### ANN_FIELD_NAMES

public static String[] ANN_FIELD_NAMES

### EFF_FIELD_NAMES

public static String[] EFF_FIELD_NAMES

## Constructor Details

### VcfEffect

public VcfEffect(String effectString)
Constructor: Guess format version

### VcfEffect

public VcfEffect(String effectString, EffFormatVersion formatVersion)
Constructor: Force format version

Parameters:
  `formatVersion` - : If null, will try to guess it

### VcfEffect

public VcfEffect(VariantEffect variantEffect, EffFormatVersion formatVersion)

### VcfEffect

public VcfEffect(VariantEffect variantEffect, EffFormatVersion formatVersion, boolean useSequenceOntology, boolean useFirstEffect)

## Method Details

### infoFieldName

public static String infoFieldName(EffFormatVersion formatVersion)
Get info field name based on format version

### addEffectType

public void addEffectType(EffectType effectType)

### formatVersion

public EffFormatVersion formatVersion()
Guess effect format version

### formatVersion

protected EffFormatVersion formatVersion(String effectString)
Guess format 'main' version (either 'ANN' of 'EFF') without trying to guess sub-version

### getAa

public String getAa()

### setAa

public void setAa(String aa)

### getAaLen

public int getAaLen()

### setAaLen

public void setAaLen(int aaLen)

### getAaPos

public int getAaPos()

### getAllele

public String getAllele()

### getBioType

public BioType getBioType()

### setBioType

public void setBioType(BioType bioType)

### getcDnaLen

public int getcDnaLen()

### getcDnaPos

public int getcDnaPos()

### getCdsLen

public int getCdsLen()

### getCdsPos

public int getCdsPos()

### getCoding

public VariantEffect.Coding getCoding()

### setCoding

public void setCoding(VariantEffect.Coding coding)

### getCodon

public String getCodon()

### setCodon

public void setCodon(String codon)

### getDistance

public int getDistance()

### getEffectDetails

public String getEffectDetails()

### setEffectDetails

public void setEffectDetails(String effectDetails)

### getEffectsStr

public String getEffectsStr()

### getEffectsStrSo

public String getEffectsStrSo()

### getEffectType

public EffectType getEffectType()

### setEffectType

public void setEffectType(EffectType effect)

### getEffectTypes

public List<EffectType> getEffectTypes()

### getEffectTypesStr

public String getEffectTypesStr()

### getEffString

public String getEffString()

### getErrorsWarning

public String getErrorsWarning()

### getExonId

public String getExonId()

### setExonId

public void setExonId(String exonId)

### getFeatureId

public String getFeatureId()

### getFeatureType

public String getFeatureType()

### getFieldByName

public String getFieldByName(String fieldName)
Get a subfield by name

### getFormatVersion

public EffFormatVersion getFormatVersion()

### setFormatVersion

public void setFormatVersion(EffFormatVersion formatVersion)

### getFunClass

public VariantEffect.FunctionalClass getFunClass()

### setFunClass

public void setFunClass(VariantEffect.FunctionalClass funClass)

### getGeneId

public String getGeneId()

### setGeneId

public void setGeneId(String geneId)

### getGeneName

public String getGeneName()

### setGeneName

public void setGeneName(String geneName)

### getGenotype

public String getGenotype()

### setGenotype

public void setGenotype(String genotype)

### getHgvsC

public String getHgvsC()

### getHgvsDna

public String getHgvsDna()

### getHgvsP

public String getHgvsP()

### getHgvsProt

public String getHgvsProt()

### getImpact

public VariantEffect.EffectImpact getImpact()

### setImpact

public void setImpact(VariantEffect.EffectImpact impact)

### getRank

public int getRank()

### getRankMax

public int getRankMax()

### getTranscriptId

public String getTranscriptId()

### setTranscriptId

public void setTranscriptId(String transcriptId)

### getVcfFieldString

public String getVcfFieldString()
String from VCF file (original, unparsed, string)

### getVcfFieldString

public String getVcfFieldString(int index)
Get a subfield as an index

### hasEffectType

public boolean hasEffectType(EffectType effType)
Does it have 'effType' ?

### setUseFirstEffect

public void setUseFirstEffect(boolean useFirstEffect)

### setUseGeneId

public void setUseGeneId(boolean useGeneId)

### setUseHgvs

public void setUseHgvs(boolean useHgvs)

### split

public String[] split(String eff)
Split a 'effect' string to an array of strings

### toString

public String toString()

Overrides:
  `toString` in class `Object`