Interface KMerBalancer

All Known Implementing Classes:
DefaultKMerBalancer

public interface KMerBalancer
Author:
Dennis Cosgrove
  • Method Details

    • createSlices

      List<ByteArrayRange> createSlices(List<byte[]> sequences, int k, IntPredicate slicePredicate)
      Should create a list of slices from the given list of sequences. Each sequence may be divided many times or not divided at all, depending on its size relative to the sliceThreshold. Any sequence whose length is less than k should be omitted.
      Parameters:
      sequences - a list of sequences of nucleobases
      k - the k in k-mer
      slicePredicate - predicate which if returns true when tested with the range length from min to max indicates that continued slicing is appropriate
      Returns:
      the list of slices
    • calculateReasonableThreshold

      int calculateReasonableThreshold(List<byte[]> sequences, int k)
      Calculate a reasonable threshold to be used with createSlices(List, int, IntPredicate) where reasonable is defined to mean will create between 2X and 10X tasks per available processor.
      Parameters:
      sequences - a list of nucleobase sequences
      k - the k in k-mer
      Returns:
      a reasonable threshold
      See Also:
    • createReasonableSlices

      default List<ByteArrayRange> createReasonableSlices(List<byte[]> sequences, int k)