Package org.snpsift
Class SnpSiftCmdFilter
java.lang.Object
org.snpsift.SnpSift
org.snpsift.SnpSiftCmdFilter
- All Implemented Interfaces:
org.snpeff.snpEffect.commandLine.CommandLine
,org.snpeff.snpEffect.VcfAnnotator
Generic SnpSift filter
Filter out data based on VCF attributes:
- Chromosome, Position, etc.
- Intersecting intervals (BED file)
- Quality, Coverage, etc.
- Any INFO field
- Parse expression
- Int, double fields: FiledZZ == N, FiledZZ invalid input: '<' X, FiledZZ > X, FiledZZ invalid input: '<'= X, FiledZZ >= X
- String: FiledZZ eq "someString", FiledZZ =~ "some*regex$"
- Samples informations
- s50 (SNPs that appear in 50% of samples or more)
- Singletons
- Doubletons
- Tripletons
- negate all previous expressions
- pValue (Fisher exact test)
- Database information
- Known (e.g. in dbSnp)
- Novel (e.g. NOT in dbSnp)
- Author:
- pablocingolani
-
Field Summary
FieldsFields 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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
Read a file as a string setboolean
annotate
(org.snpeff.vcf.VcfEntry vcfEntry) boolean
annotateInit
(org.snpeff.fileIterator.VcfFileIterator vcfFile) List
<org.snpeff.vcf.VcfEntry> Filter a fileprotected List
<org.snpeff.vcf.VcfHeaderEntry> headers()
Headers to addvoid
init()
Initialize default valuesvoid
Parse command line optionsparseExpression
(String expression) Parse expressionboolean
run()
List
<org.snpeff.vcf.VcfEntry> run
(boolean createList) Run filtervoid
setAddFilterField
(String addFilterField) void
setExceptionIfNotFound
(boolean exceptionIfNotFound) void
setExpression
(String expression) void
setFilterId
(String filterId) void
setFormatVersion
(org.snpeff.vcf.EffFormatVersion formatVersion) void
setInverse
(boolean inverse) void
setRmFilterField
(String rmFilterField) void
void
setUsePassField
(boolean usePassField) void
Usage messageMethods inherited from class org.snpsift.SnpSift
addHeaders, annotateFinish, 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
-
Field Details
-
VCF_INFO_FILTER_DELETED
- See Also:
-
-
Constructor Details
-
SnpSiftCmdFilter
public SnpSiftCmdFilter() -
SnpSiftCmdFilter
-
-
Method Details
-
addSet
Read a file as a string set -
annotate
public boolean annotate(org.snpeff.vcf.VcfEntry vcfEntry) -
annotateInit
public boolean annotateInit(org.snpeff.fileIterator.VcfFileIterator vcfFile) - Specified by:
annotateInit
in interfaceorg.snpeff.snpEffect.VcfAnnotator
- Overrides:
annotateInit
in classSnpSift
-
filter
Filter a file -
headers
Description copied from class:SnpSift
Headers to add -
init
public void init()Initialize default values -
parseArgs
Parse command line options -
parseExpression
Parse expression- Throws:
Exception
-
run
public boolean run() -
run
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.
-
setAddFilterField
-
setExceptionIfNotFound
public void setExceptionIfNotFound(boolean exceptionIfNotFound) -
setExpression
-
setFilterId
-
setFormatVersion
public void setFormatVersion(org.snpeff.vcf.EffFormatVersion formatVersion) -
setInverse
public void setInverse(boolean inverse) -
setRmFilterField
-
setSets
-
setUsePassField
public void setUsePassField(boolean usePassField) -
usage
Usage message
-