KmerGenerator#

class pyswrd.KmerGenerator#

A generator of k-mers with optional substitutions.

__init__(scorer, kmer_length=3, score_threshold=13)#

Create a new k-mer generator.

Parameters:
  • scorer (Scorer) – A scorer to use to compute the k-mer scores.

  • kmer_length (int) – The length of the k-mers to generate.

  • score_threshold (int) – The minimum score threshold for a k-mer to be marked a hit. Set to zero to only consider k-mers that are exact matches.