Package picard.util
Class DbSnpBitSetUtil
java.lang.Object
picard.util.DbSnpBitSetUtil
Utility class to use with DbSnp files to determine is a locus is
a dbSnp site.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Little tuple class to contain one bitset for SNPs and another for Indels. -
Constructor Summary
ConstructorsConstructorDescriptionDbSnpBitSetUtil
(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<VariantType> variantsToMatch) Constructor that creates a bit set with bits set to true for the given variant types.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
(File dbSnpFile, htsjdk.samtools.SAMSequenceDictionary sequenceDictionary, Collection<VariantType> variantsToMatch, htsjdk.samtools.util.IntervalList intervals, Optional<htsjdk.samtools.util.Log> log) Constructor.DbSnpBitSetUtil
(Path dbSnpFile, htsjdk.samtools.SAMSequenceDictionary sequenceDictionary) Constructor that creates a bit set with bits set to true for all variant types.DbSnpBitSetUtil
(Path 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
(Path 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
(Path dbSnpFile, htsjdk.samtools.SAMSequenceDictionary sequenceDictionary, Collection<VariantType> variantsToMatch, htsjdk.samtools.util.IntervalList intervals, Optional<htsjdk.samtools.util.Log> log) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.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.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.static DbSnpBitSetUtil.DbSnpBitSets
createSnpAndIndelBitSets
(PicardHtsPath 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.static DbSnpBitSetUtil.DbSnpBitSets
createSnpAndIndelBitSets
(PicardHtsPath 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.boolean
isDbSnpSite
(String sequenceName, int pos) Returns true if there is a dbSnp entry at pos in sequenceName, otherwise false
-
Constructor Details
-
DbSnpBitSetUtil
Constructor that creates a bit set with bits set to true for all variant types. -
DbSnpBitSetUtil
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(Path 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(Path 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.
-
DbSnpBitSetUtil
public DbSnpBitSetUtil(Path 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 Details
-
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(PicardHtsPath 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. -
createSnpAndIndelBitSets
public static DbSnpBitSetUtil.DbSnpBitSets createSnpAndIndelBitSets(PicardHtsPath 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
Returns true if there is a dbSnp entry at pos in sequenceName, otherwise false
-