# Class SnpEff

java.lang.Object
org.snpeff.SnpEff

All Implemented Interfaces:
  `CommandLine`

Direct Known Subclasses:
  `SnpEffCmdAcat, SnpEffCmdBuild, SnpEffCmdBuildNextProt, SnpEffCmdCds, SnpEffCmdClosest, SnpEffCmdCount, SnpEffCmdDatabases, SnpEffCmdDownload, SnpEffCmdDump, SnpEffCmdEff, SnpEffCmdGenes2Bed, SnpEffCmdGsa, SnpEffCmdLen, SnpEffCmdPdb, SnpEffCmdProtein, SnpEffCmdSeq, SnpEffCmdShow, SnpEffCmdSpliceAnalysis, SnpEffCmdTranslocationsReport`

public class SnpEff extends Object implements CommandLine
SnpEff's main command line program

Author:
  pcingola

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`SnpEff.GeneDatabaseFormat`
Available gene database formats
`static enum`
`SnpEff.InputFormat`
Available input formats
`static enum`
`SnpEff.OutputFormat`
Available output formats

## Field Summary

Fields
Modifier and Type
Field
Description
`protected String[]`
`args`
`static final String`
`BUILD`
`static final String`
`BUILD_DATE`
`protected boolean`
`canonical`
`protected String`
`canonicalFile`
`protected String`
`command`
`static final int`
`COMMAND_LINE_WIDTH`
`protected Config`
`config`
`protected String`
`configFile`
`protected Map<String,String>`
`configOverride`
`protected ArrayList<String>`
`customIntervalFiles`
`protected String`
`dataDir`
`protected boolean`
`debug`
`static final String`
`DEFAULT_COMMAND`
`protected boolean`
`download`
`protected boolean`
`expandIub`
`protected ArrayList<String>`
`filterIntervalFiles`
`protected Genome`
`genome`
`protected String`
`genomeVer`
`protected boolean`
`help`
`protected boolean`
`hgvs`
`protected boolean`
`hgvsForce`
`protected boolean`
`hgvsOld`
`protected boolean`
`hgvsOneLetterAa`
`protected boolean`
`hgvsShift`
`protected boolean`
`hgvsTrId`
`protected boolean`
`interaction`
`protected boolean`
`log`
`protected TranscriptSupportLevel`
`maxTranscriptSupportLevel`
`protected boolean`
`motif`
`protected boolean`
`multiThreaded`
`protected boolean`
`nextProt`
`protected boolean`
`nextProtKeepAllTrs`
`protected boolean`
`noGenome`
`protected int`
`numWorkers`
`protected boolean`
`onlyProtein`
`protected boolean`
`onlyRegulation`
`protected String`
`onlyTranscriptsFile`
`protected StringBuilder`
`output`
`protected boolean`
`quiet`
`protected HashSet<String>`
`regulationTracks`
`static final String`
`REVISION`
`protected boolean`
`saveOutput`
`protected String[]`
`shiftArgs`
`protected SnpEff`
`snpEffCmd`
`static final String`
`SOFTWARE_NAME`
`protected int`
`spliceRegionExonSize`
`protected int`
`spliceRegionIntronMax`
`protected int`
`spliceRegionIntronMin`
`protected int`
`spliceSiteSize`
`protected boolean`
`strict`
`protected boolean`
`suppressOutput`
`protected Set<String>`
`tags`
`protected Set<String>`
`tagsNo`
`protected boolean`
`testing`
`protected Boolean`
`treatAllAsProteinCoding`
`protected int`
`upDownStreamLength`
`protected boolean`
`verbose`
`static final String`
`VERSION`
`static final String`
`VERSION_AUTHOR`
`static final String`
`VERSION_BUILD`
`static final String`
`VERSION_MAJOR`
`static final String`
`VERSION_SHORT`

## Constructor Summary

