# Class FieldGenotype

java.lang.Object
org.snpsift.lang.expression.Expression
org.snpsift.lang.expression.Field
org.snpsift.lang.expression.FieldSub
org.snpsift.lang.expression.FieldGenotype

Direct Known Subclasses:
  `FieldGenotypeSub`

public class FieldGenotype extends FieldSub
A field: E.g.: 'GEN[2].GT'

Author:
  pablocingolani

## Field Summary

### Fields inherited from class Field

`exceptionIfNotFound, name, number, returnType, TYPE_ALL, TYPE_ANY, vcfInfo, vcfInfoNumber`

### Fields inherited from class Expression

`debug, negated, operator`

## Constructor Summary

Constructors
Constructor
Description
`FieldGenotype(String name, Expression indexExpr)`

## Method Summary

Modifier and Type
Method
Description
`protected org.snpeff.vcf.VcfGenotype`
`evalGenotype(org.snpeff.vcf.VcfEntry vcfEntry)`
Evaluate expressions and return VcfGenotype
`String`
`getFieldString(org.snpeff.vcf.VcfEntry vcfEntry)`
Get a field from VcfEntry
`String`
`getFieldString(org.snpeff.vcf.VcfGenotype vcfGenotype)`
Get a field (as a Float) from VcfEntry
`protected boolean`
`isSub()`
`String`
`toString()`

### Methods inherited from class FieldSub

`evalIndex, evalIndex, evalIndex, evalIndex`

### Methods inherited from class Field

`eval, eval, fieldHeaderNotFound, fieldNotFound, getName, getReturnType, getSampleNum, gtFieldNotFound, indexStr, isSampleName, returnType, returnType, setExceptionIfNotFound`

### Methods inherited from class Expression

`setNegated`

### Methods inherited from class Object

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

## Constructor Details

### FieldGenotype

public FieldGenotype(String name, Expression indexExpr)

## Method Details

### evalGenotype

protected org.snpeff.vcf.VcfGenotype evalGenotype(org.snpeff.vcf.VcfEntry vcfEntry)
Evaluate expressions and return VcfGenotype

### getFieldString

public String getFieldString(org.snpeff.vcf.VcfEntry vcfEntry)
Get a field from VcfEntry

Overrides:
  `getFieldString` in class `FieldSub`

### getFieldString

public String getFieldString(org.snpeff.vcf.VcfGenotype vcfGenotype)
Get a field (as a Float) from VcfEntry

Overrides:
  `getFieldString` in class `FieldSub`

### isSub

protected boolean isSub()

Overrides:
  `isSub` in class `FieldSub`

### toString

public String toString()

Overrides:
  `toString` in class `FieldSub`