Package org.snpeff
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 java.lang.Object implements CommandLine
SnpEff's main command line program- Author:
- pcingola
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSnpEff.GeneDatabaseFormatAvailable gene database formatsstatic classSnpEff.InputFormatAvailable input formatsstatic classSnpEff.OutputFormatAvailable output formats
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String[]argsstatic java.lang.StringBUILDstatic java.lang.StringBUILD_DATEprotected booleancanonicalprotected java.lang.StringcanonicalFileprotected java.lang.Stringcommandstatic intCOMMAND_LINE_WIDTHprotected Configconfigprotected java.lang.StringconfigFileprotected java.util.Map<java.lang.String,java.lang.String>configOverrideprotected java.util.ArrayList<java.lang.String>customIntervalFilesprotected java.lang.StringdataDirprotected booleandebugstatic java.lang.StringDEFAULT_COMMANDprotected booleandownloadprotected booleanexpandIubprotected java.util.ArrayList<java.lang.String>filterIntervalFilesprotected Genomegenomeprotected java.lang.StringgenomeVerprotected booleanhelpprotected booleanhgvsprotected booleanhgvsForceprotected booleanhgvsOldprotected booleanhgvsOneLetterAaprotected booleanhgvsShiftprotected booleanhgvsTrIdprotected booleaninteractionprotected booleanlogprotected TranscriptSupportLevelmaxTranscriptSupportLevelprotected booleanmotifprotected booleanmultiThreadedprotected booleannextProtprotected booleannextProtKeepAllTrsprotected booleannoGenomeprotected intnumWorkersprotected booleanonlyProteinprotected booleanonlyRegulationprotected java.lang.StringonlyTranscriptsFileprotected java.lang.StringBuilderoutputprotected booleanquietprotected java.util.HashSet<java.lang.String>regulationTracksstatic java.lang.StringREVISIONprotected booleansaveOutputprotected java.lang.String[]shiftArgsprotected SnpEffsnpEffCmdstatic java.lang.StringSOFTWARE_NAMEprotected intspliceRegionExonSizeprotected intspliceRegionIntronMaxprotected intspliceRegionIntronMinprotected intspliceSiteSizeprotected booleanstrictprotected booleansuppressOutputprotected java.lang.BooleantreatAllAsProteinCodingprotected intupDownStreamLengthprotected booleanverbosestatic java.lang.StringVERSIONstatic java.lang.StringVERSION_AUTHORstatic java.lang.StringVERSION_BUILDstatic java.lang.StringVERSION_MAJORstatic java.lang.StringVERSION_SHORT
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRegulationTrack(java.lang.String cellType)protected voidcanonical()Filter canonical transcriptsSnpEffcmd()Create an appropriate SnpEffCmd* objectprotected java.lang.StringcommandLineStr(boolean splitLines)Command line argument list (try to fit it into COMMAND_LINE_WIDTH)java.lang.String[]getArgs()ConfiggetConfig()java.lang.StringgetConfigFile()java.lang.StringgetOutput()protected booleanisOpt(java.lang.String arg)Is this a command line option (e.g.voidload()protected voidloadConfig()Read config fileprotected intloadCustomFile(java.lang.String fileName)Read a custom interval filevoidloadDb()Load databaseprotected MarkersloadMarkers(java.lang.String fileName)Read markers file Supported formats: BED, TXT, BigBed, GFFstatic voidmain(java.lang.String[] args)MainvoidparseArgs(java.lang.String[] args)Parse command line argumentsjava.util.HashMap<java.lang.String,java.lang.String>reportValues()Additional values to be reportedbooleanrun()Run according to command line optionsprotected booleanrun(SnpEff snpEff, java.lang.String[] args, java.lang.StringBuilder err)Run a SnpEff (usually a sub-class)voidsetCanonical(boolean canonical)voidsetConfig(Config config)voidsetConfigFile(java.lang.String configFile)voidsetDebug(boolean debug)voidsetGenomeVer(java.lang.String genomeVer)voidsetLog(boolean log)voidsetNextProt(boolean nextProt)voidsetNextProtKeepAllTrs(boolean nextProtKeepAllTrs)voidsetShiftHgvs(boolean shiftHgvs)voidsetSpliceSiteSize(int spliceSiteSize)voidsetSupressOutput(boolean suppressOutput)voidsetUpDownStreamLength(int upDownStreamLength)voidsetVerbose(boolean verbose)voidusage(java.lang.String message)Show 'usage' message and exit with an error code '-1'protected voidusageDb()Show database load and build optionsprotected voidusageGeneric()Show generic optionsprotected voidusageGenericAndDb()
-
-
-
Field Detail
-
DEFAULT_COMMAND
public static final java.lang.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 java.lang.String SOFTWARE_NAME
- See Also:
- Constant Field Values
-
REVISION
public static final java.lang.String REVISION
- See Also:
- Constant Field Values
-
BUILD
public static final java.lang.String BUILD
- See Also:
- Constant Field Values
-
BUILD_DATE
public static final java.lang.String BUILD_DATE
- See Also:
- Constant Field Values
-
VERSION_MAJOR
public static final java.lang.String VERSION_MAJOR
- See Also:
- Constant Field Values
-
VERSION_SHORT
public static final java.lang.String VERSION_SHORT
- See Also:
- Constant Field Values
-
VERSION_BUILD
public static final java.lang.String VERSION_BUILD
- See Also:
- Constant Field Values
-
VERSION_AUTHOR
public static final java.lang.String VERSION_AUTHOR
- See Also:
- Constant Field Values
-
VERSION
public static final java.lang.String VERSION
- See Also:
- Constant Field Values
-
command
protected java.lang.String command
-
args
protected java.lang.String[] args
-
shiftArgs
protected java.lang.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
-
verbose
protected boolean verbose
-
treatAllAsProteinCoding
protected java.lang.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 java.lang.String configFile
-
dataDir
protected java.lang.String dataDir
-
genomeVer
protected java.lang.String genomeVer
-
onlyTranscriptsFile
protected java.lang.String onlyTranscriptsFile
-
canonicalFile
protected java.lang.String canonicalFile
-
maxTranscriptSupportLevel
protected TranscriptSupportLevel maxTranscriptSupportLevel
-
output
protected java.lang.StringBuilder output
-
config
protected Config config
-
genome
protected Genome genome
-
snpEffCmd
protected SnpEff snpEffCmd
-
customIntervalFiles
protected java.util.ArrayList<java.lang.String> customIntervalFiles
-
filterIntervalFiles
protected java.util.ArrayList<java.lang.String> filterIntervalFiles
-
regulationTracks
protected java.util.HashSet<java.lang.String> regulationTracks
-
configOverride
protected java.util.Map<java.lang.String,java.lang.String> configOverride
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
Main
-
addRegulationTrack
public void addRegulationTrack(java.lang.String cellType)
-
canonical
protected void canonical()
Filter canonical transcripts
-
cmd
public SnpEff cmd()
Create an appropriate SnpEffCmd* object
-
commandLineStr
protected java.lang.String commandLineStr(boolean splitLines)
Command line argument list (try to fit it into COMMAND_LINE_WIDTH)
-
getArgs
public java.lang.String[] getArgs()
- Specified by:
getArgsin interfaceCommandLine
-
getConfig
public Config getConfig()
-
getConfigFile
public java.lang.String getConfigFile()
-
getOutput
public java.lang.String getOutput()
-
isOpt
protected boolean isOpt(java.lang.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(java.lang.String fileName)
Read a custom interval file
-
loadDb
public void loadDb()
Load database
-
loadMarkers
protected Markers loadMarkers(java.lang.String fileName)
Read markers file Supported formats: BED, TXT, BigBed, GFF
-
parseArgs
public void parseArgs(java.lang.String[] args)
Parse command line arguments- Specified by:
parseArgsin interfaceCommandLine
-
reportValues
public java.util.HashMap<java.lang.String,java.lang.String> reportValues()
Additional values to be reported
-
run
public boolean run()
Run according to command line options- Specified by:
runin interfaceCommandLine
-
run
protected boolean run(SnpEff snpEff, java.lang.String[] args, java.lang.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(java.lang.String configFile)
-
setDebug
public void setDebug(boolean debug)
-
setGenomeVer
public void setGenomeVer(java.lang.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)
-
setUpDownStreamLength
public void setUpDownStreamLength(int upDownStreamLength)
-
setVerbose
public void setVerbose(boolean verbose)
-
usage
public void usage(java.lang.String message)
Show 'usage' message and exit with an error code '-1'- Specified by:
usagein interfaceCommandLine
-
usageDb
protected void usageDb()
Show database load and build options
-
usageGeneric
protected void usageGeneric()
Show generic options
-
usageGenericAndDb
protected void usageGenericAndDb()
-
-