This function searches for a specified middle pattern within a given sequence. It then counts the occurrences of specific context patterns within a defined window size around the middle pattern. The function returns a map where keys are the counts of context patterns found and values are the frequencies of these counts.
countMidPatternContext2(sequence, mid_pattern, window, context_patterns)
A std::unordered_map<int,int> where keys are the counts of context patterns found and values are the frequencies of these counts.
A string representing the sequence to be analyzed.
A string representing the middle pattern to search for within the sequence.
An integer specifying the size of the surrounding window around the middle pattern.
A vector of strings representing the context patterns to search for within the window.