Class DbSnpBitSetUtil

java.lang.Object
org.broadinstitute.hellbender.utils.variant.DbSnpBitSetUtil

public final class DbSnpBitSetUtil extends Object
Utility class to use with DbSnp files to determine is a locus is a dbSnp site.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Little tuple class to contain one bitset for SNPs and another for Indels.
  • Constructor Summary

    Constructors
    Constructor
    Description
    DbSnpBitSetUtil(File dbSnpFile, htsjdk.samtools.SAMSequenceDictionary sequenceDictionary)
    Constructor that creates a bit set with bits set to true for all variant types.
    DbSnpBitSetUtil(File dbSnpFile, htsjdk.samtools.SAMSequenceDictionary sequenceDictionary, Collection<DbSnpVariantType> variantsToMatch)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isDbSnpSite(String sequenceName, int pos)
    Returns true if there is a dbSnp entry at pos in sequenceName, otherwise false

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DbSnpBitSetUtil

      public DbSnpBitSetUtil(File dbSnpFile, htsjdk.samtools.SAMSequenceDictionary sequenceDictionary)
      Constructor that creates a bit set with bits set to true for all variant types.
    • DbSnpBitSetUtil

      public DbSnpBitSetUtil(File dbSnpFile, htsjdk.samtools.SAMSequenceDictionary sequenceDictionary, Collection<DbSnpVariantType> variantsToMatch)
      Constructor. For each sequence, creates a BitSet that denotes whether a dbSNP entry is present at each base in the reference sequence. The set is reference.length() + 1 so that it can be indexed by 1-based reference base. True means dbSNP present, false means no dbSNP present.
      Parameters:
      dbSnpFile - in VCF format.
      sequenceDictionary - Optionally, a sequence dictionary corresponding to the dbSnp file, else null. If present, BitSets will be allocated more efficiently because the maximum size will be known.
      variantsToMatch - what types of variants to load.
  • Method Details

    • isDbSnpSite

      public boolean isDbSnpSite(String sequenceName, int pos)
      Returns true if there is a dbSnp entry at pos in sequenceName, otherwise false