Package org.snpsift
Class SnpSiftCmdAnnotate
- java.lang.Object
-
- org.snpsift.SnpSift
-
- org.snpsift.SnpSiftCmdAnnotate
-
- All Implemented Interfaces:
org.snpeff.snpEffect.commandLine.CommandLine
,org.snpeff.snpEffect.VcfAnnotator
public class SnpSiftCmdAnnotate extends SnpSift
Annotate a VCF file with ID from another VCF file (database)- Author:
- pcingola
-
-
Field Summary
Fields Modifier and Type Field Description protected AnnotateVcfDb
annotateDb
protected boolean
annotateEmpty
protected java.lang.String
chrPrev
protected int
countBadRef
protected java.lang.String
existsInfoField
protected java.util.ArrayList<java.lang.String>
infoFields
protected int
maxBlockSize
protected org.snpsift.SnpSiftCmdAnnotate.AnnotationMethod
method
protected java.lang.String
prependInfoFieldName
static int
SHOW
protected boolean
useId
protected boolean
useInfoField
protected boolean
useRefAlt
protected org.snpeff.fileIterator.VcfFileIterator
vcfFile
-
Fields inherited from class org.snpsift.SnpSift
args, BUILD, command, config, configFile, dataDir, dbFileName, dbTabix, dbType, debug, download, EMPTY_ARGS, errCount, genomeVersion, help, log, needsConfig, needsDb, needsGenome, numWorkers, output, quiet, REVISION, saveOutput, shiftArgs, SHOW_EVERY_VCFLINES, showVcfHeader, showVersion, SOFTWARE_NAME, suppressOutput, vcfHeaderAddProgramVersion, vcfHeaderProcessed, vcfInputFile, verbose, VERSION, VERSION_MAJOR, VERSION_NO_NAME, VERSION_SHORT
-
-
Constructor Summary
Constructors Constructor Description SnpSiftCmdAnnotate()
SnpSiftCmdAnnotate(java.lang.String[] args)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
annotate(org.snpeff.vcf.VcfEntry vcfEntry)
boolean
annotateInit(org.snpeff.fileIterator.VcfFileIterator vcfFile)
Initialize database for annotation processprotected java.util.List<org.snpeff.vcf.VcfHeaderEntry>
headers()
Build headers to addvoid
init()
Initialize default valuesvoid
parseArgs(java.lang.String[] args)
Parse command line argumentsboolean
run()
Annotate each entry of a VCF filejava.util.List<org.snpeff.vcf.VcfEntry>
run(boolean createList)
Run annotationsvoid
setAnnotateEmpty(boolean annotateEmpty)
void
usage(java.lang.String msg)
Show usage message-
Methods inherited from class org.snpsift.SnpSift
addHeaders, annotateFinish, cmd, commandLineStr, databaseDownload, databaseFind, error, getArgs, getConfig, getConfigFile, getOutput, isOpt, loadConfig, main, openVcfInputFile, processVcfHeader, setCommand, setCommand, setConfig, setConfigFile, setDbFileName, setDebug, setQuiet, setSaveOutput, setShowVcfHeader, setShowVersion, setSuppressOutput, setVcfHeaderAddProgramVersion, setVerbose, showCmd, showVersion, unSanitize, usageGenericAndDb
-
-
-
-
Field Detail
-
SHOW
public static final int SHOW
- See Also:
- Constant Field Values
-
annotateEmpty
protected boolean annotateEmpty
-
useId
protected boolean useId
-
useInfoField
protected boolean useInfoField
-
useRefAlt
protected boolean useRefAlt
-
method
protected org.snpsift.SnpSiftCmdAnnotate.AnnotationMethod method
-
countBadRef
protected int countBadRef
-
maxBlockSize
protected int maxBlockSize
-
chrPrev
protected java.lang.String chrPrev
-
prependInfoFieldName
protected java.lang.String prependInfoFieldName
-
existsInfoField
protected java.lang.String existsInfoField
-
infoFields
protected java.util.ArrayList<java.lang.String> infoFields
-
vcfFile
protected org.snpeff.fileIterator.VcfFileIterator vcfFile
-
annotateDb
protected AnnotateVcfDb annotateDb
-
-
Method Detail
-
annotate
public boolean annotate(org.snpeff.vcf.VcfEntry vcfEntry)
-
annotateInit
public boolean annotateInit(org.snpeff.fileIterator.VcfFileIterator vcfFile)
Initialize database for annotation process- Specified by:
annotateInit
in interfaceorg.snpeff.snpEffect.VcfAnnotator
- Overrides:
annotateInit
in classSnpSift
-
headers
protected java.util.List<org.snpeff.vcf.VcfHeaderEntry> headers()
Build headers to add
-
parseArgs
public void parseArgs(java.lang.String[] args)
Parse command line arguments
-
run
public boolean run()
Annotate each entry of a VCF file
-
run
public java.util.List<org.snpeff.vcf.VcfEntry> run(boolean createList)
Run annotations- Parameters:
createList
- : If true, return a list with all annotated entries (used for test cases & debugging)
-
setAnnotateEmpty
public void setAnnotateEmpty(boolean annotateEmpty)
-
-