Package kmer.balance.core
Interface KMerBalancer
- All Known Implementing Classes:
DefaultKMerBalancer
public interface KMerBalancer
- Author:
- Dennis Cosgrove
-
Method Summary
Modifier and TypeMethodDescriptionint
calculateReasonableThreshold
(List<byte[]> sequences, int k) Calculate a reasonable threshold to be used withcreateSlices(List, int, IntPredicate)
where reasonable is defined to mean will create between 2X and 10X tasks per available processor.default List<ByteArrayRange>
createReasonableSlices
(List<byte[]> sequences, int k) createSlices
(List<byte[]> sequences, int k, IntPredicate slicePredicate) Should create a list of slices from the given list of sequences.
-
Method Details
-
createSlices
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 nucleobasesk
- the k in k-merslicePredicate
- 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
Calculate a reasonable threshold to be used withcreateSlices(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 sequencesk
- the k in k-mer- Returns:
- a reasonable threshold
- See Also:
-
createReasonableSlices
-