KmerMultiSet

class KmerMultiSet(val kmerSize: Int = 21, val bothStrands: Boolean = true, val stepSize: Int = 1, val keepMinOnly: Boolean = false) : AbstractSparseKmerSet

A set of kmers with associated counts.

Constructors

Link copied to clipboard
constructor(sequence: NucSeq, kmerSize: Int = 21, bothStrands: Boolean = true, stepSize: Int = 1, keepMinOnly: Boolean = false)

Extracts the kmer count from a nucleotide sequence sequence. In general kmers from both strands should be extracted, unless strand specificity is really known. No kmers that include an ambiguous base pair will be included Using stepSize subsets of the kmers can be sampled

constructor(kmerSize: Int = 21, bothStrands: Boolean = true, stepSize: Int = 1, keepMinOnly: Boolean = false)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val kmer2CountEntrySet: Long2IntMap.FastEntrySet

All kmers (packed into longs) and there associated counts

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Generates kmers from a nucleotide sequence and adds those kmers to this set.

Link copied to clipboard

Returns the number of ambiguous kmers in the set.

Link copied to clipboard
open override fun contains(kmer: Kmer): Boolean

Returns true if the set contains kmer.

Link copied to clipboard
open override fun getCountOf(kmer: Kmer): Int

Returns the number of times kmer appears in the set.

Link copied to clipboard
fun getEvenOddHashMap(): Long2ObjectOpenHashMap<LongOpenHashSet>

Hashes the longs in the set based on their even nucleotides and their odd nucleotides, placing each long into two bins. Returns this map of bins.

Link copied to clipboard
open override fun isEmpty(): Boolean

Returns true if the set is empty

Link copied to clipboard
open override fun longSet(): LongSet

Returns the set of kmers, as their Long encodings.

Link copied to clipboard
fun minHammingDistance(kmer: Kmer, bothStrands: Boolean = true): Int

Returns the minimum hamming distance between the query kmer and all kmers in this map

Link copied to clipboard

Returns the total length of sequence(s) used to generate this set.

Link copied to clipboard
open override fun set(): Set<Kmer>

Returns the set of kmers, without counts.

Link copied to clipboard
open override fun setSize(): Long

Returns the number of unique kmers in the set.

Link copied to clipboard
fun toSeqCountString(max: Int = Int.MAX_VALUE, separator: CharSequence = ""): String

Returns a string of all kmers in the set and their associated counts.

Link copied to clipboard
open override fun toString(): String

Summarizes set parameters and size in string format.