Constructors
Constructor
Description
`SnpEff()`
`SnpEff(String[] args)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addRegulationTrack(String cellType)`
`protected void`
`canonical()`
Filter canonical transcripts
`SnpEff`
`cmd()`
Create an appropriate SnpEffCmd* object
`protected String`
`commandLineStr(boolean splitLines)`
Command line argument list (try to fit it into COMMAND_LINE_WIDTH)
`protected void`
`filterTags()`
Filter by tags
`String[]`
`getArgs()`
`Config`
`getConfig()`
`String`
`getConfigFile()`
`String`
`getOutput()`
`protected boolean`
`isOpt(String arg)`
Is this a command line option (e.g.
`void`
`load()`
`protected void`
`loadConfig()`
Read config file
`protected int`
`loadCustomFile(String fileName)`
Read a custom interval file
`void`
`loadDb()`
Load database
`protected Markers`
`loadMarkers(String fileName)`
Read markers file Supported formats: BED, TXT, BigBed, GFF
`static void`
`main(String[] args)`
Main
`void`
`parseArgs(String[] args)`
Parse command line arguments
`HashMap<String,String>`
`reportValues()`
Additional values to be reported
`boolean`
`run()`
Run according to command line options
`protected boolean`
`run(SnpEff snpEff, String[] args, StringBuilder err)`
Run a SnpEff (usually a sub-class)
`void`
`setCanonical(boolean canonical)`
`void`
`setConfig(Config config)`
`void`
`setConfigFile(String configFile)`
`void`
`setDebug(boolean debug)`
`void`
`setGenomeVer(String genomeVer)`
`void`
`setLog(boolean log)`
`void`
`setNextProt(boolean nextProt)`
`void`
`setNextProtKeepAllTrs(boolean nextProtKeepAllTrs)`
`void`
`setShiftHgvs(boolean shiftHgvs)`
`void`
`setSpliceSiteSize(int spliceSiteSize)`
`void`
`setSupressOutput(boolean suppressOutput)`
`void`
`setTesting(boolean testing)`
`void`
`setUpDownStreamLength(int upDownStreamLength)`
`void`
`setVerbose(boolean verbose)`
`void`
`usage(String message)`
Show 'usage' message and exit with an error code '-1'
`protected void`
`usageDb()`
Show database load and build options
`protected void`
`usageGeneric()`
Show generic options
`protected void`
`usageGenericAndDb()`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### DEFAULT_COMMAND

public static final String DEFAULT_COMMAND

See Also:
  - Constant Field Values

### COMMAND_LINE_WIDTH

public static final int COMMAND_LINE_WIDTH

See Also:
  - Constant Field Values

### SOFTWARE_NAME

public static final String SOFTWARE_NAME

See Also:
  - Constant Field Values

### REVISION

public static final String REVISION

See Also:
  - Constant Field Values

### BUILD

public static final String BUILD

See Also:
  - Constant Field Values

### BUILD_DATE

public static final String BUILD_DATE

See Also:
  - Constant Field Values

### VERSION_MAJOR

public static final String VERSION_MAJOR

See Also:
  - Constant Field Values

### VERSION_SHORT

public static final String VERSION_SHORT

See Also:
  - Constant Field Values

### VERSION_BUILD

public static final String VERSION_BUILD

See Also:
  - Constant Field Values

### VERSION_AUTHOR

public static final String VERSION_AUTHOR

See Also:
  - Constant Field Values

### VERSION

public static final String VERSION

See Also:
  - Constant Field Values

### command

protected String command

### args

protected String[] args

### shiftArgs

protected String[] shiftArgs

### canonical

protected boolean canonical

### debug

protected boolean debug

### download

protected boolean download

### expandIub

protected boolean expandIub

### help

protected boolean help

### hgvs

protected boolean hgvs

### hgvsForce

protected boolean hgvsForce

### hgvsOneLetterAa

protected boolean hgvsOneLetterAa

### hgvsOld

protected boolean hgvsOld

### hgvsShift

protected boolean hgvsShift

### hgvsTrId

protected boolean hgvsTrId

### interaction

protected boolean interaction

### log

protected boolean log

### motif

protected boolean motif

### multiThreaded

protected boolean multiThreaded

### nextProt

protected boolean nextProt

### nextProtKeepAllTrs

protected boolean nextProtKeepAllTrs

### noGenome

protected boolean noGenome

### onlyProtein

protected boolean onlyProtein

### onlyRegulation

protected boolean onlyRegulation

### quiet

protected boolean quiet

### strict

protected boolean strict

### saveOutput

protected boolean saveOutput

### suppressOutput

protected boolean suppressOutput

### testing

protected boolean testing

### verbose

protected boolean verbose

### treatAllAsProteinCoding

protected Boolean treatAllAsProteinCoding

### numWorkers

protected int numWorkers

### spliceSiteSize

protected int spliceSiteSize

### spliceRegionExonSize

protected int spliceRegionExonSize

### spliceRegionIntronMin

protected int spliceRegionIntronMin

### spliceRegionIntronMax

protected int spliceRegionIntronMax

### upDownStreamLength

protected int upDownStreamLength

### configFile

protected String configFile

### dataDir

protected String dataDir

### genomeVer

protected String genomeVer

### onlyTranscriptsFile

protected String onlyTranscriptsFile

### canonicalFile

protected String canonicalFile

### tags

protected Set<String> tags

### tagsNo

protected Set<String> tagsNo

### maxTranscriptSupportLevel

protected TranscriptSupportLevel maxTranscriptSupportLevel

### output

protected StringBuilder output

### config

protected Config config

### genome

protected Genome genome

### snpEffCmd

protected SnpEff snpEffCmd

### customIntervalFiles

protected ArrayList<String> customIntervalFiles

### filterIntervalFiles

protected ArrayList<String> filterIntervalFiles

### regulationTracks

protected HashSet<String> regulationTracks

### configOverride

protected Map<String,String> configOverride

## Constructor Details

### SnpEff

public SnpEff()

### SnpEff

public SnpEff(String[] args)

## Method Details

### main

public static void main(String[] args)
Main

### addRegulationTrack

public void addRegulationTrack(String cellType)

### canonical

protected void canonical()
Filter canonical transcripts

### cmd

public SnpEff cmd()
Create an appropriate SnpEffCmd* object

### commandLineStr

protected String commandLineStr(boolean splitLines)
Command line argument list (try to fit it into COMMAND_LINE_WIDTH)

### filterTags

protected void filterTags()
Filter by tags

### getArgs

public String[] getArgs()

Specified by:
  `getArgs` in interface `CommandLine`

### getConfig

public Config getConfig()

### getConfigFile

public String getConfigFile()

### getOutput

public String getOutput()

### isOpt

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

### load

public void load()

### loadConfig

protected void loadConfig()
Read config file

### loadCustomFile

protected int loadCustomFile(String fileName)
Read a custom interval file

### loadDb

public void loadDb()
Load database

### loadMarkers

protected Markers loadMarkers(String fileName)
Read markers file Supported formats: BED, TXT, BigBed, GFF

### parseArgs

public void parseArgs(String[] args)
Parse command line arguments

Specified by:
  `parseArgs` in interface `CommandLine`

### reportValues

public HashMap<String,String> reportValues()
Additional values to be reported

### run

public boolean run()
Run according to command line options

Specified by:
  `run` in interface `CommandLine`

### run

protected boolean run(SnpEff snpEff, String[] args, StringBuilder err)
Run a SnpEff (usually a sub-class)

### setCanonical

public void setCanonical(boolean canonical)

### setConfig

public void setConfig(Config config)

### setConfigFile

public void setConfigFile(String configFile)

### setDebug

public void setDebug(boolean debug)

### setGenomeVer

public void setGenomeVer(String genomeVer)

### setLog

public void setLog(boolean log)

### setNextProt

public void setNextProt(boolean nextProt)

### setNextProtKeepAllTrs

public void setNextProtKeepAllTrs(boolean nextProtKeepAllTrs)

### setShiftHgvs

public void setShiftHgvs(boolean shiftHgvs)

### setSpliceSiteSize

public void setSpliceSiteSize(int spliceSiteSize)

### setSupressOutput

public void setSupressOutput(boolean suppressOutput)

### setTesting

public void setTesting(boolean testing)

### setUpDownStreamLength

public void setUpDownStreamLength(int upDownStreamLength)

### setVerbose

public void setVerbose(boolean verbose)

### usage

public void usage(String message)
Show 'usage' message and exit with an error code '-1'

Specified by:
  `usage` in interface `CommandLine`

### usageDb

protected void usageDb()
Show database load and build options

### usageGeneric

protected void usageGeneric()
Show generic options

### usageGenericAndDb

protected void usageGenericAndDb()