Package org.snpsift

Class SnpSift

java.lang.Object
org.snpsift.SnpSift
All Implemented Interfaces:
org.snpeff.snpEffect.commandLine.CommandLine, org.snpeff.snpEffect.VcfAnnotator
Direct Known Subclasses:
SnpSiftCmdAlleleMatrix, SnpSiftCmdAnnotate, SnpSiftCmdCaseControl, SnpSiftCmdCaseControlSummary, SnpSiftCmdConcordance, SnpSiftCmdCovarianceMatrix, SnpSiftCmdDbNsfp, SnpSiftCmdExtractFields, SnpSiftCmdFilter, SnpSiftCmdFilterChrPos, SnpSiftCmdFilterGt, SnpSiftCmdGeneSets, SnpSiftCmdGt, SnpSiftCmdGwasCatalog, SnpSiftCmdHwe, SnpSiftCmdIntersect, SnpSiftCmdIntervals, SnpSiftCmdIntervalsIndex, SnpSiftCmdJoin, SnpSiftCmdPedShow, SnpSiftCmdPhastCons, SnpSiftCmdPrivate, SnpSiftCmdRemoveReferenceGenotypes, SnpSiftCmdRmInfo, SnpSiftCmdSort, SnpSiftCmdSplit, SnpSiftCmdTsTv, SnpSiftCmdVarType, SnpSiftCmdVcf2Tped, SnpSiftCmdVcfCheck, SnpSiftCmdVcfOperator

