package bucket
Provides routines related to buckets/bins of k-mers.
- Alphabetic
- By Inheritance
- bucket
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
final
case class
BucketStats(id: String, superKmers: Long, totalAbundance: Abundance, distinctKmers: Long, uniqueKmers: Long, maxAbundance: Abundance) extends Product with Serializable
Statistics for a single bin/bucket.
Statistics for a single bin/bucket.
- id
Minimizer/bucket ID (human-readable)
- superKmers
Total number of superkmers
- totalAbundance
Total number of k-mers counted
- distinctKmers
Total number of distinct k-mers
- uniqueKmers
Total number of k-mers with abundance == 1
- maxAbundance
Greatest abundance seen for a single k-mer
-
trait
CountReducer extends Reducer
A reducer that handles k-mer count values stored in the longsForK(k) + 1 tag position.
-
final
case class
CountersSubtractReducer(params: ReduceParams) extends CountReducer with Product with Serializable
Implements the bucket.Rule.CountersSubtract reduction rule.
Implements the bucket.Rule.CountersSubtract reduction rule. For each k-mer we calculate count_1 - count_2 and set the result to this value. Only positive counts are preserved in the output.
-
abstract
class
KmerBucket extends AnyRef
A bucket that maintains some number of super-mers and associated tags (e.g.
A bucket that maintains some number of super-mers and associated tags (e.g. counts) of each k-mer.
-
final
case class
KmerSubtractReducer(params: ReduceParams) extends CountReducer with Product with Serializable
Implements the bucket.Rule.KmersSubtract reduction rule.
Implements the bucket.Rule.KmersSubtract reduction rule. k-mers are kept if they existed in bucket A, but not in bucket B.
-
final
case class
LeftReducer(params: ReduceParams) extends CountReducer with Product with Serializable
Implements the bucket.Rule.Left reduction rule
-
final
case class
MaxReducer(params: ReduceParams) extends CountReducer with Product with Serializable
Implements the bucket.Rule.Max reduction rule
-
final
case class
MinReducer(params: ReduceParams) extends CountReducer with Product with Serializable
Implements the bucket.Rule.Min reduction rule
-
final
case class
ReduceParams(k: Int, orientation: Orientation = Unchanged, intersect: Boolean = false) extends Product with Serializable
K-mer reduction parameters
K-mer reduction parameters
- k
The length of k-mers
- orientation
Orientation of k-mers to keep in the result
- intersect
Whether the reduction is an intersection type (if not, it's a union)
-
trait
Reducer extends AnyRef
A method for combining identical k-mers (which may have associated extra data)
-
final
case class
ReducibleBucket(id: BucketId, supermers: Array[NTBitArray], tags: Array[Array[Int]]) extends KmerBucket with Product with Serializable
A k-mer bucket that reduces (combines) identical k-mers using a supplied method, removing redundant super-mers in the process to keep the bucket compact.
A k-mer bucket that reduces (combines) identical k-mers using a supplied method, removing redundant super-mers in the process to keep the bucket compact.
- id
The minimizer/ID of this bucket
- supermers
Super-mers containing the k-mers of this bucket. Some might not actually be present in the bucket (the super-mers may have gaps) and the tags define which are present. This arranges the k-mers in a 2D grid where rows identify the super-mer and columns identify the offset in the super-mer. (Super-mers may however have different lengths)
- tags
Tags for each k-mer, for example k-mer counts in the case of k-mer counting. These follow the 2D coordinate scheme described above.
-
final
case class
RightReducer(params: ReduceParams) extends CountReducer with Product with Serializable
Implements the bucket.Rule.Right reduction rule
-
sealed
trait
Rule extends Serializable
k-mer combination (reduction) rules for combining indexes.
k-mer combination (reduction) rules for combining indexes. Most of these support both intersection and union. An intersection is an operation that requires the k-mer to be present in every input index, or it will not be present in the output. A union may preserve the k-mer even if it is present in only one input index. Except for the case of the union Sum reduction, indexes must be compacted prior to reduction, that is, each k-mer must occur in each index with a nonzero value only once.
These rules were inspired by the design of KMC3: https://github.com/refresh-bio/KMC
-
final
case class
SumReducer(params: ReduceParams) extends CountReducer with Product with Serializable
Implements the bucket.Rule.Sum reduction rule
- type Tag = Int
Value Members
- object BucketStats extends Serializable
- object Reducer
- object ReducibleBucket extends Serializable
- object Rule extends Serializable