# Class FieldSub

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

Direct Known Subclasses:
  `FieldEff, FieldGenotype, FieldLof`

public class FieldSub extends Field
A field that has sub fields (e.g. comma separated list of parameters): E.g.: 'AF1[2]'

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
`FieldSub(String name, Expression indexExpr)`

## Method Summary

Modifier and Type
Method
Description
`protected int`
`evalIndex(org.snpeff.vcf.VcfEntry vcfEntry)`
Evaluate index expression
`protected int`
`evalIndex(org.snpeff.vcf.VcfEntry vcfEntry, Expression idxExpr)`
Evaluate index expression (VCF entry)
`protected int`
`evalIndex(org.snpeff.vcf.VcfGenotype vcfGenotype)`
Evaluate index expression (VCF genotype)
`protected int`
`evalIndex(org.snpeff.vcf.VcfGenotype vcfGenotype, Expression idxExpr)`
Evaluate index expression (VCF genotype)
`String`
`getFieldString(org.snpeff.vcf.VcfEntry vcfEntry)`
Get a field from VcfEntry
`String`
`getFieldString(org.snpeff.vcf.VcfGenotype vcfGenotype)`
Get a field from VcfEntry
`protected boolean`
`isSub()`
`String`
`toString()`

### 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

### FieldSub

public FieldSub(String name, Expression indexExpr)

## Method Details

### evalIndex

protected int evalIndex(org.snpeff.vcf.VcfEntry vcfEntry)
Evaluate index expression

### evalIndex

protected int evalIndex(org.snpeff.vcf.VcfEntry vcfEntry, Expression idxExpr)
Evaluate index expression (VCF entry)

### evalIndex

protected int evalIndex(org.snpeff.vcf.VcfGenotype vcfGenotype)
Evaluate index expression (VCF genotype)

### evalIndex

protected int evalIndex(org.snpeff.vcf.VcfGenotype vcfGenotype, Expression idxExpr)
Evaluate index expression (VCF genotype)

### getFieldString

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

### getFieldString

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

Overrides:
  `getFieldString` in class `Field`

### isSub

protected boolean isSub()

Overrides:
  `isSub` in class `Field`

### toString

public String toString()

Overrides:
  `toString` in class `Field`