Package picard.util.IntervalList
Class IntervalListScattererByIntervalCount
java.lang.Object
picard.util.IntervalList.IntervalListScattererByIntervalCount
- All Implemented Interfaces:
IntervalListScatterer
- Direct Known Subclasses:
IntervalListScattererByIntervalCountWithDistributedRemainder
Scatters
IntervalList
by interval count so that resulting IntervalList
's have the same number of intervals in them.
An exception is made for the final interval list, which will always contain at least this number of intervals,
but may also contain the remainder.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
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.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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface picard.util.IntervalList.IntervalListScatterer
preprocessIntervalList, scatter
-
Constructor Details
-
IntervalListScattererByIntervalCount
public IntervalListScattererByIntervalCount()
-
-
Method Details
-
intervalWeight
public long intervalWeight(htsjdk.samtools.util.Interval interval) Description copied from interface:IntervalListScatterer
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.- Specified by:
intervalWeight
in interfaceIntervalListScatterer
-
listWeight
public long listWeight(htsjdk.samtools.util.IntervalList intervalList) Description copied from interface:IntervalListScatterer
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.- Specified by:
listWeight
in interfaceIntervalListScatterer
-
takeSome
public List<htsjdk.samtools.util.Interval> takeSome(htsjdk.samtools.util.Interval interval, long idealSplitWeight, long currentSize, double projectSizeOfRemaining) Description copied from interface:IntervalListScatterer
Figure out how much of the input interval to put into current list and how much to leave for the next interval list.- Specified by:
takeSome
in interfaceIntervalListScatterer
- 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
public int deduceIdealSplitWeight(htsjdk.samtools.util.IntervalList intervalList, int nCount) Description copied from interface:IntervalListScatterer
A method that determines the ideal target "weight" of the output IntervalList.- Specified by:
deduceIdealSplitWeight
in interfaceIntervalListScatterer
- Parameters:
intervalList
- theIntervalList
that is about to get splitnCount
- the scatter count into which to split intervalList- Returns:
- The ideal "weight" of the output
IntervalList
's
-