Package org.snpsift
Class SnpSiftCmdFilterGt
- java.lang.Object
-
- org.snpsift.SnpSift
-
- org.snpsift.SnpSiftCmdFilterGt
-
- All Implemented Interfaces:
org.snpeff.snpEffect.commandLine.CommandLine,org.snpeff.snpEffect.VcfAnnotator
public class SnpSiftCmdFilterGt extends SnpSift
Generic SnpSift genotype filter Removes genotypes matching the filter: e.g. if the expression is "GQ < 20", all genotypes with quality lower than 20 will be replaced by './.' (missing)- Author:
- pablocingolani
-
-
Field Summary
-
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 SnpSiftCmdFilterGt()SnpSiftCmdFilterGt(java.lang.String[] args)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSet(java.lang.String fileName)Read a file as a string setjava.util.List<org.snpeff.vcf.VcfEntry>filter(java.lang.String fileName, java.lang.String expression, boolean createList)Filter a fileprotected java.util.List<org.snpeff.vcf.VcfHeaderEntry>headers()Headers to addvoidinit()Initialize default valuesvoidparseArgs(java.lang.String[] args)Parse command line optionsExpressionparseExpression(java.lang.String expression)Parse expressionbooleanrun()java.util.List<org.snpeff.vcf.VcfEntry>run(boolean createList)Run filtervoidusage(java.lang.String msg)Usage message-
Methods inherited from class org.snpsift.SnpSift
addHeaders, annotate, annotateFinish, annotateInit, cmd, commandLineStr, databaseDownload, databaseFind, error, getArgs, getConfig, getConfigFile, getOutput, isOpt, loadConfig, main, openVcfInputFile, processVcfHeader, setCommand, setCommand, setConfig, setConfigFile, setDbFileName, setDebug, setQuiet, setSaveOutput, setShowVcfHeader, setShowVersion, setSuppressOutput, setVcfHeaderAddProgramVersion, setVerbose, showCmd, showVersion, unSanitize, usageGenericAndDb
-
-
-
-
Method Detail
-
addSet
public void addSet(java.lang.String fileName)
Read a file as a string set
-
filter
public java.util.List<org.snpeff.vcf.VcfEntry> filter(java.lang.String fileName, java.lang.String expression, boolean createList)Filter a file
-
headers
protected java.util.List<org.snpeff.vcf.VcfHeaderEntry> headers()
Description copied from class:SnpSiftHeaders to add
-
parseArgs
public void parseArgs(java.lang.String[] args)
Parse command line options
-
parseExpression
public Expression parseExpression(java.lang.String expression) throws java.lang.Exception
Parse expression- Throws:
java.lang.Exception
-
run
public boolean run()
-
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.
-
-