Interface IntervalListScatterer

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      int deduceIdealSplitWeight​(htsjdk.samtools.util.IntervalList intervalList, int nCount)
      A method that determines the ideal target "weight" of the output IntervalList.
      long intervalWeight​(htsjdk.samtools.util.Interval interval)
      A method that defines the "weight" of an interval list for the purpose of scattering.
      long listWeight​(htsjdk.samtools.util.IntervalList intervalList)
      A method that defines the "weight" of an interval for the purpose of scattering.
      default htsjdk.samtools.util.IntervalList preprocessIntervalList​(htsjdk.samtools.util.IntervalList inputList)
      A function that will be called on an IntervalList prior to splitting it into sub-lists, and is a point where implementations can chose to impose some conditions on the lists, for example, merging overlapping/abutting intervals, removing duplicates, etc.
      default List<htsjdk.samtools.util.IntervalList> scatter​(htsjdk.samtools.util.IntervalList inputList, int scatterCount)
      Scatter an IntervalList into several IntervalLists.
      List<htsjdk.samtools.util.Interval> takeSome​(htsjdk.samtools.util.Interval interval, long idealSplitWeight, long currentSize, double projectSizeOfRemaining)
      Figure out how much of the input interval to put into current list and how much to leave for the next interval list.
    • Method Detail

      • scatter

        default List<htsjdk.samtools.util.IntervalList> scatter​(htsjdk.samtools.util.IntervalList inputList,
                                                                int scatterCount)
        Scatter an IntervalList into several IntervalLists. The default implementation makes use of the other interfaced methods, and aims to provide a universal way to scatter an IntervalList.
        Parameters:
        inputList - IntervalList to be scattered
        scatterCount - ideal number of scatters generated.
        Returns:
        Scattered List of IntervalLists,
      • preprocessIntervalList

        default htsjdk.samtools.util.IntervalList preprocessIntervalList​(htsjdk.samtools.util.IntervalList inputList)
        A function that will be called on an IntervalList prior to splitting it into sub-lists, and is a point where implementations can chose to impose some conditions on the lists, for example, merging overlapping/abutting intervals, removing duplicates, etc.
        Parameters:
        inputList - the original IntervalList
        Returns:
        the IntervalList that will be split up by the scatterer.
      • intervalWeight

        long intervalWeight​(htsjdk.samtools.util.Interval interval)
        A method that defines the "weight" of an interval list for the purpose of scattering. The class will attempt to create sublists that all have similar weights.
      • listWeight

        long listWeight​(htsjdk.samtools.util.IntervalList intervalList)
        A method that defines the "weight" of an interval for the purpose of scattering. The class will attempt to create sublists that all have similar weights. This method need to estimate the change in any sublists weight due to the possible of the provided interval.
      • takeSome

        List<htsjdk.samtools.util.Interval> takeSome​(htsjdk.samtools.util.Interval interval,
                                                     long idealSplitWeight,
                                                     long currentSize,
                                                     double projectSizeOfRemaining)
        Figure out how much of the input interval to put into current list and how much to leave for the next interval list.
        Parameters:
        interval -
        Returns:
        a list of two (possibly null) elements. The first element should be added to the current interval list, the second should be offered to the next interval list.
      • deduceIdealSplitWeight

        int deduceIdealSplitWeight​(htsjdk.samtools.util.IntervalList intervalList,
                                   int nCount)
        A method that determines the ideal target "weight" of the output IntervalList.
        Parameters:
        intervalList - the IntervalList that is about to get split
        nCount - the scatter count into which to split intervalList
        Returns:
        The ideal "weight" of the output IntervalList's