This function scans through each sequence in the provided vector, locating a specified middle pattern. For each occurrence of the middle pattern, the function extracts and counts the surrounding k-mers. The k-mers are identified based on the given k-mer size and centered around the middle pattern.
countMidPatternKmers(sequences, k, mid_pattern)
A std::unordered_map with k-mers as keys and their counts as values.
A vector of strings, each representing a sequence to be analyzed.
An integer specifying the size of the k-mers to be extracted and counted.
A string representing the middle pattern to search for within each sequence.