public class SnpSift extends Object implements org.snpeff.snpEffect.VcfAnnotator, org.snpeff.snpEffect.commandLine.CommandLine
Generic SnpSift tool caller
Author:
pablocingolani
  • Field Details

    • BUILD

      public static final String BUILD
      See Also:
    • SOFTWARE_NAME

      public static final String SOFTWARE_NAME
      See Also:
    • VERSION_MAJOR

      public static final String VERSION_MAJOR
      See Also:
    • REVISION

      public static final String REVISION
      See Also:
    • VERSION_SHORT

      public static final String VERSION_SHORT
      See Also:
    • VERSION

      public static final String VERSION
      See Also:
    • VERSION_NO_NAME

      public static final String VERSION_NO_NAME
      See Also:
    • SHOW_EVERY_VCFLINES

      public static int SHOW_EVERY_VCFLINES
    • EMPTY_ARGS

      public static final String[] EMPTY_ARGS
    • dbTabix

      protected boolean dbTabix
    • debug

      protected boolean debug
    • download

      protected boolean download
    • help

      protected boolean help
    • log

      protected boolean log
    • needsConfig

      protected boolean needsConfig
    • needsDb

      protected boolean needsDb
    • needsGenome

      protected boolean needsGenome
    • quiet

      protected boolean quiet
    • saveOutput

      protected boolean saveOutput
    • showVcfHeader

      protected boolean showVcfHeader
    • showVersion

      protected boolean showVersion
    • suppressOutput

      protected boolean suppressOutput
    • vcfHeaderProcessed

      protected boolean vcfHeaderProcessed
    • vcfHeaderAddProgramVersion

      protected boolean vcfHeaderAddProgramVersion
    • verbose

      protected boolean verbose
    • args

      protected String[] args
    • command

      protected String command
    • dbFileName

      protected String dbFileName
    • dbType

      protected String dbType
    • genomeVersion

      protected String genomeVersion
    • vcfInputFile

      protected String vcfInputFile
    • numWorkers

      protected int numWorkers
    • output

      protected StringBuilder output
    • errCount

      protected HashMap<String,Integer> errCount
    • config

      protected org.snpeff.snpEffect.Config config
    • configFile

      protected String configFile
    • dataDir

      protected String dataDir
    • shiftArgs

      protected String[] shiftArgs
  • Constructor Details

    • SnpSift

      public SnpSift()
    • SnpSift

      public SnpSift(String[] args)
  • Method Details

    • main

      public static void main(String[] args)
      Main
    • addHeaders

      public boolean addHeaders(org.snpeff.fileIterator.VcfFileIterator vcfFile)
      Add VCF headers
      Specified by:
      addHeaders in interface org.snpeff.snpEffect.VcfAnnotator
    • annotate

      public boolean annotate(org.snpeff.vcf.VcfEntry vcfEntry)
      Specified by:
      annotate in interface org.snpeff.snpEffect.VcfAnnotator
    • annotateFinish

      public boolean annotateFinish(org.snpeff.fileIterator.VcfFileIterator vcfFile)
      Specified by:
      annotateFinish in interface org.snpeff.snpEffect.VcfAnnotator
    • annotateInit

      public boolean annotateInit(org.snpeff.fileIterator.VcfFileIterator vcfFile)
      Specified by:
      annotateInit in interface org.snpeff.snpEffect.VcfAnnotator
    • cmd

      public SnpSift cmd()
      Run: Executes the appropriate class
    • commandLineStr

      protected String commandLineStr()
      Show command line
    • databaseDownload

      protected boolean databaseDownload()
      Download a database
    • databaseFind

      protected String databaseFind()
      Find database file name.
    • error

      public void error(Throwable e, String message)
      Show an error (if not 'quiet' mode)
    • getArgs

      public String[] getArgs()
      Specified by:
      getArgs in interface org.snpeff.snpEffect.commandLine.CommandLine
    • getConfig

      public org.snpeff.snpEffect.Config getConfig()
    • getConfigFile

      public String getConfigFile()
    • getOutput

      public String getOutput()
    • headers

      protected List<org.snpeff.vcf.VcfHeaderEntry> headers()
      Headers to add
    • init

      public void init()
      Initialize default values
    • isOpt

      protected boolean isOpt(String arg)
      Is this a command line option (e.g. "-tfam" is a command line option, but "-" means STDIN)
    • loadConfig

      protected void loadConfig()
      Read config file
    • openVcfInputFile

      protected org.snpeff.fileIterator.VcfFileIterator openVcfInputFile()
      Open VCF input file
    • parseArgs

      public void parseArgs(String[] args)
      Parse command line arguments
      Specified by:
      parseArgs in interface org.snpeff.snpEffect.commandLine.CommandLine
    • processVcfHeader

      protected String processVcfHeader(org.snpeff.fileIterator.VcfFileIterator vcf)
      Process VCF header related issues
    • run

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

      public void setCommand(Class clss)
    • setCommand

      public void setCommand(String command)
    • setConfig

      public void setConfig(org.snpeff.snpEffect.Config config)
      Specified by:
      setConfig in interface org.snpeff.snpEffect.VcfAnnotator
    • setConfigFile

      public void setConfigFile(String configFile)
    • setDbFileName

      public void setDbFileName(String dbFileName)
    • setDebug

      public void setDebug(boolean debug)
      Specified by:
      setDebug in interface org.snpeff.snpEffect.VcfAnnotator
    • setQuiet

      public void setQuiet(boolean quiet)
    • setSaveOutput

      public void setSaveOutput(boolean saveOutput)
    • setShowVcfHeader

      public void setShowVcfHeader(boolean showVcfHeader)
    • setShowVersion

      public void setShowVersion(boolean showVersion)
    • setSuppressOutput

      public void setSuppressOutput(boolean suppressOutput)
    • setVcfHeaderAddProgramVersion

      public void setVcfHeaderAddProgramVersion(boolean vcfHeaderAddProgramVersion)
    • setVerbose

      public void setVerbose(boolean verbose)
      Specified by:
      setVerbose in interface org.snpeff.snpEffect.VcfAnnotator
    • showCmd

      public void showCmd()
      Show command line
    • showVersion

      public void showVersion()
      Show version number
    • unSanitize

      public String unSanitize(String str)
      Convert a sanitized expression (from Galaxy) back to the original string References: http://www.mail-archive.com/galaxy-dev@lists.bx.psu.edu/msg00530.html
    • usage

      public void usage(String msg)
      Show usage message
      Specified by:
      usage in interface org.snpeff.snpEffect.commandLine.CommandLine
    • usageGenericAndDb

      protected void usageGenericAndDb()
      Options common to all commands