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

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 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 Details

  • Constructor Details

    • SnpSiftCmdFilter

      public SnpSiftCmdFilter()
    • SnpSiftCmdFilter

      public SnpSiftCmdFilter(String[] args)
  • Method Details

    • addSet

      public void addSet(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 List<org.snpeff.vcf.VcfEntry> filter(String fileName, String expression, boolean createList)
      Filter a file
    • headers

      protected 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(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(String expression) throws Exception
      Parse expression
      Throws:
      Exception
    • run

      public boolean run()
      Specified by:
      run in interface org.snpeff.snpEffect.commandLine.CommandLine
      Overrides:
      run in class SnpSift
    • run

      public 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(String addFilterField)
    • setExceptionIfNotFound

      public void setExceptionIfNotFound(boolean exceptionIfNotFound)
    • setExpression

      public void setExpression(String expression)
    • setFilterId

      public void setFilterId(String filterId)
    • setFormatVersion

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

      public void setInverse(boolean inverse)
    • setRmFilterField

      public void setRmFilterField(String rmFilterField)
    • setSets

      public void setSets(ArrayList<HashSet<String>> sets)
    • setUsePassField

      public void setUsePassField(boolean usePassField)
    • usage

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