K-mer size as a literal number type
ReadonlysizeWindow size in base pairs (required)
When specified as a literal (e.g., 21 as const), TypeScript will track this size at compile-time in the output type.
Optional ReadonlystepStep size - distance to slide window (default: 1)
Controls overlap between consecutive windows:
Optional ReadonlygreedyInclude final window even if shorter than size (default: false)
Optional ReadonlycircularTreat sequence as circular, wrapping around end (default: false)
Optional ReadonlysuffixSuffix to append to sequence IDs (default: "_window")
Optional ReadonlyzeroUse 0-based coordinates in output IDs (default: false = 1-based)
Options for sliding window extraction (k-mer generation)
Generates overlapping or tiling subsequences from input sequences using a sliding window approach. Supports linear and circular sequences.
The size parameter can be specified as a literal number to enable compile-time k-mer size inference in the output type.
Example