extendedMD.patterns¶
-
extendedMD.patterns.
find_all_pruned_members
(center_index, pattern_dic_list, r)¶ This function finds all the motif members assuming that the center of the motif is the BS sequence with index center_index. It returns the dictionaries related to the all the non-overlapping BS subsequences that have a distance to the center subsequence lower than R
Parameters: - center_index (int) – index of the center motif in the pattern_dic_list
- pattern_dic_list (list of dic) – list of dictionaries related to all the subsequences in the pattern
- r (float) – maximum distance to the center
Returns: list of dictionaries of the motif members
Return type: list of dic
-
extendedMD.patterns.
find_pattern_center_and_members
(pattern_dic_list, r)¶ This function finds the all the members of a motif (all non-overlapping subsequences with a distance to the motif center less than R) and and the motif’s center (the subsequence with the maximal count of members and minimal mean distance)
Parameters: - pattern_dic_list (list of dic) – list of dictionaries related to all the subsequences in the pattern
- r (float) – maximum distance to the center of the motif
Returns: - center_dic (
dic
) - dictionary of the motif’s center subsequence - members_dic_list (
list of dic
) - list of dictionaries related to all the motif’s members - min_mean_dist (
float
) - mean distance between the motif’s center and all the motif’s members
-
extendedMD.patterns.
lists_overlap
(l1, l2)¶ This functions return whether two lists overlap
Parameters: - l1 (list) – list 1
- l2 (list) – list 2
Returns: whether the list overlap. If TRUE, then the list overlap
Return type: bool