Package picard.util

Class DbSnpBitSetUtil


  • public class DbSnpBitSetUtil
    extends Object
    Utility class to use with DbSnp files to determine is a locus is a dbSnp site.
    • Constructor Detail

      • 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<VariantType> variantsToMatch)
        Constructor that creates a bit set with bits set to true for the given variant types.
      • DbSnpBitSetUtil

        public DbSnpBitSetUtil​(File dbSnpFile,
                               htsjdk.samtools.SAMSequenceDictionary sequenceDictionary,
                               Collection<VariantType> variantsToMatch,
                               htsjdk.samtools.util.IntervalList intervals)
        Constructor that creates a bit set with bits set to true for the given variant types over the given regions.
      • DbSnpBitSetUtil

        public DbSnpBitSetUtil​(File dbSnpFile,
                               htsjdk.samtools.SAMSequenceDictionary sequenceDictionary,
                               Collection<VariantType> variantsToMatch,
                               htsjdk.samtools.util.IntervalList intervals,
                               Optional<htsjdk.samtools.util.Log> log)
        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.
        intervals - an interval list specifying the regions to load, or null, if we are return all dbSNP sites.
    • Method Detail

      • createSnpAndIndelBitSets

        public static DbSnpBitSetUtil.DbSnpBitSets createSnpAndIndelBitSets​(File dbSnpFile,
                                                                            htsjdk.samtools.SAMSequenceDictionary sequenceDictionary)
        Factory method to create both a SNP bitmask and an indel bitmask in a single pass of the VCF.
      • createSnpAndIndelBitSets

        public static DbSnpBitSetUtil.DbSnpBitSets createSnpAndIndelBitSets​(File dbSnpFile,
                                                                            htsjdk.samtools.SAMSequenceDictionary sequenceDictionary,
                                                                            htsjdk.samtools.util.IntervalList intervals)
        Factory method to create both a SNP bitmask and an indel bitmask in a single pass of the VCF. If intervals are given, consider only SNP and indel sites that overlap the intervals.
      • createSnpAndIndelBitSets

        public static DbSnpBitSetUtil.DbSnpBitSets createSnpAndIndelBitSets​(File dbSnpFile,
                                                                            htsjdk.samtools.SAMSequenceDictionary sequenceDictionary,
                                                                            htsjdk.samtools.util.IntervalList intervals,
                                                                            Optional<htsjdk.samtools.util.Log> log)
        Factory method to create both a SNP bitmask and an indel bitmask in a single pass of the VCF. If intervals are given, consider only SNP and indel sites that overlap the intervals. If log is given, progress loading the variants will be written to the log.
      • isDbSnpSite

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