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/hash (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(k: Int, forwardOnly: Boolean, intersect: Boolean) extends CountReducer with Product with Serializable
Implements the com.jnpersson.discount.spark.Rule.CountersSubtract reduction rule.
Implements the com.jnpersson.discount.spark.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(k: Int, forwardOnly: Boolean) extends CountReducer with Product with Serializable
Implements the com.jnpersson.discount.spark.Rule.KmersSubtract reduction rule.
Implements the com.jnpersson.discount.spark.Rule.KmersSubtract reduction rule. k-mers are kept if they existed in bucket A, but not in bucket B.
-
final
case class
LeftReducer(k: Int, forwardOnly: Boolean, intersect: Boolean) extends CountReducer with Product with Serializable
Implements the com.jnpersson.discount.spark.Rule.Left reduction rule
-
final
case class
MaxReducer(k: Int, forwardOnly: Boolean, intersect: Boolean) extends CountReducer with Product with Serializable
Implements the com.jnpersson.discount.spark.Rule.Max reduction rule
-
final
case class
MinReducer(k: Int, forwardOnly: Boolean, intersect: Boolean) extends CountReducer with Product with Serializable
Implements the com.jnpersson.discount.spark.Rule.Min reduction rule
-
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[ZeroNTBitArray], 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(k: Int, forwardOnly: Boolean, intersect: Boolean) extends CountReducer with Product with Serializable
Implements the com.jnpersson.discount.spark.Rule.Right reduction rule
-
final
case class
SumReducer(k: Int, forwardOnly: Boolean, intersect: Boolean) extends CountReducer with Product with Serializable
Implements the com.jnpersson.discount.spark.Rule.Sum reduction rule
- type Tag = Int
Value Members
- object BucketStats extends Serializable
- object Reducer
- object ReducibleBucket extends Serializable