Class LinearIndex.ChrIndex

  • All Implemented Interfaces:
    ChrIndex
    Enclosing class:
    LinearIndex

    public static class LinearIndex.ChrIndex
    extends Object
    implements ChrIndex
    Blocks are organized as a simple flat list:

    Block 0 Block 1 Block 2

    There's a constant bin width, so that each block corresponds to a specific interval over the genome based on its index, as in:

    Block 0: (0 - binWidth] Block 1: (binWidth - 2 * binWidth] Block 2: (2 * binWidth - 3 * binWidth]

    Note that covered regions are open on the left ( and closed on the right ].

    In general, if block i is the ith block (starting from 0), then block i contains all records that have starting position > (i * binWidth) and <= ((i + 1) * binWidth))

    • Constructor Detail

      • ChrIndex

        public ChrIndex()
        Default constructor needed for factory methods -- DO NOT REMOVE
    • Method Detail

      • getNBlocks

        public int getNBlocks()
      • getBlocks

        public List<Block> getBlocks​(int start,
                                     int end)
        Specified by:
        getBlocks in interface ChrIndex
        Parameters:
        start - the start position, one based
        end - the end position, one based
        Returns:
        a list of blocks that include the region defined from start to stop. Can never return null
      • updateLongestFeature

        public void updateLongestFeature​(int featureLength)
      • getNFeatures

        public int getNFeatures()
      • incrementFeatureCount

        public void incrementFeatureCount()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getTotalSize

        public long getTotalSize()
        Returns:
        Total size of all blocks
      • getAverageFeatureSize

        public double getAverageFeatureSize()
      • getFeaturesPerBlock

        public double getFeaturesPerBlock()