This function maps k-mers within a specified sequence based on provided start and end coordinates, or based on a fixed length.
mapKmers(seq, start, end = NULL, len = NULL, k, rm.trunc.kmer = TRUE)
A vector of mapped k-mers.
A single sequence string in which k-mers are to be mapped.
A vector of start coordinates for mapping k-mers. If only start positions are provided, exact k-mer extraction is performed.
A vector of end coordinates corresponding to the start positions. If NULL, all regions are assumed to have the same length. Used for varied region lengths to perform a sliding window.
An integer specifying the fixed length of regions. Used when regions have a uniform length greater than k. End coordinates are assumed NULL in this case.
An integer specifying the length of k-mers to be mapped.
Logical indicating whether to remove truncated k-mers resulting from out-of-bound regions. Default is TRUE.