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 booleanexceptionIfNotFoundprotected java.lang.Stringnameprotected intnumberprotected org.snpeff.vcf.VcfInfoTypereturnTypestatic intTYPE_ALLstatic intTYPE_ANYprotected org.snpeff.vcf.VcfHeaderInfovcfInfoprotected org.snpeff.vcf.VcfHeaderInfo.VcfInfoNumbervcfInfoNumber-
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 Valueeval(org.snpeff.vcf.VcfEntry vcfEntry)Evaluate expression using VcfEntryValueeval(org.snpeff.vcf.VcfGenotype vcfGenotype)Evaluate expression using genotypeprotected java.lang.ObjectfieldHeaderNotFound(org.snpeff.vcf.VcfEntry vcfEntry)protected java.lang.ObjectfieldNotFound(org.snpeff.vcf.VcfEntry vcfEntry)java.lang.StringgetFieldString(org.snpeff.vcf.VcfGenotype vcfGenotype)java.lang.StringgetName()org.snpeff.vcf.VcfInfoTypegetReturnType(org.snpeff.vcf.VcfGenotype vcfGenotype)protected intgetSampleNum(org.snpeff.vcf.VcfEntry vcfEntry, java.lang.String name)protected java.lang.ObjectgtFieldNotFound(org.snpeff.vcf.VcfGenotype vcfGenotype)java.lang.StringindexStr(int index)Convert and index to a stringprotected booleanisSampleName(org.snpeff.vcf.VcfEntry vcfEntry, java.lang.String name)protected booleanisSub()org.snpeff.vcf.VcfInfoTypereturnType(org.snpeff.vcf.VcfEntry vcfEntry)org.snpeff.vcf.VcfInfoTypereturnType(org.snpeff.vcf.VcfGenotype vcfGenotype)voidsetExceptionIfNotFound(boolean exceptionIfNotFound)java.lang.StringtoString()-
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:ExpressionEvaluate expression using VcfEntry- Specified by:
evalin classExpression
-
eval
public Value eval(org.snpeff.vcf.VcfGenotype vcfGenotype)
Description copied from class:ExpressionEvaluate expression using genotype- Specified by:
evalin 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:
toStringin classjava.lang.Object
-
-