SubtreeMatcher#

class subtree_matcher.SubtreeMatcher(root_coalescent_tree, root_pedigree, children_assignments=None)#

This class represents multiple matchings between a subtree of a coalescent tree in the ARG and the pedigree.

root_coalescent_tree#

Represents the vertex id of the root of the coalescent tree

Type:

int

root_pedigree#

Represents the vertex in the pedigree to which root_coalescent_tree

Type:

int

can be mapped.
children_assignments ([{int

SubtreeMatcher}]): The dictionaries representing the assignments to the children

vertices which make root_pedigree a valid assignment to root_coalescent_tree
__init__(root_coalescent_tree, root_pedigree, children_assignments=None)#

Initializes the SubtreeMatcher object.

Parameters:
  • root_coalescent_tree (to the children vertices which make root_pedigree a valid assignment to) – Represents the vertex id of the root of the coalescent tree

  • root_pedigree (int) – Represents the vertex in the pedigree to which root_coalescent_tree

  • mapped. (can be)

  • ([{int (children_assignments) – SubtreeMatcher}]): The dictionaries representing the assignments

  • root_coalescent_tree

get_all_subtree_alignments()#

Builds all the distinct valid alignment for the coalescent vertex subclade.