Package org.snpsift.annotate
Class DbVcf
- java.lang.Object
-
- org.snpsift.annotate.DbVcf
-
- All Implemented Interfaces:
DbMarker<org.snpeff.interval.Variant,org.snpeff.vcf.VariantVcfEntry>
- Direct Known Subclasses:
DbVcfMem
,DbVcfSorted
,DbVcfTabix
public abstract class DbVcf extends java.lang.Object implements DbMarker<org.snpeff.interval.Variant,org.snpeff.vcf.VariantVcfEntry>
Use a VCF file as a database for annotations A VCF database consists of a VCF file and an index. When a query is made, the index is used to quickly get the file positions where matching VCF entries are. File is read, entries are parsed and returned as query() result. WARNING: VcfEntry may hold multiple variants (e.g. multi-allelic VcfEntries). So we index by variant and return all matching vcfEntries for a given variant. This is why we use 'VariantVcfEntry' as opposed to 'VcfEntry' Notes: If another query matches the same region of the file, then we could use some sort of caching to speed up the process. If the same file region is matched multiple times by successive queries, creating an intervalTree from the VCF entries matching the region might be effective- Author:
- pcingola
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
dbFileName
protected boolean
debug
protected org.snpeff.vcf.VcfHeader
vcfHeader
protected boolean
verbose
-
Constructor Summary
Constructors Constructor Description DbVcf(java.lang.String dbFileName)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
close()
Close database, free resourcesorg.snpeff.vcf.VcfHeader
getVcfHeader()
abstract void
open()
Open database (load index in memory if required)abstract java.util.Collection<org.snpeff.vcf.VariantVcfEntry>
query(org.snpeff.interval.Variant variant)
Find matching entries in the databasevoid
setDebug(boolean debug)
void
setVerbose(boolean verbose)
-
-
-
Method Detail
-
close
public abstract void close()
Description copied from interface:DbMarker
Close database, free resources
-
getVcfHeader
public org.snpeff.vcf.VcfHeader getVcfHeader()
-
open
public abstract void open()
Description copied from interface:DbMarker
Open database (load index in memory if required)
-
query
public abstract java.util.Collection<org.snpeff.vcf.VariantVcfEntry> query(org.snpeff.interval.Variant variant)
Find matching entries in the database
-
setDebug
public void setDebug(boolean debug)
-
setVerbose
public void setVerbose(boolean verbose)
- Specified by:
setVerbose
in interfaceDbMarker<org.snpeff.interval.Variant,org.snpeff.vcf.VariantVcfEntry>
-
-