Class BinningIndexContent


  • public class BinningIndexContent
    extends Object
    In-memory representation of the binning index for a single reference. BAM and Tabix are both binning indices with slightly different disk formats but identical in-memory representations.
    • Constructor Detail

      • BinningIndexContent

        public BinningIndexContent​(int referenceSequence,
                                   BinningIndexContent.BinList binList,
                                   LinearIndex linearIndex)
        Parameters:
        referenceSequence - Content corresponds to this reference.
        binList - Array of bins represented by this content, possibly sparse
        linearIndex - Additional index used to optimize queries
    • Method Detail

      • getReferenceSequence

        public int getReferenceSequence()
        Reference for this Content
      • containsBin

        public boolean containsBin​(Bin bin)
        Does this content have anything in this bin?
      • getAllChunks

        public List<Chunk> getAllChunks()
        Returns:
        all chunks associated with all bins in this content
      • getLinearIndex

        public LinearIndex getLinearIndex()
        Returns:
        the linear index represented by this content
      • getChunksOverlapping

        public List<Chunk> getChunksOverlapping​(int startPos,
                                                int endPos)
        Parameters:
        startPos - 1-based, inclusive
        endPos - 1-based, inclusive
        Returns:
        List of Chunks overlapping the given region. May return null if there are none.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object