KmerSet

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

A set of kmers. Does not include any information about 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
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 1 if the set contains kmer, 0 otherwise

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 this set of kmers in 2-bit encoding.

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.

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

Returns the number of kmers in the set.

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

Summarizes set parameters and size in string format.