Package org.snpsift
Class SnpSiftCmdVcfOperator
- java.lang.Object
-
- org.snpsift.SnpSift
-
- org.snpsift.SnpSiftCmdVcfOperator
-
- All Implemented Interfaces:
org.snpeff.snpEffect.commandLine.CommandLine,org.snpeff.snpEffect.VcfAnnotator
public class SnpSiftCmdVcfOperator extends SnpSift
Annotate a field based on an operation (max, min, etc.) of other VCF fields- Author:
- pcingola
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSnpSiftCmdVcfOperator.Operator
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Stringfieldsprotected java.lang.String[]infoFieldsprotected SnpSiftCmdVcfOperator.Operatoroperatorprotected java.lang.StringoutField-
Fields inherited from class org.snpsift.SnpSift
args, BUILD, command, config, configFile, dataDir, dbFileName, dbTabix, dbType, debug, download, EMPTY_ARGS, errCount, genomeVersion, help, log, needsConfig, needsDb, needsGenome, numWorkers, output, quiet, REVISION, saveOutput, shiftArgs, SHOW_EVERY_VCFLINES, showVcfHeader, showVersion, SOFTWARE_NAME, suppressOutput, vcfHeaderAddProgramVersion, vcfHeaderProcessed, vcfInputFile, verbose, VERSION, VERSION_MAJOR, VERSION_NO_NAME, VERSION_SHORT
-
-
Constructor Summary
Constructors Constructor Description SnpSiftCmdVcfOperator()SnpSiftCmdVcfOperator(java.lang.String[] args)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanannotate(org.snpeff.vcf.VcfEntry vcfEntry)java.lang.DoubleapplyOp(java.util.List<java.lang.Double> vals)java.lang.String[]getArgs()java.util.List<java.lang.Double>getValues(org.snpeff.vcf.VcfEntry vcfEntry)java.util.List<java.lang.Double>getValues(org.snpeff.vcf.VcfEntry vcfEntry, java.lang.String field)Parse an INFO field (can be multiple valued) and return a list of Doubleprotected java.util.List<org.snpeff.vcf.VcfHeaderEntry>headers()Headers to addprotected doubleinitialValue()voidparseArgs(java.lang.String[] args)Parse command line argumentsbooleanrun()Annotatejava.util.List<org.snpeff.vcf.VcfEntry>run(boolean createList)Run filtervoidusage(java.lang.String msg)Show usage message-
Methods inherited from class org.snpsift.SnpSift
addHeaders, annotateFinish, annotateInit, cmd, commandLineStr, databaseDownload, databaseFind, error, getConfig, getConfigFile, getOutput, init, isOpt, loadConfig, main, openVcfInputFile, processVcfHeader, setCommand, setCommand, setConfig, setConfigFile, setDbFileName, setDebug, setQuiet, setSaveOutput, setShowVcfHeader, setShowVersion, setSuppressOutput, setVcfHeaderAddProgramVersion, setVerbose, showCmd, showVersion, unSanitize, usageGenericAndDb
-
-
-
-
Field Detail
-
fields
protected java.lang.String fields
-
outField
protected java.lang.String outField
-
operator
protected SnpSiftCmdVcfOperator.Operator operator
-
infoFields
protected java.lang.String[] infoFields
-
-
Method Detail
-
annotate
public boolean annotate(org.snpeff.vcf.VcfEntry vcfEntry)
-
applyOp
public java.lang.Double applyOp(java.util.List<java.lang.Double> vals)
-
getArgs
public java.lang.String[] getArgs()
-
getValues
public java.util.List<java.lang.Double> getValues(org.snpeff.vcf.VcfEntry vcfEntry)
-
getValues
public java.util.List<java.lang.Double> getValues(org.snpeff.vcf.VcfEntry vcfEntry, java.lang.String field)Parse an INFO field (can be multiple valued) and return a list of Double
-
headers
protected java.util.List<org.snpeff.vcf.VcfHeaderEntry> headers()
Description copied from class:SnpSiftHeaders to add
-
initialValue
protected double initialValue()
-
parseArgs
public void parseArgs(java.lang.String[] args)
Description copied from class:SnpSiftParse command line arguments
-
run
public boolean run()
Annotate
-
run
public java.util.List<org.snpeff.vcf.VcfEntry> run(boolean createList)
Run filter- Parameters:
createList- : If true, create a list with the results. If false, show results on STDOUT- Returns:
- If 'createList' is true, return a list containing all vcfEntries that passed the filter. Otherwise return null.
-
-