Package org.snpsift

Class SnpSiftCmdFilter

  • All Implemented Interfaces:
    org.snpeff.snpEffect.commandLine.CommandLine, org.snpeff.snpEffect.VcfAnnotator

    public class SnpSiftCmdFilter
    extends SnpSift
    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 < X, FiledZZ > X, FiledZZ <= 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 Detail

      • VCF_INFO_FILTER_DELETED

        public static final java.lang.String VCF_INFO_FILTER_DELETED
        See Also:
        Constant Field Values
    • Constructor Detail

      • SnpSiftCmdFilter

        public SnpSiftCmdFilter()
      • SnpSiftCmdFilter

        public SnpSiftCmdFilter​(java.lang.String[] args)
    • Method Detail

      • addSet

        public void addSet​(java.lang.String fileName)
        Read a file as a string set
      • annotate

        public boolean annotate​(org.snpeff.vcf.VcfEntry vcfEntry)
        Specified by:
        annotate in interface org.snpeff.snpEffect.VcfAnnotator
        Overrides:
        annotate in class SnpSift
      • annotateInit

        public boolean annotateInit​(org.snpeff.fileIterator.VcfFileIterator vcfFile)
        Specified by:
        annotateInit in interface org.snpeff.snpEffect.VcfAnnotator
        Overrides:
        annotateInit in class SnpSift
      • 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: SnpSift
        Headers to add
        Overrides:
        headers in class SnpSift
      • init

        public void init()
        Initialize default values
        Overrides:
        init in class SnpSift
      • parseArgs

        public void parseArgs​(java.lang.String[] args)
        Parse command line options
        Specified by:
        parseArgs in interface org.snpeff.snpEffect.commandLine.CommandLine
        Overrides:
        parseArgs in class SnpSift
      • parseExpression

        public Expression parseExpression​(java.lang.String expression)
                                   throws java.lang.Exception
        Parse expression
        Throws:
        java.lang.Exception
      • run

        public boolean run()
        Specified by:
        run in interface org.snpeff.snpEffect.commandLine.CommandLine
        Overrides:
        run in class SnpSift
      • 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.
      • setAddFilterField

        public void setAddFilterField​(java.lang.String addFilterField)
      • setExceptionIfNotFound

        public void setExceptionIfNotFound​(boolean exceptionIfNotFound)
      • setExpression

        public void setExpression​(java.lang.String expression)
      • setFilterId

        public void setFilterId​(java.lang.String filterId)
      • setFormatVersion

        public void setFormatVersion​(org.snpeff.vcf.EffFormatVersion formatVersion)
      • setInverse

        public void setInverse​(boolean inverse)
      • setRmFilterField

        public void setRmFilterField​(java.lang.String rmFilterField)
      • setSets

        public void setSets​(java.util.ArrayList<java.util.HashSet<java.lang.String>> sets)
      • setUsePassField

        public void setUsePassField​(boolean usePassField)
      • usage

        public void usage​(java.lang.String msg)
        Usage message
        Specified by:
        usage in interface org.snpeff.snpEffect.commandLine.CommandLine
        Overrides:
        usage in class SnpSift