Package org.snpsift.lang.expression
Class Field
- java.lang.Object
-
- org.snpsift.lang.expression.Expression
-
- org.snpsift.lang.expression.Field
-
- Direct Known Subclasses:
FieldConstant
,FieldSub
public class Field extends Expression
A field: E.g.: 'DP', 'CHROM'- Author:
- pablocingolani
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
exceptionIfNotFound
protected java.lang.String
name
protected int
number
protected org.snpeff.vcf.VcfInfoType
returnType
static int
TYPE_ALL
static int
TYPE_ANY
protected org.snpeff.vcf.VcfHeaderInfo
vcfInfo
protected org.snpeff.vcf.VcfHeaderInfo.VcfInfoNumber
vcfInfoNumber
-
Fields inherited from class org.snpsift.lang.expression.Expression
debug, negated, operator
-
-
Constructor Summary
Constructors Constructor Description Field(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Value
eval(org.snpeff.vcf.VcfEntry vcfEntry)
Evaluate expression using VcfEntryValue
eval(org.snpeff.vcf.VcfGenotype vcfGenotype)
Evaluate expression using genotypeprotected java.lang.Object
fieldHeaderNotFound(org.snpeff.vcf.VcfEntry vcfEntry)
protected java.lang.Object
fieldNotFound(org.snpeff.vcf.VcfEntry vcfEntry)
java.lang.String
getFieldString(org.snpeff.vcf.VcfGenotype vcfGenotype)
java.lang.String
getName()
org.snpeff.vcf.VcfInfoType
getReturnType(org.snpeff.vcf.VcfGenotype vcfGenotype)
protected int
getSampleNum(org.snpeff.vcf.VcfEntry vcfEntry, java.lang.String name)
protected java.lang.Object
gtFieldNotFound(org.snpeff.vcf.VcfGenotype vcfGenotype)
java.lang.String
indexStr(int index)
Convert and index to a stringprotected boolean
isSampleName(org.snpeff.vcf.VcfEntry vcfEntry, java.lang.String name)
protected boolean
isSub()
org.snpeff.vcf.VcfInfoType
returnType(org.snpeff.vcf.VcfEntry vcfEntry)
org.snpeff.vcf.VcfInfoType
returnType(org.snpeff.vcf.VcfGenotype vcfGenotype)
void
setExceptionIfNotFound(boolean exceptionIfNotFound)
java.lang.String
toString()
-
Methods inherited from class org.snpsift.lang.expression.Expression
setNegated
-
-
-
-
Field Detail
-
TYPE_ALL
public static final int TYPE_ALL
- See Also:
- Constant Field Values
-
TYPE_ANY
public static final int TYPE_ANY
- See Also:
- Constant Field Values
-
name
protected java.lang.String name
-
returnType
protected org.snpeff.vcf.VcfInfoType returnType
-
exceptionIfNotFound
protected boolean exceptionIfNotFound
-
vcfInfo
protected org.snpeff.vcf.VcfHeaderInfo vcfInfo
-
number
protected int number
-
vcfInfoNumber
protected org.snpeff.vcf.VcfHeaderInfo.VcfInfoNumber vcfInfoNumber
-
-
Method Detail
-
eval
public Value eval(org.snpeff.vcf.VcfEntry vcfEntry)
Description copied from class:Expression
Evaluate expression using VcfEntry- Specified by:
eval
in classExpression
-
eval
public Value eval(org.snpeff.vcf.VcfGenotype vcfGenotype)
Description copied from class:Expression
Evaluate expression using genotype- Specified by:
eval
in classExpression
-
fieldHeaderNotFound
protected java.lang.Object fieldHeaderNotFound(org.snpeff.vcf.VcfEntry vcfEntry)
-
fieldNotFound
protected java.lang.Object fieldNotFound(org.snpeff.vcf.VcfEntry vcfEntry)
-
getFieldString
public java.lang.String getFieldString(org.snpeff.vcf.VcfGenotype vcfGenotype)
-
getName
public java.lang.String getName()
-
getReturnType
public org.snpeff.vcf.VcfInfoType getReturnType(org.snpeff.vcf.VcfGenotype vcfGenotype)
-
getSampleNum
protected int getSampleNum(org.snpeff.vcf.VcfEntry vcfEntry, java.lang.String name)
-
gtFieldNotFound
protected java.lang.Object gtFieldNotFound(org.snpeff.vcf.VcfGenotype vcfGenotype)
-
indexStr
public java.lang.String indexStr(int index)
Convert and index to a string
-
isSampleName
protected boolean isSampleName(org.snpeff.vcf.VcfEntry vcfEntry, java.lang.String name)
-
isSub
protected boolean isSub()
-
returnType
public org.snpeff.vcf.VcfInfoType returnType(org.snpeff.vcf.VcfEntry vcfEntry)
-
returnType
public org.snpeff.vcf.VcfInfoType returnType(org.snpeff.vcf.VcfGenotype vcfGenotype)
-
setExceptionIfNotFound
public void setExceptionIfNotFound(boolean exceptionIfNotFound)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-