diff --git a/.buildinfo b/.buildinfo index 1f8147a..5f44aae 100644 --- a/.buildinfo +++ b/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 4f1d90bc4cf00a8afcb9806470b6325e +config: 8ca26009d44a97cede737e18079e125b tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/_modules/historydag/compact_genome.html b/_modules/historydag/compact_genome.html index d43b122..73f0ba2 100644 --- a/_modules/historydag/compact_genome.html +++ b/_modules/historydag/compact_genome.html @@ -32,6 +32,7 @@ +
@@ -78,7 +79,14 @@

Source code for historydag.compact_genome

-from frozendict import frozendict
+"""This module provides a CompactGenome class, intended as a convenient and compact representation of
+a nucleotide sequence as a collection of mutations relative to a reference sequence. This object also
+provides methods to conveniently mutate CompactGenome objects according to a list of mutations, produce
+mutations defining the difference between two CompactGenome objects, and efficiently access the base
+at a site (or the entire sequence, as a string) implied by a CompactGenome.
+"""
+
+from frozendict import frozendict
 from typing import Dict, Sequence
 from warnings import warn
 from historydag.parsimony_utils import (
diff --git a/_modules/historydag/counterops.html b/_modules/historydag/counterops.html
index a48ed85..50f2127 100644
--- a/_modules/historydag/counterops.html
+++ b/_modules/historydag/counterops.html
@@ -32,6 +32,7 @@
           
           
             
+              
           
 
diff --git a/_modules/historydag/dag.html b/_modules/historydag/dag.html index 9507fdc..b5a261a 100644 --- a/_modules/historydag/dag.html +++ b/_modules/historydag/dag.html @@ -32,6 +32,7 @@ +
diff --git a/_modules/historydag/dag_node.html b/_modules/historydag/dag_node.html index a9af8bb..fadff0c 100644 --- a/_modules/historydag/dag_node.html +++ b/_modules/historydag/dag_node.html @@ -32,6 +32,7 @@ +
@@ -100,7 +101,7 @@

Source code for historydag.dag_node

 
 
 
-[docs] +[docs] class HistoryDagNode: r"""A recursive representation of a history DAG object. @@ -109,7 +110,7 @@

Source code for historydag.dag_node

     """
 
 
-[docs] +[docs] def __init__(self, label: Label, clades: dict, attr: Any): self.clades = clades # If passed a nonempty dictionary, need to add self to children's parents @@ -171,7 +172,7 @@

Source code for historydag.dag_node

         return not self.__lt__(other)
 
 
-[docs] +[docs] def empty_copy(self) -> "HistoryDagNode": """Returns a HistoryDagNode object with the same clades, label, and attr dictionary, but no descendant edges.""" @@ -181,14 +182,14 @@

Source code for historydag.dag_node

 
 
 
-[docs] +[docs] def node_self(self) -> "HistoryDagNode": """Deprecated name for :meth:`empty_copy`""" return self.empty_copy()
-[docs] +[docs] def clade_union(self) -> FrozenSet[Label]: r"""Returns the union of this node's child clades (or a set containing only the node label, for leaf nodes.)""" @@ -199,21 +200,21 @@

Source code for historydag.dag_node

 
 
 
-[docs] +[docs] def under_clade(self) -> FrozenSet[Label]: """Deprecated name for :meth:`clade_union`""" return self.clade_union()
-[docs] +[docs] def is_leaf(self) -> bool: """Returns whether this is a leaf node.""" return not bool(self.clades)
-[docs] +[docs] def is_ua_node(self) -> bool: """Returns whether this is the source node in the DAG, from which all others are reachable.""" @@ -221,21 +222,21 @@

Source code for historydag.dag_node

 
 
 
-[docs] +[docs] def is_root(self) -> bool: """Deprecated name for :meth:`is_ua_node`""" return self.is_ua_node()
-[docs] +[docs] def is_history_root(self) -> bool: """Return whether node is a root of any histories in the DAG.""" return any(n.is_ua_node() for n in self.parents)
-[docs] +[docs] def child_clades(self) -> frozenset: """Returns the node's child clades, or a frozenset containing a frozenset if this node is a UANode.""" @@ -243,14 +244,14 @@

Source code for historydag.dag_node

 
 
 
-[docs] +[docs] def partitions(self) -> frozenset: """Deprecated name for :meth:`child_clades`""" return self.child_clades()
-[docs] +[docs] def sorted_child_clades(self) -> tuple: """Returns the node's child clades as a sorted tuple containing leaf labels in sorted tuples.""" @@ -258,14 +259,14 @@

Source code for historydag.dag_node

 
 
 
-[docs] +[docs] def sorted_partitions(self) -> tuple: """Deprecated name for :meth:`sorted_child_clades`""" return self.sorted_child_clades()
-[docs] +[docs] def children( self, clade: Set[Label] = None ) -> Generator["HistoryDagNode", None, None]: @@ -284,7 +285,7 @@

Source code for historydag.dag_node

 
 
 
-[docs] +[docs] def add_edge( self, target: "HistoryDagNode", @@ -349,7 +350,7 @@

Source code for historydag.dag_node

         self.clades[key].remove_from_edgeset_byid(target)
 
 
-[docs] +[docs] def remove_node(self, nodedict: Dict["HistoryDagNode", "HistoryDagNode"] = {}): r"""Recursively removes node self and any orphaned children from dag. @@ -369,7 +370,7 @@

Source code for historydag.dag_node

 
 
 
-[docs] +[docs] def to_ascii( self, name_func, @@ -426,7 +427,7 @@

Source code for historydag.dag_node

 
 
 
-[docs] +[docs] def to_ete( self, name_func: Callable[["HistoryDagNode"], str] = lambda n: "unnamed", @@ -544,9 +545,13 @@

Source code for historydag.dag_node

 
 
 
+
+[docs] class UANode(HistoryDagNode): r"""A universal ancestor node, the root node of a HistoryDag.""" +
+[docs] def __init__(self, targetnodes: "EdgeSet"): self.label = UALabel() # an empty frozenset is not used as a key in any other node @@ -555,21 +560,31 @@

Source code for historydag.dag_node

         self.parents = set()
         self.attr = dict()
         for child in self.children():
-            child.parents.add(self)
+            child.parents.add(self)
+ +
+[docs] def empty_copy(self) -> "UANode": """Returns a UANode object with the same clades and label, but no descendant edges.""" newnode = UANode(EdgeSet()) newnode.attr = deepcopy(self.attr) - return newnode + return newnode
+ +
+[docs] def is_ua_node(self) -> bool: """Returns whether this is the source node in the DAG, from which all others are reachable.""" - return True + return True
+
+ +
+[docs] class EdgeSet: r"""A container class for edge target nodes, and associated probabilities and weights. @@ -578,6 +593,8 @@

Source code for historydag.dag_node

     set-like operations like lookup and enforce that elements are unique.
     """
 
+
+[docs] def __init__( self, *args, @@ -594,7 +611,8 @@

Source code for historydag.dag_node

             raise TypeError(
                 f"__init__() takes 0 or 1 positional arguments but {len(args)} were given."
             )
-        self.set_targets(targets, weights, probs)
+        self.set_targets(targets, weights, probs)
+ def __iter__(self): return ( @@ -602,6 +620,8 @@

Source code for historydag.dag_node

             for i in range(len(self.targets))
         )
 
+
+[docs] def set_targets(self, targets, weights=None, probs=None): """Set the target nodes of this node. @@ -623,8 +643,11 @@

Source code for historydag.dag_node

                 probs = []
             else:
                 probs = [float(1) / n] * n
-        self.set_edge_stats(weights, probs)
+        self.set_edge_stats(weights, probs)
+ +
+[docs] def set_edge_stats(self, weights=None, probs=None): """Set the edge weights and/or probabilities of this EdgeSet.""" n = len(self.targets) @@ -639,8 +662,11 @@

Source code for historydag.dag_node

                 raise ValueError(
                     "length of provided probabilities list must match number of target nodes"
                 )
-            self.probs = probs
+            self.probs = probs
+ +
+[docs] def shallowcopy(self) -> "EdgeSet": """Return an identical EdgeSet object, which points to the same target nodes.""" @@ -648,7 +674,8 @@

Source code for historydag.dag_node

             [node for node in self.targets],
             weights=self.weights.copy(),
             probs=self.probs.copy(),
-        )
+        )
+ def remove_from_edgeset_byid(self, target_node): idlist = [id(target) for target in self.targets] @@ -659,6 +686,8 @@

Source code for historydag.dag_node

             self.weights.pop(idx_to_remove)
             self._targetset = set(self.targets)
 
+
+[docs] def sample( self, mask=None, log_probabilities=False ) -> Tuple[HistoryDagNode, float]: @@ -678,8 +707,11 @@

Source code for historydag.dag_node

             weights = [factor * prob for factor, prob in zip(mask, weights)]
 
         index = random.choices(list(range(len(self.targets))), weights=weights, k=1)[0]
-        return (self.targets[index], self.weights[index])
+        return (self.targets[index], self.weights[index])
+ +
+[docs] def add_to_edgeset(self, target, weight=0, prob=None, prob_norm=True) -> bool: """Add a target node to the EdgeSet. @@ -716,7 +748,9 @@

Source code for historydag.dag_node

                     map(lambda x: x * (1 - prob) / sum(self.probs), self.probs)
                 )
             self.probs.append(prob)
-            return True
+            return True
+
+
diff --git a/_modules/historydag/mutation_annotated_dag.html b/_modules/historydag/mutation_annotated_dag.html index 1275ba8..03b0e85 100644 --- a/_modules/historydag/mutation_annotated_dag.html +++ b/_modules/historydag/mutation_annotated_dag.html @@ -32,6 +32,7 @@ +
diff --git a/_modules/historydag/parsimony.html b/_modules/historydag/parsimony.html index 62da25a..7e31d31 100644 --- a/_modules/historydag/parsimony.html +++ b/_modules/historydag/parsimony.html @@ -32,6 +32,7 @@ +
diff --git a/_modules/historydag/parsimony_utils.html b/_modules/historydag/parsimony_utils.html new file mode 100644 index 0000000..2acbc54 --- /dev/null +++ b/_modules/historydag/parsimony_utils.html @@ -0,0 +1,1080 @@ + + + + + + historydag.parsimony_utils — historydag documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for historydag.parsimony_utils

+"""This module provides tools for describing and computing parsimony and
+weighted parsimony, and for describing allowed characters and ambiguity codes.
+
+:class:`AmbiguityMap` stores a collection of ``Characters`` (for example the strings
+``'A'``, ``'G'``, ``'C'``, and ``'T'``) that are considered valid states, as well as
+a mapping between other ``Characters`` ('ambiguity codes') and subsets of these allowed
+characters. This type allows forward- and backward-lookup of ambiguity codes.
+
+:class:`TransitionModel` describes transition weights between an ordered collection of
+``Characters``, and provides methods for computing weighted parsimony. Functions in
+``historydag.parsimony`` accept ``TransitionModel`` objects to customize the implementation
+of Sankoff, for example. This class has two subclasses: :class:`UnitTransitionModel`,
+which describes unit transition costs between non-identical ``Characters``,
+and :class:`SitewiseTransitionModel`, which allows transition costs to depend on the
+location in a sequence in which a transition occurs.
+"""
+import numpy as np
+import random
+import historydag.utils as utils
+from historydag.utils import AddFuncDict, Label
+import Bio.Data.IUPACData
+from frozendict import frozendict
+from typing import (
+    Generator,
+    Tuple,
+    Callable,
+    Iterable,
+    Sequence,
+    Any,
+    Mapping,
+    TYPE_CHECKING,
+)
+
+Character = Any
+CharacterSequence = Sequence[Character]
+
+if TYPE_CHECKING:
+    from historydag.dag import HistoryDagNode
+    from historydag.compact_genome import CompactGenome
+
+
+
+[docs] +class AmbiguityMap: + """Implements a bijection between a subset of the power set of an alphabet + of bases, and an expanded alphabet of ambiguity codes. + + To look up the set of bases represented by an ambiguity code, use the object like a dictionary. + To look up an ambiguity code representing a set of bases, use the ``reversed`` attribute. + + Args: + ambiguity_character_map: A mapping from ambiguity codes to collections of bases represented by that code. + bases: A collection of bases. If not provided, this will be inferred from the ambiguity_character_map. + reversed_defaults: When `ambiguity_character_map` is not injective (i.e. multiple ambiguous characters + map to the same set of bases) one might want to specify which character that set of bases maps to in + the reversed map. If not provided, the choice will be made arbitrarily. + """ + +
+[docs] + def __init__( + self, + ambiguity_character_map: Mapping[Character, Iterable[Character]], + bases: Iterable[Character] = None, + reversed_defaults: Mapping[Iterable[Character], Character] = {}, + ): + ambiguous_values = { + char: frozenset(bases) for char, bases in ambiguity_character_map.items() + } + if bases is None: + self.bases = frozenset( + base for bset in self.ambiguous_values for base in bset + ) + else: + self.bases = frozenset(bases) + + ambiguous_values.update({base: frozenset({base}) for base in self.bases}) + self.ambiguous_values = frozendict(ambiguous_values) + reversed_map = {bases: char for char, bases in self.ambiguous_values.items()} + reversed_map.update( + { + frozenset(key): char + for key, char in reversed_defaults.items() + if frozenset(key) in reversed_map + } + ) + self.reversed = ReversedAmbiguityMap(reversed_map) + self.uninformative_chars = frozenset( + char + for char, base_set in self.ambiguous_values.items() + if base_set == self.bases + )
+ + + def __getitem__(self, key): + try: + return self.ambiguous_values[key] + except KeyError: + raise KeyError(f"{key} is not a valid ambiguity code for this map.") + + def __iter__(self): + return self.ambiguous_values.__iter__() + + def items(self): + return self.ambiguous_values.items() + +
+[docs] + def is_ambiguous(self, sequence: CharacterSequence) -> bool: + """Returns whether the provided sequence contains any non-base + characters (such as ambiguity codes).""" + return any(code not in self.bases for code in sequence)
+ + +
+[docs] + def sequence_resolutions( + self, sequence: CharacterSequence + ) -> Generator[CharacterSequence, None, None]: + """Iterates through possible disambiguations of sequence, recursively. + + Recursion-depth-limited by number of ambiguity codes in + sequence, not sequence length. + """ + + def _sequence_resolutions(sequence, _accum=""): + if sequence: + for index, base in enumerate(sequence): + if base in self.bases: + _accum += base + else: + for newbase in self.ambiguous_values[base]: + yield from _sequence_resolutions( + sequence[index + 1 :], _accum=(_accum + newbase) + ) + return + yield _accum + + return _sequence_resolutions(sequence)
+ + +
+[docs] + def get_sequence_resolution_func( + self, field_name: str + ) -> Callable[[Label], Generator[Label, None, None]]: + """Returns a function which takes a Label, and returns a generator on + labels containing all possible resolutions of the sequence in that + node's label's ``field_name`` attribute.""" + + @utils.explode_label(field_name) + def sequence_resolutions( + sequence: CharacterSequence, + ) -> Generator[CharacterSequence, None, None]: + return self.sequence_resolutions(sequence) + + return sequence_resolutions
+ + +
+[docs] + def sequence_resolution_count(self, sequence: CharacterSequence) -> int: + """Count the number of possible sequence resolutions. + + Equivalent to the number of items yielded by + :meth:`sequence_resolutions`. + """ + base_options = [ + len(self.ambiguous_values[base]) + for base in sequence + if base in self.ambiguous_values + ] + return utils.prod(base_options)
+ + +
+[docs] + def get_sequence_resolution_count_func( + self, field_name: str + ) -> Callable[[Label], int]: + """Returns a function taking a Label and returning the number of + resolutions for the sequence held in the label's ``field_name`` + attribute.""" + + @utils.access_field(field_name) + def sequence_resolution_count(sequence) -> int: + return self.sequence_resolution_count(sequence) + + return sequence_resolution_count
+
+ + + +
+[docs] +class ReversedAmbiguityMap(frozendict): + """A subclass of frozendict for holding the reversed map in a + :class:`AmbiguityMap` instance.""" + + def __getitem__(self, key): + try: + return super().__getitem__(key) + except KeyError: + raise KeyError(f"No ambiguity code is defined for the set of bases {key}")
+ + + +_ambiguous_dna_values_gap_as_char = Bio.Data.IUPACData.ambiguous_dna_values.copy() +_ambiguous_dna_values_gap_as_char.update({"?": "GATC-", "-": "-"}) +_ambiguous_dna_values = Bio.Data.IUPACData.ambiguous_dna_values.copy() +_ambiguous_dna_values.update({"?": "GATC", "-": "GATC"}) + +standard_nt_ambiguity_map = AmbiguityMap( + _ambiguous_dna_values, "AGCT", reversed_defaults={"AGCT": "N"} +) +"""The standard IUPAC nucleotide ambiguity map, in which 'N', '?', and '-' are +all considered fully ambiguous.""" + +standard_nt_ambiguity_map_gap_as_char = AmbiguityMap( + _ambiguous_dna_values_gap_as_char, "AGCT-" +) +"""The standard IUPAC nucleotide ambiguity map, in which '-' is treated as a +fifth base, '?' is fully ambiguous, and the ambiguity 'N' excludes '-'.""" + + +
+[docs] +class TransitionModel: + """A class describing a collection of states, and the transition costs + between them, for weighted parsimony. + + In addition to them methods defined below, there are also attributes which are created by + the constructor, which should be ensured to be correct in any subclass of TransitionModel: + + * ``base_indices`` is a dictionary mapping bases in ``self.bases`` to their indices + * ``mask_vectors`` is a dictionary mapping ambiguity codes (including non-ambiguous bases) + to vectors of floats which are 0 at indices compatible with the ambiguity code, and infinity + otherwise. + * ``bases`` is a tuple recording the correct order of unambiguous bases + + + Args: + bases: An ordered collection of valid character states + transition_weights: A matrix describing transition costs between bases, with index order (from_base, to_base) + ambiguity_map: An :class:`AmbiguityMap` object describing ambiguity codes. If not provided, the default + mapping depends on the provided bases. If provided bases are ``AGCT``, then + :class:`standard_nt_ambiguity_map` is used. If bases are ``AGCT-``, then + :class:`standard_nt_ambiguity_map_gap_as_char` is used. Otherwise, it is assumed that no ambiguity + codes are allowed. To override these defaults, provide an :class:`AmbiguityMap` explicitly. + """ + +
+[docs] + def __init__( + self, + bases: CharacterSequence = tuple("AGCT"), + transition_weights: Sequence[Sequence[float]] = None, + ambiguity_map: AmbiguityMap = None, + ): + self.bases = tuple(bases) + self.base_indices = frozendict({base: idx for idx, base in enumerate(bases)}) + n = len(self.bases) + if transition_weights is None: + yey = np.ones([n, n]) - np.eye(n) + self.transition_weights = yey + elif len(transition_weights) != n or len(transition_weights[0]) != n: + raise ValueError( + "transition_weights must be a nxn matrix, with n=len(bases)" + ) + else: + self.transition_weights = transition_weights + if ambiguity_map is None: + if set(self.bases) == set("AGCT"): + self.ambiguity_map = standard_nt_ambiguity_map + elif set(self.bases) == set("AGCT-"): + self.ambiguity_map = standard_nt_ambiguity_map_gap_as_char + else: + self.ambiguity_map = AmbiguityMap({}, self.bases) + else: + if not isinstance(ambiguity_map, AmbiguityMap): + raise ValueError( + "ambiguity_map, if provided, must be a " + "historydag.parsimony.AmbiguityMap object" + ) + if ambiguity_map.bases != set(self.bases): + raise ValueError( + "ambiguity_map.bases does not match bases provided to " + "TransitionModel constructor" + ) + self.ambiguity_map = ambiguity_map + + # This is applicable even when diagonal entries in transition rate matrix are + # nonzero, since it is only a mask on allowable sites based on each base. + self.mask_vectors = { + code: np.array( + [ + 0 if base in self.ambiguity_map[code] else float("inf") + for base in self.bases + ] + ) + for code in self.ambiguity_map + }
+ + +
+[docs] + def get_adjacency_array(self, seq_len: int) -> np.array: + """Return an adjacency array for a sequence of length ``seq_len``. + + This is a matrix containing transition costs, with index order + (site, from_base, to_base) + """ + return np.array([self.transition_weights] * seq_len)
+ + +
+[docs] + def get_ambiguity_from_tuple(self, tup: Tuple) -> Character: + """Retrieve an ambiguity code encoded by tup, which encodes a set of + bases with a tuple of 0's and 1's. + + For example, if ``self.bases`` is 'AGCT'``, then ``(0, 1, 1, + 1)`` would return `A`. + """ + return self.ambiguity_map.reversed[ + frozenset(self.bases[i] for i, flag in enumerate(tup) if flag == 0) + ]
+ + +
+[docs] + def character_distance( + self, parent_char: Character, child_char: Character, site: int = None + ) -> float: + """Return the transition cost from parent_char to child_char, two + unambiguous characters. + + keyword argument ``site`` is ignored in this base class. + """ + return self.transition_weights[self.base_indices[parent_char]][ + self.base_indices[child_char] + ]
+ + +
+[docs] + def weighted_hamming_distance( + self, parent_seq: CharacterSequence, child_seq: CharacterSequence + ) -> float: + """Return the sum of sitewise transition costs, from parent_seq to + child_seq. + + Both parent_seq and child_seq are expected to be unambiguous. + """ + if len(parent_seq) != len(child_seq): + raise ValueError("sequence lengths do not match!") + return sum( + self.character_distance(pchar, cchar, site=(idx + 1)) + for idx, (pchar, cchar) in enumerate(zip(parent_seq, child_seq)) + )
+ + +
+[docs] + def weighted_cg_hamming_distance( + self, parent_cg: "CompactGenome", child_cg: "CompactGenome" + ) -> float: + """Return the sum of sitewise transition costs, from parent_cg to + child_cg. + + Both parent_seq and child_seq are expected to be unambiguous, + but sites where parent_cg and child_cg both match their + reference sequence are ignored, so this method is not suitable + for weighted parsimony for transition matrices that contain + nonzero entries along the diagonal. + """ + if parent_cg.reference != child_cg.reference: + raise ValueError("Reference sequences do not match!") + s1 = set(parent_cg.mutations.keys()) + s2 = set(child_cg.mutations.keys()) + return sum( + self.character_distance( + parent_cg.get_site(site), child_cg.get_site(site), site=site + ) + for site in s1 | s2 + )
+ + +
+[docs] + def min_character_mutation( + self, + parent_char: Character, + child_char: Character, + site=None, + **kwargs, + ) -> float: + """Allowing child_char to be ambiguous, returns the minimum possible + transition weight between parent_char and child_char, preceded in a + tuple by the unambiguous child character that achieves that weight. + + Keyword argument ``site`` is ignored in this base class. + """ + child_set = sorted(list(self.ambiguity_map[child_char])) + p_idx = self.base_indices[parent_char] + return min( + ( + (cbase, self.transition_weights[p_idx][self.base_indices[cbase]]) + for cbase in child_set + ), + key=lambda it: it[-1], + )
+ + +
+[docs] + def min_character_distance( + self, parent_char: Character, child_char: Character, site=None + ) -> float: + """Allowing child_char to be ambiguous, returns the minimum possible + transition weight between parent_char and child_char. + + Keyword argument ``site`` is ignored in this base class. + """ + return self.min_character_mutation( + parent_char, + child_char, + site=site, + )[1]
+ + +
+[docs] + def min_weighted_hamming_distance( + self, parent_seq: CharacterSequence, child_seq: CharacterSequence + ) -> float: + """Assuming the child_seq may contain ambiguous characters, returns the + minimum possible transition weight between parent_seq and child_seq.""" + if len(parent_seq) != len(child_seq): + raise ValueError("sequence lengths do not match!") + return sum( + self.min_character_distance(pchar, cchar, site=(idx + 1)) + for idx, (pchar, cchar) in enumerate(zip(parent_seq, child_seq)) + )
+ + +
+[docs] + def min_weighted_cg_hamming_distance( + self, parent_cg: "CompactGenome", child_cg: "CompactGenome" + ) -> float: + """Return the sum of sitewise transition costs, from parent_cg to + child_cg. + + child_cg may contain ambiguous characters, and in this case + those sites will contribute the minimum possible transition cost + to the returned value. + + Sites where parent_cg and child_cg both match their reference + sequence are ignored, so this method is not suitable for + weighted parsimony for transition matrices that contain nonzero + entries along the diagonal. + """ + if parent_cg.reference != child_cg.reference: + raise ValueError("Reference sequences do not match!") + s1 = set(parent_cg.mutations.keys()) + s2 = set(child_cg.mutations.keys()) + return sum( + self.min_character_distance( + parent_cg.get_site(site), child_cg.get_site(site), site=site + ) + for site in s1 | s2 + )
+ + +
+[docs] + def weighted_hamming_edge_weight( + self, field_name: str + ) -> Callable[["HistoryDagNode", "HistoryDagNode"], float]: + """Returns a function for computing weighted hamming distance between + two nodes' sequences. + + Args: + field_name: The name of the node label field which contains sequences. + + Returns: + A function accepting two :class:`HistoryDagNode` objects ``n1`` and ``n2`` and returning + a float: the transition cost from ``n1.label.<field_name>`` to ``n2.label.<field_name>``, or 0 if + n1 is the UA node. + """ + + @utils.access_nodefield_default(field_name, 0) + def edge_weight(parent, child): + return self.weighted_hamming_distance(parent, child) + + return edge_weight
+ + +
+[docs] + def weighted_cg_hamming_edge_weight( + self, + field_name: str, + count_root_muts: bool = True, + ) -> Callable[["HistoryDagNode", "HistoryDagNode"], float]: + """Returns a function for computing weighted hamming distance between + two nodes' compact genomes. + + Args: + field_name: The name of the node label field which contains compact genomes. + count_root_muts: If True, the reference sequence of root nodes' compact + genomes is considered to be the ancestral sequence of each history, + and mutations from the reference to the history root CG are counted. + + Returns: + A function accepting two :class:`HistoryDagNode` objects ``n1`` and ``n2`` and returning + a float: the transition cost from ``n1.label.<field_name>`` to ``n2.label.<field_name>``, or + the number of mutations between the reference and the CG of n2 if n1 is the UA node. + + Sites where parent_cg and child_cg + both match their reference sequence are ignored, so this method is not suitable for weighted parsimony + for transition matrices that contain nonzero entries along the diagonal. + """ + + def edge_weight(parent, child): + # Get the number of mutations on a branch pointing to the UA node + if parent.is_ua_node(): + if count_root_muts: + return len(getattr(child.label, field_name).mutations) + else: + return 0 + else: + return self.weighted_cg_hamming_distance( + getattr(parent.label, field_name), getattr(child.label, field_name) + ) + + return edge_weight
+ + +
+[docs] + def min_weighted_hamming_edge_weight( + self, field_name: str + ) -> Callable[["HistoryDagNode", "HistoryDagNode"], float]: + """Returns a function for computing weighted hamming distance between + two nodes' sequences. + + If the child node is a leaf node, and its sequence contains ambiguities, the minimum possible + transition cost from parent to child will be returned. + + Args: + field_name: The name of the node label field which contains sequences. + + Returns: + A function accepting two :class:`HistoryDagNode` objects ``n1`` and ``n2`` and returning + a float: the transition cost from ``n1.label.<field_name>`` to ``n2.label.<field_name>``, or 0 if + n1 is the UA node. + """ + + def edge_weight(parent, child): + if parent.is_ua_node(): + return 0 + elif child.is_leaf(): + return self.min_weighted_hamming_distance( + getattr(parent.label, field_name), getattr(child.label, field_name) + ) + else: + return self.weighted_hamming_distance( + getattr(parent.label, field_name), getattr(child.label, field_name) + ) + + return edge_weight
+ + +
+[docs] + def min_weighted_cg_hamming_edge_weight( + self, + field_name: str, + count_root_muts: bool = True, + ) -> Callable[["HistoryDagNode", "HistoryDagNode"], float]: + """Returns a function for computing weighted hamming distance between + two nodes' compact genomes. + + If the child node is a leaf node, and its compact genome contains ambiguities, the minimum possible + transition cost from parent to child will be returned by this function. + + Args: + field_name: The name of the node label field which contains compact genomes. + count_root_muts: If True, the reference sequence of root nodes' compact + genomes is considered to be the ancestral sequence of each history, + and mutations from the reference to the history root CG are counted. + + Returns: + A function accepting two :class:`HistoryDagNode` objects ``n1`` and ``n2`` and returning + a float: the transition cost from ``n1.label.<field_name>`` to ``n2.label.<field_name>``, or 0 if + n1 is the UA node. + """ + unambiguous_edge_weight = self.weighted_cg_hamming_edge_weight( + field_name, + count_root_muts=count_root_muts, + ) + + def edge_weight(parent, child): + if child.is_leaf(): + return self.min_weighted_cg_hamming_distance( + getattr(parent.label, field_name), getattr(child.label, field_name) + ) + else: + return unambiguous_edge_weight(parent, child) + + return edge_weight
+ + +
+[docs] + def get_weighted_cg_parsimony_countfuncs( + self, + field_name: str, + leaf_ambiguities: bool = False, + count_root_muts: bool = True, + name: str = "WeightedParsimony", + ) -> AddFuncDict: + """Create a :class:`historydag.utils.AddFuncDict` object for counting + weighted parsimony in a HistoryDag with labels containing compact + genomes. + + Args: + field_name: the label field name in which compact genomes can be found + leaf_ambiguities: if True, leaf compact genomes are permitted to contain ambiguity codes + count_root_muts: If True, the reference sequence of root nodes' compact + genomes is considered to be the ancestral sequence of each history, + and mutations from the reference to the history root CG are counted. + name: the name for the returned AddFuncDict object + """ + if leaf_ambiguities: + edge_weight = self.min_weighted_cg_hamming_edge_weight( + field_name, count_root_muts=count_root_muts + ) + else: + edge_weight = self.weighted_cg_hamming_edge_weight( + field_name, count_root_muts=count_root_muts + ) + return AddFuncDict( + { + "start_func": lambda n: 0, + "edge_weight_func": edge_weight, + "accum_func": sum, + }, + name=name, + )
+ + +
+[docs] + def get_weighted_parsimony_countfuncs( + self, + field_name: str, + leaf_ambiguities: bool = False, + name: str = "WeightedParsimony", + ): + """Create a :class:`historydag.utils.AddFuncDict` object for counting + weighted parsimony in a HistoryDag with labels containing sequences. + + Args: + field_name: the label field name in which sequences can be found + leaf_ambiguities: if True, leaf sequences are permitted to contain ambiguity codes + name: the name for the returned AddFuncDict object + """ + if leaf_ambiguities: + edge_weight = self.min_weighted_hamming_edge_weight(field_name) + else: + edge_weight = self.weighted_hamming_edge_weight(field_name) + return AddFuncDict( + { + "start_func": lambda n: 0, + "edge_weight_func": edge_weight, + "accum_func": sum, + }, + name=name, + )
+
+ + + +
+[docs] +class UnitTransitionModel(TransitionModel): + """A subclass of :class:`TransitionModel` to be used when all non-identical + transitions have unit cost. + + Args: + bases: An ordered container of allowed character states + ambiguity_map: A :class:`AmbiguityMap` object describing allowed ambiguity codes. + If not provided, a default will be chosen by the same method as the constructor for + :class:`TransitionModel`. + """ + +
+[docs] + def __init__( + self, bases: CharacterSequence = "AGCT", ambiguity_map: AmbiguityMap = None + ): + super().__init__(bases=bases, ambiguity_map=None)
+ + +
+[docs] + def character_distance( + self, parent_char: Character, child_char: Character, site: int = None + ) -> int: + """Return the transition cost from parent_char to child_char, two + unambiguous characters. + + keyword argument ``site`` is ignored in this subclass. + """ + return int(parent_char != child_char)
+ + +
+[docs] + def min_character_mutation( + self, + parent_char: Character, + child_char: Character, + site=None, + randomize=False, + **kwargs, + ) -> float: + """Allowing child_char to be ambiguous, returns the minimum possible + transition weight between parent_char and child_char, preceded in a + tuple by the unambiguous child character that achieves that weight. + + Keyword argument ``site`` is ignored in this base class. + """ + if parent_char == child_char: + return (child_char, 0) + else: + options = self.ambiguity_map[child_char] + if parent_char in options: + return (parent_char, 0) + else: + if randomize: + base = random.choice(list(sorted(options))) + else: + # arbitrary, but deterministic + base = min(options) + return (base, 1)
+ + +
+[docs] + def get_weighted_cg_parsimony_countfuncs( + self, + field_name: str, + leaf_ambiguities: AmbiguityMap = False, + name: str = "HammingParsimony", + ) -> AddFuncDict: + """Create a :class:`historydag.utils.AddFuncDict` object for counting + parsimony in a HistoryDag with labels containing compact genomes. + + Args: + field_name: the label field name in which compact genomes can be found + leaf_ambiguities: if True, leaf compact genomes are permitted to contain ambiguity codes + name: the name for the returned AddFuncDict object + """ + return super().get_weighted_cg_parsimony_countfuncs( + field_name, leaf_ambiguities=leaf_ambiguities, name=name + )
+ + +
+[docs] + def get_weighted_parsimony_countfuncs( + self, + field_name: str, + leaf_ambiguities: AmbiguityMap = False, + name: str = "HammingParsimony", + ) -> AddFuncDict: + """Create a :class:`historydag.utils.AddFuncDict` object for counting + weighted parsimony in a HistoryDag with labels containing sequences. + + Args: + field_name: the label field name in which sequences can be found + leaf_ambiguities: if True, leaf sequences are permitted to contain ambiguity codes + name: the name for the returned AddFuncDict object + """ + return super().get_weighted_parsimony_countfuncs( + field_name, leaf_ambiguities=leaf_ambiguities, name=name + )
+
+ + + +
+[docs] +class SitewiseTransitionModel(TransitionModel): + """A subclass of :class:`TransitionModel` to be used when transition costs + depend on site. + + Args: + bases: An ordered container of allowed character states + transition_matrix: A matrix of transition costs between provided bases, in which + index order is (site, from_base, to_base) + ambiguity_map: An :class:`AmbiguityMap` object describing ambiguous characters. If not provided + a default will be chosen as in the constructor for :class:`TransitionModel`. + """ + +
+[docs] + def __init__( + self, + bases: CharacterSequence = "AGCT", + transition_matrix: Sequence[Sequence[Sequence[float]]] = None, + ambiguity_map: AmbiguityMap = None, + ): + assert transition_matrix.shape[1:] == (len(bases), len(bases)) + super().__init__(bases=bases, ambiguity_map=None) + self.transition_weights = None + self.sitewise_transition_matrix = transition_matrix + self._seq_len = len(self.sitewise_transition_matrix)
+ + +
+[docs] + def character_distance( + self, parent_char: Character, child_char: Character, site: int + ) -> float: + """Returns the transition cost from ``parent_char`` to ``child_char``, + assuming each character is at the one-based ``site`` in their + respective sequences. + + Both parent_char and child_char are expected to be unambiguous. + """ + return self.sitewise_transition_matrix[site - 1][parent_char][child_char]
+ + +
+[docs] + def min_character_mutation( + self, + parent_char: Character, + child_char: Character, + site=None, + **kwargs, + ) -> float: + """Allowing child_char to be ambiguous, returns the minimum possible + transition weight between parent_char and child_char, preceded in a + tuple by the unambiguous child character that achieves that weight. + + Keyword argument ``site`` is ignored in this base class. + """ + child_set = sorted(list(self.ambiguity_map[child_char])) + p_idx = self.base_indices[parent_char] + return min( + ( + ( + cbase, + self.transition_weights[site - 1][p_idx][self.base_indices[cbase]], + ) + for cbase in child_set + ), + key=lambda it: it[-1], + )
+ + +
+[docs] + def get_adjacency_array(self, seq_len): + """Return an adjacency array for a sequence of length ``seq_len``. + + This is a matrix containing transition costs, with index order + (site, from_base, to_base) + """ + if seq_len != self._seq_len: + raise ValueError( + f"SitewiseTransitionModel instance supports sequence length of {self._seq_len}" + ) + return self.sitewise_transition_matrix
+
+ + + +default_nt_transitions = UnitTransitionModel(bases="AGCT") +"""A transition model for nucleotides using unit transition weights, and the +standard IUPAC ambiguity codes, with base order ``AGCT`` and ``N``, ``?`` and +``-`` treated as fully ambiguous characters.""" + +default_nt_gaps_transitions = UnitTransitionModel(bases="AGCT-") +"""A transition model for nucleotides using unit transition weights, and the +standard IUPAC nucleotide ambiguity map, with '-' is treated as a fifth base, +'?' fully ambiguous, and the ambiguity 'N' excluding only '-'.""" + +hamming_edge_weight = default_nt_transitions.weighted_hamming_edge_weight("sequence") +"""An edge weight function accepting (parent, child) pairs of HistoryDagNodes, +and returning the hamming distance between the sequences stored in the +``sequence`` attributes of their labels.""" +hamming_edge_weight_ambiguous_leaves = ( + default_nt_transitions.min_weighted_hamming_edge_weight("sequence") +) +"""An edge weight function accepting (parent, child) pairs of HistoryDagNodes, +and returning the hamming distance between the sequences stored in the +``sequence`` attributes of their labels. + +This edge weight function allows leaf nodes to have ambiguous sequences. +""" + +hamming_cg_edge_weight = default_nt_transitions.weighted_cg_hamming_edge_weight( + "compact_genome" +) +"""An edge weight function accepting (parent, child) pairs of HistoryDagNodes, +and returning the hamming distance between the compact genomes stored in the +``compact_genome`` attributes of their labels.""" + +hamming_cg_edge_weight_ambiguous_leaves = ( + default_nt_transitions.min_weighted_cg_hamming_edge_weight("compact_genome") +) +"""An edge weight function accepting (parent, child) pairs of HistoryDagNodes, +and returning the hamming distance between the compact genomes stored in the +``compact_genome`` attributes of their labels. + +This edge weight function allows leaf nodes to have ambiguous compact +genomes. +""" + +hamming_distance_countfuncs = default_nt_transitions.get_weighted_parsimony_countfuncs( + "sequence", leaf_ambiguities=False +) +"""Provides functions to count hamming distance parsimony when leaf sequences +may be ambiguous. + +For use with :meth:`historydag.AmbiguousLeafSequenceHistoryDag.weight_count`. +""" + +leaf_ambiguous_hamming_distance_countfuncs = ( + default_nt_transitions.get_weighted_parsimony_countfuncs( + "sequence", leaf_ambiguities=True + ) +) +"""Provides functions to count hamming distance parsimony when leaf sequences +may be ambiguous. + +For use with :meth:`historydag.AmbiguousLeafSequenceHistoryDag.weight_count`. +""" + + +compact_genome_hamming_distance_countfuncs = ( + default_nt_transitions.get_weighted_cg_parsimony_countfuncs( + "compact_genome", leaf_ambiguities=False + ) +) +"""Provides functions to count hamming distance parsimony when sequences are +stored as CompactGenomes. + +For use with :meth:`historydag.CGHistoryDag.weight_count`. +""" + + +leaf_ambiguous_compact_genome_hamming_distance_countfuncs = ( + default_nt_transitions.get_weighted_cg_parsimony_countfuncs( + "compact_genome", leaf_ambiguities=True + ) +) +"""Provides functions to count hamming distance parsimony when leaf compact +genomes may be ambiguous. + +For use with :meth:`historydag.AmbiguousLeafCGHistoryDag.weight_count`. +""" +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/historydag/sequence_dag.html b/_modules/historydag/sequence_dag.html index 0409a96..5b7b20f 100644 --- a/_modules/historydag/sequence_dag.html +++ b/_modules/historydag/sequence_dag.html @@ -32,6 +32,7 @@ +
diff --git a/_modules/historydag/utils.html b/_modules/historydag/utils.html index a81b12b..e2af247 100644 --- a/_modules/historydag/utils.html +++ b/_modules/historydag/utils.html @@ -32,6 +32,7 @@ +
diff --git a/_modules/index.html b/_modules/index.html index b48ecf8..1112e03 100644 --- a/_modules/index.html +++ b/_modules/index.html @@ -32,6 +32,7 @@ +
@@ -83,6 +84,7 @@

All modules for which code is available

  • historydag.dag_node
  • historydag.mutation_annotated_dag
  • historydag.parsimony
  • +
  • historydag.parsimony_utils
  • historydag.sequence_dag
  • historydag.utils
  • diff --git a/_sources/api.rst.txt b/_sources/api.rst.txt index 4318f98..f46f86f 100644 --- a/_sources/api.rst.txt +++ b/_sources/api.rst.txt @@ -54,5 +54,8 @@ Modules mutation_annotated_dag utils parsimony + parsimony_utils compact_genome + dag_node counterops + beast_loader diff --git a/_sources/stubs/historydag.dag_node.rst.txt b/_sources/stubs/historydag.dag_node.rst.txt new file mode 100644 index 0000000..4eb4bc6 --- /dev/null +++ b/_sources/stubs/historydag.dag_node.rst.txt @@ -0,0 +1,37 @@ +historydag.dag\_node +==================== + +.. automodule:: historydag.dag_node + + + + + + + + .. rubric:: Functions + + .. autosummary:: + + empty_node + + + + + + .. rubric:: Classes + + .. autosummary:: + + EdgeSet + HistoryDagNode + UANode + + + + + + + + + diff --git a/_sources/stubs/historydag.parsimony_utils.rst.txt b/_sources/stubs/historydag.parsimony_utils.rst.txt new file mode 100644 index 0000000..5eeff31 --- /dev/null +++ b/_sources/stubs/historydag.parsimony_utils.rst.txt @@ -0,0 +1,59 @@ +historydag.parsimony\_utils +=========================== + +.. automodule:: historydag.parsimony_utils + + + + .. rubric:: Module Attributes + + .. autosummary:: + + standard_nt_ambiguity_map + standard_nt_ambiguity_map_gap_as_char + default_nt_transitions + default_nt_gaps_transitions + hamming_edge_weight + hamming_edge_weight_ambiguous_leaves + hamming_cg_edge_weight + hamming_cg_edge_weight_ambiguous_leaves + hamming_distance_countfuncs + leaf_ambiguous_hamming_distance_countfuncs + compact_genome_hamming_distance_countfuncs + leaf_ambiguous_compact_genome_hamming_distance_countfuncs + + + + + + .. rubric:: Functions + + .. autosummary:: + + hamming_cg_edge_weight + hamming_cg_edge_weight_ambiguous_leaves + hamming_edge_weight + hamming_edge_weight_ambiguous_leaves + + + + + + .. rubric:: Classes + + .. autosummary:: + + AmbiguityMap + ReversedAmbiguityMap + SitewiseTransitionModel + TransitionModel + UnitTransitionModel + + + + + + + + + diff --git a/_static/logo.png b/_static/logo.png new file mode 100644 index 0000000..69e0839 Binary files /dev/null and b/_static/logo.png differ diff --git a/api.html b/api.html index 50a351f..27e21d1 100644 --- a/api.html +++ b/api.html @@ -35,6 +35,7 @@ +
    @@ -71,7 +72,9 @@
  • historydag.mutation_annotated_dag
  • historydag.utils
  • historydag.parsimony
  • +
  • historydag.parsimony_utils
  • historydag.compact_genome
  • +
  • historydag.dag_node
  • historydag.counterops
  • @@ -175,7 +178,13 @@

    Modules

    parsimony

    A module implementing Sankoff Algorithm.

    -

    compact_genome

    +

    parsimony_utils

    +

    This module provides tools for describing and computing parsimony and weighted parsimony, and for describing allowed characters and ambiguity codes.

    + +

    compact_genome

    +

    This module provides a CompactGenome class, intended as a convenient and compact representation of a nucleotide sequence as a collection of mutations relative to a reference sequence.

    + +

    dag_node

    counterops

    diff --git a/genindex.html b/genindex.html index 0f3b082..44db17d 100644 --- a/genindex.html +++ b/genindex.html @@ -32,6 +32,7 @@ +
    @@ -109,10 +110,24 @@

    _

    -
  • add_edge() (historydag.HistoryDagNode method) +
  • add_edge() (historydag.dag_node.HistoryDagNode method) + +
  • add_label_fields() (historydag.dag.HistoryDag method)
  • +
  • add_to_edgeset() (historydag.dag_node.EdgeSet method) +
  • + + - + + - - -
  • sorted_child_clades() (historydag.HistoryDagNode method) -
  • -
  • sorted_partitions() (historydag.HistoryDagNode method) +
  • SitewiseTransitionModel (class in historydag.parsimony_utils)
  • -
  • StrState (class in historydag.utils) +
  • sorted_child_clades() (historydag.dag_node.HistoryDagNode method) + +
    • +
    • sorted_partitions() (historydag.dag_node.HistoryDagNode method) + +
    • +
    • standard_nt_ambiguity_map (in module historydag.parsimony_utils) +
    • +
    • standard_nt_ambiguity_map_gap_as_char (in module historydag.parsimony_utils) +
    • +
    • StrState (class in historydag.utils) +
    • subset_sites() (historydag.compact_genome.CompactGenome method)
    • sum_probability() (historydag.dag.HistoryDag method) @@ -1000,6 +1199,8 @@

      T

    • to_ascii() (historydag.dag.HistoryDag method) + -
    • diff --git a/objects.inv b/objects.inv index 03da724..d974617 100644 Binary files a/objects.inv and b/objects.inv differ diff --git a/py-modindex.html b/py-modindex.html index 62412fb..4653933 100644 --- a/py-modindex.html +++ b/py-modindex.html @@ -35,6 +35,7 @@ +
      @@ -111,6 +112,11 @@

      Python Module Index

          historydag.dag + + +     + historydag.dag_node +     @@ -121,6 +127,11 @@

      Python Module Index

          historydag.parsimony + + +     + historydag.parsimony_utils +     diff --git a/quickstart.html b/quickstart.html index ab67404..81d06dc 100644 --- a/quickstart.html +++ b/quickstart.html @@ -35,6 +35,7 @@ +
      diff --git a/search.html b/search.html index 8bae5a4..070bf5c 100644 --- a/search.html +++ b/search.html @@ -35,6 +35,7 @@ +
      diff --git a/searchindex.js b/searchindex.js index c757024..421eb92 100644 --- a/searchindex.js +++ b/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["api", "index", "quickstart", "stubs/historydag.HistoryDag", "stubs/historydag.HistoryDagNode", "stubs/historydag.compact_genome", "stubs/historydag.counterops", "stubs/historydag.dag", "stubs/historydag.empty_node", "stubs/historydag.from_newick", "stubs/historydag.from_tree", "stubs/historydag.history_dag_from_etes", "stubs/historydag.history_dag_from_histories", "stubs/historydag.history_dag_from_newicks", "stubs/historydag.mutation_annotated_dag", "stubs/historydag.parsimony", "stubs/historydag.sequence_dag", "stubs/historydag.utils"], "filenames": ["api.rst", "index.rst", "quickstart.rst", "stubs/historydag.HistoryDag.rst", "stubs/historydag.HistoryDagNode.rst", "stubs/historydag.compact_genome.rst", "stubs/historydag.counterops.rst", "stubs/historydag.dag.rst", "stubs/historydag.empty_node.rst", "stubs/historydag.from_newick.rst", "stubs/historydag.from_tree.rst", "stubs/historydag.history_dag_from_etes.rst", "stubs/historydag.history_dag_from_histories.rst", "stubs/historydag.history_dag_from_newicks.rst", "stubs/historydag.mutation_annotated_dag.rst", "stubs/historydag.parsimony.rst", "stubs/historydag.sequence_dag.rst", "stubs/historydag.utils.rst"], "titles": ["Description", "historydag documentation", "Quickstart", "historydag.HistoryDag", "historydag.HistoryDagNode", "historydag.compact_genome", "historydag.counterops", "historydag.dag", "historydag.empty_node", "historydag.from_newick", "historydag.from_tree", "historydag.history_dag_from_etes", "historydag.history_dag_from_histories", "historydag.history_dag_from_newicks", "historydag.mutation_annotated_dag", "historydag.parsimony", "historydag.sequence_dag", "historydag.utils"], "terms": {"thi": [0, 2, 3, 4, 5, 7, 14, 15, 16, 17], "page": [0, 1], "document": [0, 2, 3, 7], "api": [0, 2], "historydag": 0, "packag": [0, 1, 2], "The": [0, 3, 5, 7, 10, 14, 15, 16, 17], "fundament": 0, "data": [0, 3, 7, 9, 10, 14, 15], "structur": [0, 4, 7, 10], "implement": [0, 2, 3, 7, 10, 14, 15, 17], "here": [0, 2], "i": [0, 1, 2, 3, 4, 5, 7, 10, 14, 15, 16, 17], "provid": [0, 2, 3, 4, 5, 7, 9, 10, 14, 15, 16, 17], "effici": [0, 2], "storag": 0, "collect": [0, 1, 2, 3, 5, 6, 7], "tree": [0, 1, 3, 4, 7, 9, 10, 14, 15, 16, 17], "intern": [0, 1, 2, 3, 4, 7, 9, 14, 15, 16, 17], "node": [0, 2, 3, 4, 7, 9, 10, 14, 15, 16, 17], "label": [0, 1, 2, 3, 4, 7, 8, 9, 10, 14, 15, 16, 17], "In": [0, 2, 3, 5, 7, 15, 17], "we": [0, 2, 3, 7, 17], "refer": [0, 2, 3, 5, 7, 9, 14, 17], "histori": [0, 1, 3, 4, 7, 9, 10, 12, 13, 14, 15, 16, 17], "A": [0, 3, 4, 5, 7, 14, 15, 16, 17], "can": [0, 2, 3, 6, 7, 10, 14, 15, 17], "repres": [0, 1, 2, 3, 5, 6, 7, 14, 17], "shape": [0, 2, 3, 4, 7, 10], "object": [0, 2, 3, 4, 6, 7, 9, 10, 14, 15, 16, 17], "creat": [0, 2, 3, 5, 7, 14], "from": [0, 2, 3, 4, 5, 7, 10, 12, 13, 14, 15, 17], "merg": [0, 3, 7], "togeth": [0, 2, 3, 7, 14], "dag": [0, 1, 2, 3, 4, 9, 12, 13, 14, 15, 16, 17], "do": [0, 2, 5, 14, 17], "comput": [0, 3, 5, 7, 14, 15, 17], "store": [0, 2, 3, 7, 14, 15], "access": [0, 7, 10, 17], "contain": [0, 2, 3, 4, 5, 7, 9, 10, 14, 15, 16, 17], "export": 0, "them": [0, 2, 3, 7, 15], "other": [0, 2, 3, 4, 7, 14, 17], "format": [0, 2, 3, 4, 5, 7, 9, 14, 15], "top": 0, "level": [0, 3, 7, 14], "promot": 0, "direct": [1, 3, 7], "acycl": 1, "graph": [1, 3, 7], "For": [1, 2, 3, 7, 14, 17], "exampl": [1, 2, 3, 5, 7, 14, 17], "inform": [1, 3, 7, 14, 15], "get": [1, 2, 3, 5, 7, 14, 17], "start": [1, 3, 7], "see": [1, 2, 3, 7, 9, 13, 14, 15, 17], "quickstart": 1, "below": [1, 2, 3, 4, 7, 17], "readm": 1, "github": [1, 2], "descript": [1, 2, 3, 7, 14], "class": [1, 3, 4, 5, 7, 14, 16, 17], "historydagnod": [1, 2, 3, 7, 8, 10, 17], "function": [1, 2, 3, 4, 5, 6, 7, 10, 14, 15, 17], "from_tre": [1, 2, 7, 9], "empty_nod": 1, "from_newick": [1, 7, 13], "history_dag_from_newick": [1, 2, 7], "history_dag_from_et": [1, 2, 7], "history_dag_from_histori": [1, 7], "modul": [1, 2, 7, 14, 15, 17], "sequence_dag": [1, 2, 3, 7, 14], "mutation_annotated_dag": [1, 2], "util": [1, 2, 3, 7, 9], "parsimoni": [1, 2, 3, 7, 16, 17], "compact_genom": [1, 2, 14, 16], "counterop": 1, "index": [1, 3, 5, 7, 14], "search": 1, "conceptu": 2, "introduct": 2, "walk": 2, "through": 2, "essenti": 2, "featur": [2, 3, 7, 9, 17], "wai": [2, 3, 6, 7, 14, 15], "whose": [2, 3, 7, 15, 17], "includ": [2, 3, 4, 7, 14, 15, 17], "each": [2, 3, 4, 5, 6, 7, 10, 14, 15, 16, 17], "carri": [2, 3, 7], "nucleotid": [2, 5, 14, 16], "sequenc": [2, 3, 5, 7, 10, 14, 15, 16, 17], "its": [2, 3, 7, 15, 17], "simplest": 2, "form": [2, 3, 7], "mai": [2, 3, 4, 7, 9, 10, 14, 15, 16, 17], "singl": [2, 3, 7, 17], "To": [2, 3, 7, 14, 17], "construct": [2, 7, 17], "annot": [2, 3, 7, 14, 17], "child": [2, 3, 4, 7, 10, 14, 17], "clade": [2, 3, 4, 7, 8, 10, 14, 15, 17], "beneath": [2, 3, 7], "set": [2, 3, 4, 7, 14, 15, 17], "leaf": [2, 3, 4, 7, 10, 14, 15, 16, 17], "reachabl": [2, 3, 4, 7], "": [2, 3, 4, 5, 7, 10, 14, 15, 17], "own": [2, 3, 7], "itself": [2, 3, 7], "also": [2, 3, 5, 7], "union": [2, 3, 4, 7], "sinc": [2, 3, 7, 17], "ar": [2, 3, 4, 5, 7, 10, 12, 14, 15, 17], "children": [2, 3, 4, 7, 8, 10, 15], "after": [2, 3, 7, 14, 15, 17], "ua": [2, 3, 7, 9, 10, 14, 15, 17], "univers": [2, 3, 7], "ancestor": [2, 3, 7], "ad": [2, 3, 4, 7, 9, 10, 17], "parent": [2, 3, 4, 7, 10, 14, 17], "origin": [2, 3, 7, 14], "root": [2, 3, 4, 7, 9, 10, 15, 17], "result": [2, 3, 5, 6, 7, 9, 14, 15, 17], "an": [2, 3, 4, 6, 7, 10, 14, 15, 16, 17], "which": [2, 3, 4, 5, 6, 7, 9, 10, 12, 14, 15, 16, 17], "call": [2, 3, 7, 9, 14, 16, 17], "notic": [2, 17], "edg": [2, 3, 4, 7, 10, 14, 17], "associ": [2, 3, 7, 15], "just": [2, 17], "specif": [2, 14, 15], "must": [2, 3, 6, 7, 10, 14, 15, 17], "same": [2, 3, 4, 6, 7, 9, 10, 14, 15, 17], "target": [2, 4, 14, 17], "convert": [2, 3, 4, 5, 7, 10, 14, 15, 16, 17], "multipl": [2, 3, 5, 7, 14, 15, 17], "those": [2, 3, 5, 7, 15, 17], "least": [2, 3, 5, 7], "us": [2, 3, 4, 5, 6, 7, 9, 10, 14, 15, 17], "ani": [2, 3, 4, 5, 7, 9, 10, 17], "all": [2, 3, 4, 5, 6, 7, 14, 15, 16, 17], "leav": [2, 3, 5, 7, 15, 17], "ha": [2, 3, 4, 7, 9, 10], "exactli": [2, 3, 7], "one": [2, 3, 5, 7, 15, 17], "pair": [2, 3, 5, 7, 14, 17], "invers": 2, "correspond": [2, 3, 7, 15], "introduc": [2, 17], "abov": [2, 3, 7], "highlight": 2, "red": [2, 3, 7], "imag": 2, "gener": [2, 3, 4, 7, 15, 17], "more": [2, 3, 4, 7, 9, 15, 17], "than": [2, 3, 7, 14, 15], "automat": [2, 14, 16], "swap": [2, 3, 7], "certain": [2, 17], "substructur": 2, "between": [2, 3, 5, 7, 17], "input": [2, 7, 9, 10, 17], "follow": [2, 3, 7], "figur": 2, "illustr": 2, "simpl": [2, 3, 7], "two": [2, 3, 5, 6, 7, 14, 15, 17], "left": [2, 3, 7, 17], "panel": 2, "yield": [2, 3, 5, 7, 17], "well": [2, 3, 7], "new": [2, 3, 5, 7, 9, 10, 17], "shown": 2, "right": [2, 3, 7, 17], "although": [2, 17], "pypi": 2, "straightforward": 2, "pip": 2, "http": [2, 3, 7], "com": 2, "matsengrp": 2, "archiv": 2, "ref": 2, "head": 2, "main": 2, "zip": 2, "altern": [2, 3, 7], "clone": 2, "repositori": 2, "git": 2, "history_dag_from_tre": [2, 7, 11], "mani": [2, 3, 7, 17], "attribut": [2, 3, 4, 7, 10, 14, 15, 17], "type": [2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 15, 17], "namedtupl": [2, 3, 4, 7, 14, 15, 17], "distinguish": [2, 5, 7, 10, 17], "instanc": [2, 3, 7, 17], "attr": [2, 3, 4, 7, 8, 10, 14, 16], "interfac": [2, 14], "map": [2, 3, 4, 5, 7, 9, 10], "appropri": [2, 3, 7, 10], "place": [2, 3, 7, 14], "let": [2, 14], "some": [2, 3, 7, 17], "import": [2, 3, 7], "hdag": [2, 17], "pickl": 2, "open": 2, "sample_data": 2, "toy_tre": 2, "p": 2, "rb": 2, "fh": 2, "ete_tre": 2, "now": [2, 3, 7], "second": [2, 3, 7, 17], "argument": [2, 3, 5, 7, 10, 13, 14, 15, 17], "list": [2, 3, 5, 6, 7, 9, 10, 12, 13, 14, 15, 17], "name": [2, 3, 4, 7, 9, 10, 11, 15, 17], "should": [2, 3, 5, 6, 7, 14, 15, 17], "differ": [2, 3, 5, 7, 14, 17], "keyword": [2, 3, 5, 7, 14, 15, 17], "label_funct": [2, 7, 9, 10, 13], "original_seq": 2, "lambda": [2, 3, 4, 7, 9, 10, 13, 17], "appear": [2, 3, 7, 17], "final": 2, "preserv": [2, 3, 7], "copi": [2, 3, 7], "overwrit": 2, "By": [2, 3, 7, 10], "take": [2, 3, 4, 7, 10, 14, 15, 17], "return": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], "valu": [2, 3, 5, 7, 10, 15, 17], "attr_func": [2, 7, 9, 10, 13], "accept": [2, 3, 7, 10], "default": [2, 3, 7, 10, 14, 15, 17], "arbitrari": [2, 3, 6, 7, 14, 17], "child_node_func": [2, 7, 10], "leaf_node_func": [2, 7, 10], "given": [2, 3, 7, 8, 15, 17], "dendropi": 2, "treelist": [2, 7, 12], "record": [2, 5, 14, 15, 17], "annotationset": 2, "seed_nod": 2, "get_valu": 2, "child_nod": 2, "leaf_it": 2, "string": [2, 3, 4, 5, 7, 9, 13, 14, 15, 17], "howev": [2, 3, 7, 15], "method": [2, 3, 4, 7, 14, 15, 16, 17], "pars": [2, 7, 9], "support": [2, 3, 7, 14, 17], "integ": [2, 3, 7, 14, 16], "via": 2, "pass": [2, 3, 7, 9, 14, 15, 17], "len": [2, 3, 7], "equival": [2, 3, 6, 7], "0": [2, 4, 5, 14, 15, 17], "1": [2, 3, 5, 7, 13, 14, 15, 17], "is_histori": [2, 3, 7], "true": [2, 3, 4, 5, 7, 14, 15, 17], "It": [2, 14], "trivial": 2, "history_list1": 2, "history_list2": 2, "get_histori": [2, 3, 7], "fail": [2, 3, 4, 7, 17], "overflow": 2, "error": [2, 3, 7, 17], "safer": 2, "count_histori": [2, 3, 7, 14], "rather": [2, 15], "python": 2, "size": 2, "rang": [2, 3, 7], "probabl": [2, 3, 6, 7, 14, 17], "determin": [2, 3, 5, 7, 14], "distribut": [2, 3, 7, 17], "accord": [2, 3, 7, 17], "uniform": [2, 3, 7], "make_uniform": [2, 3, 7], "style": 2, "combined_dag": 2, "dag1": 2, "dag2": 2, "both": [2, 3, 7, 17], "hand": 2, "These": [2, 3, 7, 14, 17], "achiev": [2, 3, 5, 6, 7], "so": [2, 3, 7, 15, 17], "were": [2, 3, 7], "_": 2, "8": [2, 7, 9, 17], "idag": 2, "empti": [2, 3, 7, 17], "rais": [2, 3, 7, 14], "intersectionerror": [2, 7], "traceback": 2, "most": [2, 7, 14], "recent": 2, "last": [2, 15], "file": [2, 5, 14, 15, 17], "stdin": 2, "line": 2, "home": 2, "user": 2, "py": 2, "1086": 2, "history_compl": 2, "request": 2, "complement": [2, 3, 7], "shorthand": 2, "history_intersect": [2, 3, 7], "mean": [2, 3, 7, 17], "possibl": [2, 3, 5, 7, 14, 15], "rule": 2, "fairli": 2, "strict": 2, "number": [2, 3, 7, 9, 14, 17], "usual": 2, "manag": 2, "make_complet": [2, 3, 7], "471": 2, "convert_to_collaps": [2, 3, 7], "connect": [2, 3, 7, 17], "adjac": [2, 3, 7], "affect": [2, 17], "chang": [2, 3, 7], "limit": 2, "unlabel": [2, 3, 7], "equal": [2, 3, 5, 7, 14], "uniqu": [2, 3, 7, 14], "topologi": [2, 3, 4, 7, 9, 10, 15, 17], "explode_nod": [2, 3, 7], "duplic": 2, "when": [2, 3, 4, 5, 7, 14, 15, 17], "expand": [2, 17], "ambigu": [2, 3, 5, 7, 14, 15, 16], "assign": [2, 3, 7, 14, 15, 17], "subject": 2, "constraint": 2, "There": 2, "varieti": 2, "expect": [2, 3, 4, 5, 7, 14, 16, 17], "sequencehistorydag": [2, 3, 7, 14, 16], "guarante": [2, 3, 7, 14], "possess": 2, "unambigu": [2, 14, 15, 16], "have": [2, 3, 7, 14, 15, 17], "length": [2, 6, 15], "ambiguousleafsequencehistorydag": [2, 16], "onli": [2, 3, 4, 7, 14, 15, 17], "permit": 2, "cghistorydag": [2, 14], "compactgenom": [2, 5, 14, 16], "compactli": 2, "summar": 2, "mutat": [2, 5, 14], "rel": [2, 5, 14, 17], "larch": [2, 14], "protobuf": [2, 14], "from_history_dag": [2, 3, 7], "check": [2, 4, 5, 14], "requir": [2, 3, 7, 9, 10, 14, 15, 16], "field": [2, 3, 4, 7, 9, 10, 14, 15, 16, 17], "exist": [2, 3, 7, 15], "thei": [2, 3, 5, 7, 14, 15], "attempt": [2, 3, 7, 14], "recov": [2, 3, 7], "alreadi": [2, 3, 4, 7, 15], "present": [2, 3, 4, 7], "detail": [2, 3, 7, 9, 13, 17], "process": 2, "sum": [2, 3, 6, 7, 17], "Such": 2, "e": [2, 3, 7, 17], "accumul": [2, 3, 7], "edge_weight_func": [2, 3, 7, 10, 17], "accum_func": [2, 3, 7, 14, 17], "respect": [2, 3, 7, 14, 15, 17], "weight_count": [2, 3, 7, 14, 17], "counter": [2, 3, 6, 7, 14, 16, 17], "optimal_weight_annot": [2, 3, 7, 17], "optim": [2, 3, 7, 17], "sub": [2, 3, 4, 7], "trim_optimal_weight": [2, 3, 7, 17], "trim": [2, 3, 7, 15, 17], "express": [2, 3, 5, 7, 15], "As": [2, 3, 7, 17], "suppos": 2, "want": 2, "decompos": 2, "where": [2, 3, 7, 14, 17], "minimum": [2, 3, 7], "n1": [2, 17], "n2": [2, 17], "optimal_func": [2, 3, 7, 17], "min": [2, 3, 5, 7, 15, 17], "35": 2, "17": 2, "36": 2, "325": 2, "37": 2, "173": 2, "kei": [2, 3, 4, 5, 6, 7, 10, 14, 15, 16, 17], "alwai": [2, 3, 7, 14], "add": [2, 3, 4, 7, 14, 15, 17], "maximum": [2, 3, 7], "max": [2, 3, 7, 17], "three": 2, "similar": [2, 3, 7, 17], "special": [2, 14], "subclass": [2, 3, 7, 14, 16, 17], "dictionari": [2, 3, 4, 5, 7, 10, 14, 15, 17], "build": [2, 7, 10, 12, 13, 15], "addit": [2, 3, 7, 10, 15], "start_func": [2, 3, 7, 14, 17], "what": 2, "simpli": [2, 3, 7, 14, 17], "ident": [2, 3, 7], "node_count_func": 2, "n": [2, 3, 4, 7, 9, 10, 13, 15, 17], "nodecount": 2, "hamming_distance_countfunc": [2, 17], "allow": [2, 3, 4, 7, 14, 17], "ham": [2, 15, 16, 17], "score": [2, 3, 7, 15, 16], "compact_genome_hamming_distance_countfunc": 2, "leaf_ambiguous_hamming_distance_countfunc": 2, "charact": [2, 14, 15], "node_countfunc": [2, 17], "count": [2, 3, 6, 7, 14, 16, 17], "make_rfdistance_countfunc": [2, 3, 7, 17], "robinson": [2, 3, 7, 17], "fould": [2, 3, 7, 17], "distanc": [2, 3, 7, 15, 17], "make_newickcountfunc": [2, 3, 7, 17], "conveni": [2, 3, 4, 7, 17], "wrap": [2, 17], "to_newick": [2, 3, 7, 17], "like": [2, 3, 5, 6, 7, 14, 17], "choic": [2, 3, 5, 7, 14], "specifi": [2, 3, 4, 7, 14, 15, 17], "whether": [2, 3, 4, 5, 7, 14, 17], "minim": [2, 3, 5, 7], "maxim": [2, 3, 7, 15], "unpack": 2, "min_nod": 2, "print": [2, 3, 4, 5, 7, 14, 16, 17], "min_parsimoni": 2, "filter": 2, "syntax": 2, "filtered_dag": 2, "primari": 2, "advantag": 2, "plain": [2, 17], "compos": 2, "simultan": 2, "tupl": [2, 3, 4, 5, 7, 14, 17], "fashion": 2, "73": 2, "320": 2, "74": 2, "5": 2, "112": 2, "61": 2, "lexicograph": 2, "order": [2, 3, 5, 7, 15, 17], "note": [2, 3, 7, 14, 17], "nest": [2, 14], "avoid": 2, "kwarg": [2, 3, 7, 11, 14, 15, 17], "hammingparsimoni": 2, "similari": 2, "sequenti": 2, "max_node_count": 2, "my_filt": 2, "faster": [2, 3, 7], "thing": 2, "without": [2, 3, 7, 14, 17], "modifi": [2, 3, 7], "describ": [2, 3, 5, 7, 14], "et": [2, 3, 4, 7, 15], "relev": 2, "to_et": [2, 3, 4, 7], "name_func": [2, 3, 4, 7, 17], "transfer": 2, "feature_func": [2, 3, 4, 7, 17], "easili": 2, "visual": 2, "to_graphviz": [2, 3, 7], "recurs": [2, 3, 4, 7, 14], "consist": [2, 3, 7, 14], "face": 2, "point": [2, 3, 7, 14, 17], "expos": [2, 3, 7], "work": [2, 3, 4, 7, 14, 17], "directori": 2, "100": 2, "1041": 2, "count_topologi": [2, 3, 7], "389": 2, "ignor": [2, 3, 7, 15, 17], "75": 2, "hamming_parsimony_count": [2, 3, 7, 14, 16], "If": [2, 3, 4, 5, 7, 14, 15, 17], "found": 2, "program": [2, 3, 7], "dnapar": 2, "infer": [2, 3, 7, 14], "ancestr": [2, 3, 7], "code": [2, 15], "expand_func": [2, 3, 7, 14], "sequence_resolut": 2, "case": [2, 3, 7, 17], "find": [2, 3, 7], "even": [2, 3, 7, 14], "compat": [2, 3, 5, 7], "1048": 2, "3431531": 2, "longer": [2, 3, 7], "79": 2, "688307": 2, "78": 2, "656079": 2, "80": 2, "586769": 2, "77": 2, "476362": 2, "81": 2, "400509": 2, "76": 2, "220205": 2, "82": 2, "218542": 2, "83": 2, "96485": 2, "45983": 2, "84": 2, "32848": 2, "85": 2, "8070": 2, "86": 2, "1324": 2, "87": 2, "48": 2, "d": [2, 3, 7], "individu": [2, 3, 5, 7], "1208": 2, "1054": 2, "flexibl": 2, "how": [2, 3, 4, 5, 7, 14, 17], "calcul": [2, 3, 7, 17], "up": 2, "necessari": [2, 14], "custom": [2, 14], "jointli": [2, 17], "time": 2, "50": 2, "444": 2, "51": 2, "328": 2, "49": 2, "270": 2, "52": 2, "94": 2, "68": 2, "53": 2, "4": 2, "make": [2, 3, 4, 7, 9, 17], "further": 2, "render": [2, 3, 4, 7], "t": [2, 3, 5, 7, 14, 15, 17], "full": [2, 3, 5, 7, 16], "control": 2, "retriev": 2, "anoth": [2, 3, 7, 10], "fetch": 2, "match": [2, 3, 5, 7, 15, 17], "scrambled_tre": 2, "newdag": 2, "3": 2, "dagroot": [3, 7, 14, 16], "sourc": [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], "wrapper": [3, 7, 17], "paramet": [3, 4, 5, 7, 9, 10, 14, 15, 17], "dict": [3, 5, 7, 14, 15], "overrid": [3, 7], "__init__": [3, 4, 5, 7, 17], "defin": [3, 7, 14, 17], "_required_label_field": [3, 7], "variabl": [3, 7], "entri": [3, 7], "shall": [3, 7], "required_field": [3, 7], "from_field": [3, 7], "conversion_func": [3, 7], "convers": [3, 7], "Be": [3, 7], "sure": [3, 4, 7], "avail": [3, 7], "docstr": [3, 7, 15], "classmethod": [3, 7], "label_field": [3, 7], "none": [3, 4, 5, 7, 8, 14, 15, 17], "No": [3, 7], "perform": [3, 7, 15], "option": [3, 4, 5, 7, 15, 17], "str": [3, 4, 5, 7, 9, 10, 14, 17], "static": [3, 7], "wa": [3, 4, 7, 15], "to_cl": [3, 7], "about": [3, 7, 14, 16], "except": [3, 7, 14, 17], "miss": [3, 7], "omit": [3, 7], "befor": [3, 7, 17], "otherwis": [3, 5, 7, 14, 15, 17], "get_label_typ": [3, 7], "trim_below_weight": [3, 7], "max_weight": [3, 7], "min_possible_weight": [3, 7], "inf": [3, 7], "within": [3, 7], "weight": [3, 4, 5, 7, 10, 14, 15, 17], "total": [3, 7, 14], "oper": [3, 7, 17], "properli": [3, 7], "subtract": [3, 7], "That": [3, 7], "b": [3, 7, 17], "c": [3, 7, 17], "neg": [3, 7, 14], "subgraph": [3, 7], "doe": [3, 4, 6, 7, 15, 17], "necessarili": [3, 7], "slightli": [3, 7], "possibli": [3, 5, 7, 17], "memori": [3, 7], "intens": [3, 7], "get_tre": [3, 7], "deprec": [3, 4, 7, 11, 14], "get_leav": [3, 7, 10], "get_edg": [3, 7], "skip_ua_nod": [3, 7], "fals": [3, 4, 5, 7, 14, 15, 17], "preorder": [3, 7], "get_annotated_edg": [3, 7], "downward": [3, 7, 17], "condit": [3, 7, 17], "num_edg": [3, 7], "descend": [3, 4, 7, 14, 17], "unless": [3, 5, 7, 14], "int": [3, 7, 14, 17], "num_nod": [3, 7], "num_leav": [3, 7], "find_nod": [3, 7], "filter_func": [3, 7], "non": [3, 7, 14, 15, 17], "evalu": [3, 7], "first": [3, 4, 5, 7, 14, 17], "sampl": [3, 7, 17], "edge_selector": [3, 7], "log_prob": [3, 7, 14], "reproduc": [3, 7], "random": [3, 5, 7, 14, 15], "seed": [3, 7], "selection_func": [3, 7], "chosen": [3, 7], "nodes_above_nod": [3, 7], "along": [3, 7], "sample_with_nod": [3, 7], "unbias": [3, 7], "test": [3, 7, 14], "sample_with_edg": [3, 7], "iter_covering_histori": [3, 7], "cover_edg": [3, 7, 15], "fewest": [3, 7], "therefor": [3, 7], "determinist": [3, 7, 15], "relabel": [3, 7, 15], "relabel_func": [3, 7], "relax_typ": [3, 7], "callabl": [3, 4, 7, 9, 10, 17], "ualabel": [3, 4, 7, 14, 17], "_field": [3, 7], "warn": [3, 5, 7], "silent": [3, 4, 7, 17], "invalid": [3, 7], "self": [3, 4, 7, 14], "abstract": [3, 7], "add_label_field": [3, 7], "new_field_nam": [3, 7], "new_field_valu": [3, 7], "extend": [3, 4, 7, 9], "remove_label_field": [3, 7], "fields_to_remov": [3, 7], "drop": [3, 7], "remov": [3, 4, 5, 7, 15], "update_label_field": [3, 7], "field_nam": [3, 7], "content": [3, 6, 7, 17], "bool": [3, 4, 5, 7, 17], "is_clade_tre": [3, 7], "bytestr": [3, 7], "serial": [3, 7, 14], "rtype": [3, 7], "reference_dag": [3, 7, 17], "intersect": [3, 7, 17], "compar": [3, 7, 14], "shared_history_count": [3, 7], "share": [3, 7], "add_all_allowed_edg": [3, 7], "arg": [3, 7, 11, 14, 15, 17], "synonym": [3, 7, 15], "new_from_root": [3, 7], "adjacent_label": [3, 7], "preserve_parent_label": [3, 7], "constrain": [3, 7], "maintain": [3, 7], "collaps": [3, 7, 17], "state": [3, 7, 15, 17], "ensur": [3, 7, 14], "among": [3, 7], "newick": [3, 4, 7, 9, 13, 15, 17], "extract": [3, 7], "represent": [3, 4, 7, 9, 14], "popul": [3, 4, 7, 10], "standard": [3, 7, 9, 17], "ete3": [3, 4, 7, 9, 10, 15, 17], "to_ascii": [3, 4, 7], "ascii": [3, 4, 7, 14], "draw": [3, 4, 7], "tool": [3, 4, 7], "treenod": [3, 4, 7, 9, 10, 15, 17], "labelfunc": [3, 7], "namedict": [3, 7], "show_child_clad": [3, 7], "show_partit": [3, 7], "level_leav": [3, 7], "graph_attr": [3, 7], "node_attr": [3, 7], "edge_attr": [3, 7], "edge_attr_inherit": [3, 7], "show_edge_prob": [3, 7], "show_edge_weight": [3, 7], "graphviz": [3, 7], "dot": [3, 7], "digraph": [3, 7], "hash": [3, 7], "too": [3, 7], "larg": [3, 7], "instead": [3, 5, 7, 14, 17], "output": [3, 7, 14, 15], "alia": [3, 7], "wherev": [3, 7], "fall": [3, 7], "natur": [3, 7, 17], "doc": [3, 7, 9, 15], "inherit": [3, 7], "show": [3, 4, 7], "org": [3, 7], "info": [3, 7, 14, 16], "html": [3, 7], "entir": [3, 7], "under": [3, 7], "gv_attr": [3, 7], "color": [3, 7], "internal_avg_par": [3, 7], "averag": [3, 7], "measur": [3, 7], "keep": [3, 7, 17], "mind": [3, 7], "would": [3, 5, 7, 14, 17], "consid": [3, 7, 17], "unalik": [3, 7], "float": [3, 7, 14, 17], "parsimony_util": [3, 7, 14, 15, 17], "default_nt_transit": [3, 5, 7, 14, 15], "ambiguity_map": [3, 7, 14], "get_sequence_resolution_func": [3, 7], "expand_node_func": [3, 7], "expandable_func": [3, 7], "explod": [3, 7, 14, 15, 17], "iter": [3, 7, 10, 14, 15, 17], "disambigu": [3, 7, 14, 15], "explode_label": [3, 7, 17], "easi": [3, 7], "write": [3, 7, 14, 17], "item": [3, 7, 14, 17], "leaf_path_uncertainty_dag": [3, 7], "terminal_nod": [3, 7], "node_data_func": [3, 7], "path": [3, 7], "lead": [3, 7], "end": [3, 7], "valid": [3, 7], "child_dictionari": [3, 7], "leaf_path_uncertainty_graphviz": [3, 7], "node_label_func": [3, 7], "displai": [3, 7], "summari": [3, 7, 14, 16], "label_uncertainty_summari": [3, 7], "postorder_history_accum": [3, 7, 15], "leaf_func": [3, 7], "edge_func": [3, 7, 14], "accum_within_clad": [3, 7], "accum_between_clad": [3, 7], "accum_above_edg": [3, 7], "compute_edge_prob": [3, 7], "normalize_edgeweight": [3, 7], "templat": [3, 7, 14], "dynam": [3, 7], "intermedi": [3, 7], "_dp_data": [3, 7], "whatev": [3, 7], "you": [3, 7, 14], "subtre": [3, 7, 14, 15], "part": [3, 4, 7, 17], "proport": [3, 7], "aggreg": [3, 7], "postorder_cladetree_accum": [3, 7], "base": [3, 5, 7, 14, 15], "count_optimal_histori": [3, 7], "eq_func": [3, 7, 17], "param": [3, 7], "intstat": [3, 7, 17], "side": [3, 7, 17], "effect": [3, 7], "sum_weight": [3, 7], "over": [3, 7, 17], "hashabl": [3, 7, 14], "_default_arg": [3, 7], "weight_range_annot": [3, 7], "min_func": [3, 7], "built": [3, 7, 17], "max_func": [3, 7], "edge__weight_func": [3, 7], "favor": [3, 7], "collapse_leav": [3, 7, 17], "give": [3, 7, 17], "account": [3, 7], "prohibit": [3, 7], "slow": [3, 7], "count_topologies_fast": [3, 7], "assum": [3, 5, 7, 15], "count_tre": [3, 7], "expand_count_func": [3, 7], "l": [3, 7, 17], "bifurc": [3, 7, 17], "underneath": [3, 7], "underestim": [3, 7], "resolut": [3, 5, 7, 17], "multifurc": [3, 7, 17], "complet": [3, 7, 14, 15], "being": [3, 7], "count_labeled_binary_topologi": [3, 7, 17], "preorder_history_accum": [3, 7], "ua_start_v": [3, 7], "One": [3, 7, 17], "upward": [3, 7, 15], "count_nod": [3, 7], "uniform_distribution_annot": [3, 7], "node_prob": [3, 7, 14], "flag": [3, 5, 7], "treat": [3, 7, 15], "Then": [3, 7], "split": [3, 7, 17], "doubl": [3, 7], "count_edg": [3, 7], "most_supported_tre": [3, 7], "highest": [3, 7], "count_paths_to_leaf": [3, 7], "leaf_label": [3, 7], "interest": [3, 7], "weight_counts_with_ambigu": [3, 7, 14], "analog": [3, 7, 14], "correctli": [3, 7, 14], "handl": [3, 7, 14], "greater": [3, 7, 14], "come": [3, 7, 14], "underestimate_rf_diamet": [3, 7], "rf": [3, 7, 17], "diamet": [3, 7], "estim": [3, 7], "topolog": [3, 7], "outlier": [3, 7], "On": [3, 7, 14], "2000": [3, 7], "less": [3, 7], "quit": [3, 7], "accur": [3, 7], "actual": [3, 7], "overestimate_rf_diamet": [3, 7], "overestim": [3, 7], "twice": [3, 7, 17], "median": [3, 7], "close": [3, 7], "never": [3, 7], "optimal_sum_rf_dist": [3, 7], "one_sid": [3, 7, 17], "one_sided_coeffici": [3, 7, 17], "taxa": [3, 7, 17], "expens": [3, 7], "better": [3, 7], "meth": [3, 7, 15], "trim_optimal_sum_rf_dist": [3, 7], "sum_rfdistance_func": [3, 7, 17], "trim_optimal_rf_dist": [3, 7], "optimal_rf_dist": [3, 7], "count_rf_dist": [3, 7], "count_sum_rf_dist": [3, 7], "sum_rf_dist": [3, 7], "pairwis": [3, 7], "especi": [3, 7, 17], "might": [3, 7, 17], "coeffici": [3, 7, 17], "symmetr": [3, 7, 17], "sum_": [3, 7], "nonempti": [3, 7], "average_pairwise_rf_dist": [3, 7], "non_ident": [3, 7], "divisor": [3, 7], "normal": [3, 7, 17], "constant": [3, 7, 17], "product": [3, 6, 7, 17], "depend": [3, 7], "reliabl": [3, 7], "particular": [3, 7], "recommend": [3, 7], "precursor": [3, 7], "choos": [3, 7, 17], "numpi": [3, 7], "help": [3, 7], "get_topologi": [3, 7], "pseudo": [3, 7], "trim_topologi": [3, 7], "internal_label": [3, 7, 17], "collapsed_leav": [3, 7], "desir": [3, 5, 7], "export_edge_prob": [3, 7], "get_probability_countfunc": [3, 7], "edge_prob": [3, 7], "produc": [3, 7, 17], "addfuncdict": [3, 7, 15, 17], "g": [3, 5, 7, 17], "probability_annot": [3, 7], "interpret": [3, 5, 7], "log": [3, 7], "sum_prob": [3, 7], "immedi": [3, 7], "aggregate_func": [3, 7], "ua_node_v": [3, 7, 14], "collapse_kei": [3, 7], "adjust_func": [3, 7, 14], "correct": [3, 7], "observ": [3, 7, 17], "clade_union": [3, 4, 7], "factor": [3, 7], "adjust": [3, 5, 7, 14], "confid": [3, 7], "contribut": [3, 7, 17], "induc": [3, 7, 17], "suppli": [3, 7], "futur": [3, 7], "un": [3, 7], "natural_distribution_annot": [3, 7], "recompute_par": [3, 7], "repopul": [3, 7], "rebuild": [3, 7], "add_node_at_all_possible_plac": [3, 7], "new_leaf_id": [3, 7], "id_nam": [3, 7], "insert": [3, 7, 14], "everi": [3, 7], "insert_nod": [3, 7], "transitionmodel": [3, 7, 14, 15], "weighted_hamming_edge_weight": [3, 7], "local": [3, 7], "edge_weight": [3, 7], "dagnod": [3, 7], "realiz": [3, 7], "overal": [3, 7], "look": [3, 7], "incompat": [3, 7], "postorder_abov": [3, 7], "postord": [3, 7, 15], "travers": [3, 7, 15], "revers": [3, 5, 7], "With": [3, 7], "toward": [3, 7], "visit": [3, 7], "recomput": [3, 7, 15], "repeat": [3, 7, 15], "much": [3, 7, 17], "lie": [3, 7], "node_as_leaf": [3, 7], "include_root": [3, 7], "skip_root": [3, 7], "care": [3, 7], "need": [3, 7], "skip": [3, 7, 14, 15], "backward": [3, 7], "frozenset": 4, "edgeset": 4, "empty_copi": 4, "node_self": 4, "under_clad": 4, "is_leaf": 4, "is_ua_nod": [4, 17], "is_root": 4, "is_history_root": 4, "child_clad": 4, "uanod": [4, 17], "partit": 4, "sorted_child_clad": 4, "sort": [4, 5, 6, 14], "sorted_partit": 4, "add_edg": 4, "prob": 4, "prob_norm": 4, "remove_nod": 4, "nodedict": 4, "orphan": 4, "still": 4, "show_intern": 4, "compact": [4, 5, 14], "sort_method": 4, "identifi": [4, 14, 15], "either": 4, "ladder": 4, "alphabet": 4, "directli": [4, 5], "whitespac": [4, 14], "newlin": [4, 14], "tab": 4, "sort_func": 4, "seq": 4, "subhistori": 4, "indic": [5, 14, 15], "get_sit": 5, "site": [5, 14, 15, 17], "mutations_as_str": 5, "mutstr": 5, "appli": [5, 15], "a110g": 5, "genom": [5, 14], "old": 5, "110": 5, "doesn": 5, "apply_muts_raw": 5, "mut": 5, "from_bas": 5, "to_bas": 5, "apply_mut": 5, "debug": 5, "against": 5, "current": 5, "to_sequ": 5, "mask_sit": 5, "one_bas": 5, "unchang": [5, 15], "mask": 5, "superset_sit": 5, "new_refer": 5, "opposit": 5, "subset_sit": 5, "variant": [5, 15], "kept": 5, "remove_sit": 5, "unpack_mut_str": 5, "compact_genome_from_sequ": 5, "cg_diff": 5, "parent_cg": 5, "child_cg": 5, "parent_nuc": 5, "child_nuc": 5, "sequence_index": 5, "ambiguous_cg_diff": 5, "transition_model": [5, 14, 15], "reconcile_cg": 5, "cg_list": 5, "check_refer": 5, "ambiguitymap": [5, 14], "standard_nt_ambiguity_map": [5, 14], "cg": 5, "read_align": [5, 14], "alignment_fil": 5, "reference_sequ": [5, 15], "read": [5, 14, 17], "fasta": [5, 15, 17], "vcf": 5, "align": [5, 14, 15, 17], "id": [5, 14, 15, 17], "extens": 5, "fa": 5, "explicitli": 5, "manipul": [6, 14], "counter_prod": 6, "counterlist": 6, "accumfunc": 6, "multipli": [6, 17], "realli": 6, "cartesian": [6, 17], "act": 6, "counter_sum": 6, "counter_typ": 6, "concaten": 6, "newclass": 7, "treeroot": [7, 10], "label_featur": [7, 9, 10, 13], "suitabl": [7, 10], "load": [7, 10, 14, 15, 17], "getattr": [7, 10], "preced": [7, 10], "intend": [7, 10], "overwritten": [7, 10], "ascii_compare_histori": 7, "history1": 7, "history2": 7, "name_func2": 7, "art": 7, "Will": 7, "newick_format": [7, 9, 13], "newicklist": [7, 13], "history_dag_from_clade_tre": 7, "history_dag_from_nod": 7, "refseq": 14, "hdagjsonencod": 14, "skipkei": 14, "ensure_ascii": 14, "check_circular": 14, "allow_nan": 14, "sort_kei": 14, "indent": 14, "separ": [14, 17], "constructor": [14, 16, 17], "jsonencod": 14, "sensibl": 14, "typeerror": 14, "encod": 14, "incom": 14, "escap": 14, "circular": 14, "dure": 14, "prevent": 14, "infinit": 14, "caus": 14, "recursionerror": 14, "nan": 14, "infin": 14, "behavior": [14, 17], "json": 14, "compliant": 14, "javascript": 14, "decod": 14, "valueerror": 14, "regress": 14, "dai": 14, "basi": 14, "arrai": 14, "element": [14, 17], "member": 14, "pretti": [14, 17], "item_separ": 14, "key_separ": 14, "elimin": [14, 15], "version": 14, "obj": 14, "serializ": 14, "o": 14, "could": 14, "def": 14, "try": 14, "els": [14, 15, 17], "nodeidhistorydag": 14, "node_id": 14, "hold": [14, 16], "from_dag": [14, 16], "madag": 14, "hamming_parsim": 14, "ony_count": 14, "to_protobuf": 14, "leaf_data_func": 14, "randomize_leaf_mut": 14, "mad": 14, "node_nam": 14, "condensed_leav": 14, "append": 14, "pendant": 14, "decid": 14, "reassign": 14, "to_protobuf_fil": 14, "filenam": [14, 15], "flatten": 14, "sort_compact_genom": 14, "four": 14, "impli": 14, "compact_genome_list": 14, "seq_idx": 14, "old_bas": 14, "new_bas": 14, "node_list": [14, 15], "label_idx": 14, "clade_list": 14, "edge_list": 14, "tripl": 14, "parent_idx": 14, "child_idx": 14, "clade_idx": 14, "test_equ": 14, "get_reference_sequ": 14, "to_json": 14, "to_json_fil": 14, "adjusted_node_prob": 14, "frequenc": 14, "ambiguousleafcghistorydag": 14, "load_json_fil": 14, "unflatten": 14, "flat_dag": 14, "load_mad_protobuf": 14, "pbdata": 14, "leaf_cg": 14, "cgleafidhistorydag": 14, "contradict": 14, "conflict": 14, "load_mad_protobuf_fil": 14, "sankoff": 15, "algorithm": 15, "replace_label_attr": 15, "original_label": 15, "list_of_replac": 15, "_replac": 15, "datatyp": 15, "replac": 15, "onc": 15, "caveat": 15, "make_weighted_hamming_count_func": 15, "allow_ambiguous_leav": 15, "sequence_label": 15, "sankoff_postorder_iter_accum": 15, "postorder_it": 15, "node_clade_funct": 15, "child_node_funct": 15, "re": 15, "alter": 15, "simplifi": 15, "combin": [15, 17], "sankoff_upward": 15, "seq_len": 15, "sequence_attr_nam": 15, "use_internal_node_sequ": 15, "cost": 15, "vector": 15, "best": 15, "subset": 15, "remain": 15, "fact": 15, "equip": 15, "transit": 15, "sankoff_downward": 15, "skip_ua_children": 15, "partial_node_list": 15, "compute_cv": 15, "updat": 15, "post": 15, "run": 15, "random_st": 15, "remove_cv": 15, "adj_dist": 15, "min_ambigu": 15, "randomli": 15, "resolv": 15, "consecut": 15, "getstat": 15, "dist": 15, "reconstruct": 15, "paper": 15, "known": 15, "strictli": 15, "build_tre": 15, "newickstr": [15, 17], "fasta_map": 15, "newickformat": 15, "reference_id": 15, "ignore_internal_sequ": 15, "aren": 15, "fulli": 15, "fix": [15, 17], "build_trees_from_fil": 15, "newickfil": 15, "fastafil": 15, "parsimony_scor": 15, "remove_invariant_sit": 15, "invari": 15, "parsimony_scores_from_topologi": 15, "gap_as_char": 15, "remove_invari": 15, "load_fasta": [15, 17], "gap": 15, "fifth": 15, "parsimony_scores_from_fil": 15, "treefil": 15, "build_dag_from_tre": 15, "unifurc": 15, "delet": 15, "disambiguate_histori": 15, "ugli": 15, "back": 15, "treewise_sankoff_in_dag": 15, "wise": [15, 17], "taxaerror": 17, "access_nodefield_default": 17, "fieldnam": 17, "decor": 17, "posit": 17, "func": 17, "access_field": 17, "someth": 17, "l1": 17, "l2": 17, "arbitrarili": 17, "typevar": 17, "f": 17, "bound": 17, "ignore_uanod": 17, "zero": 17, "labelfield": 17, "easier": 17, "whole": 17, "cartesian_product": 17, "optionlist": 17, "accum": 17, "fresh": 17, "hist": 17, "is_collaps": 17, "collapse_adjacent_sequ": 17, "nonleaf": 17, "initialdata": 17, "primarili": 17, "becaus": 17, "linear_combin": 17, "coeff": 17, "significant_digit": 17, "linear": 17, "usabl": 17, "undefin": 17, "combat": 17, "digit": 17, "decim": 17, "signific": 17, "comparison": 17, "historydagfilt": 17, "weight_func": 17, "ordering_nam": 17, "eq": 17, "natural_edge_prob": 17, "log_natural_probability_func": 17, "explain": 17, "noth": 17, "implicitli": 17, "d_": 17, "unroot": 17, "shift": 17, "k": 17, "ref_tre": 17, "robinson_fould": 17, "cardin": 17, "our": 17, "reli": 17, "long": 17, "biject": 17, "independ": 17, "accommod": 17, "track": 17, "framework": 17, "regardless": 17, "sign": 17, "edge_difference_func": 17, "prod": 17, "logsumexp": 17, "numer": 17, "stabl": 17, "scipi": 17, "mutabl": 17, "indistinguish": 17, "floatstat": 17, "decimalst": 17, "strstate": 17, "binari": 17, "branch": 17, "rank": 17, "read_fasta": 17, "fastapath": 17, "sequence_typ": 17}, "objects": {"historydag": [[3, 0, 1, "", "HistoryDag"], [4, 0, 1, "", "HistoryDagNode"], [5, 2, 0, "-", "compact_genome"], [6, 2, 0, "-", "counterops"], [7, 2, 0, "-", "dag"], [8, 3, 1, "", "empty_node"], [9, 3, 1, "", "from_newick"], [10, 3, 1, "", "from_tree"], [11, 3, 1, "", "history_dag_from_etes"], [12, 3, 1, "", "history_dag_from_histories"], [13, 3, 1, "", "history_dag_from_newicks"], [14, 2, 0, "-", "mutation_annotated_dag"], [15, 2, 0, "-", "parsimony"], [16, 2, 0, "-", "sequence_dag"], [17, 2, 0, "-", "utils"]], "historydag.HistoryDag": [[3, 1, 1, "id0", "__init__"], [3, 1, 1, "", "add_all_allowed_edges"], [3, 1, 1, "", "add_label_fields"], [3, 1, 1, "", "add_node_at_all_possible_places"], [3, 1, 1, "", "average_pairwise_rf_distance"], [3, 1, 1, "", "convert_to_collapsed"], [3, 1, 1, "", "copy"], [3, 1, 1, "", "count_edges"], [3, 1, 1, "", "count_histories"], [3, 1, 1, "", "count_nodes"], [3, 1, 1, "", "count_optimal_histories"], [3, 1, 1, "", "count_paths_to_leaf"], [3, 1, 1, "", "count_rf_distances"], [3, 1, 1, "", "count_sum_rf_distances"], [3, 1, 1, "", "count_topologies"], [3, 1, 1, "", "count_topologies_fast"], [3, 1, 1, "", "count_trees"], [3, 1, 1, "", "explode_nodes"], [3, 1, 1, "", "export_edge_probabilities"], [3, 1, 1, "", "find_node"], [3, 1, 1, "", "find_nodes"], [3, 1, 1, "", "from_history_dag"], [3, 1, 1, "", "get_annotated_edges"], [3, 1, 1, "", "get_edges"], [3, 1, 1, "", "get_histories"], [3, 1, 1, "", "get_label_type"], [3, 1, 1, "", "get_leaves"], [3, 1, 1, "", "get_probability_countfuncs"], [3, 1, 1, "", "get_topologies"], [3, 1, 1, "", "get_trees"], [3, 1, 1, "", "hamming_parsimony_count"], [3, 1, 1, "", "history_intersect"], [3, 1, 1, "", "insert_node"], [3, 1, 1, "", "internal_avg_parents"], [3, 1, 1, "", "is_clade_tree"], [3, 1, 1, "", "is_history"], [3, 1, 1, "", "iter_covering_histories"], [3, 1, 1, "", "label_uncertainty_summary"], [3, 1, 1, "", "leaf_path_uncertainty_dag"], [3, 1, 1, "", "leaf_path_uncertainty_graphviz"], [3, 1, 1, "", "make_complete"], [3, 1, 1, "", "make_uniform"], [3, 1, 1, "", "merge"], [3, 1, 1, "", "most_supported_trees"], [3, 1, 1, "", "natural_distribution_annotate"], [3, 1, 1, "", "node_probabilities"], [3, 1, 1, "", "nodes_above_node"], [3, 1, 1, "", "num_edges"], [3, 1, 1, "", "num_leaves"], [3, 1, 1, "", "num_nodes"], [3, 1, 1, "", "optimal_rf_distance"], [3, 1, 1, "", "optimal_sum_rf_distance"], [3, 1, 1, "", "optimal_weight_annotate"], [3, 1, 1, "", "overestimate_rf_diameter"], [3, 1, 1, "", "postorder"], [3, 1, 1, "", "postorder_above"], [3, 1, 1, "", "postorder_cladetree_accum"], [3, 1, 1, "", "postorder_history_accum"], [3, 1, 1, "", "preorder"], [3, 1, 1, "", "preorder_history_accum"], [3, 1, 1, "", "probability_annotate"], [3, 1, 1, "", "recompute_parents"], [3, 1, 1, "", "relabel"], [3, 1, 1, "", "remove_label_fields"], [3, 1, 1, "", "sample"], [3, 1, 1, "", "sample_with_edge"], [3, 1, 1, "", "sample_with_node"], [3, 1, 1, "", "shared_history_count"], [3, 1, 1, "", "sum_probability"], [3, 1, 1, "", "sum_rf_distances"], [3, 1, 1, "", "sum_weights"], [3, 1, 1, "", "summary"], [3, 1, 1, "", "to_ascii"], [3, 1, 1, "", "to_ete"], [3, 1, 1, "", "to_graphviz"], [3, 1, 1, "", "to_newick"], [3, 1, 1, "", "to_newicks"], [3, 1, 1, "", "trim_below_weight"], [3, 1, 1, "", "trim_optimal_rf_distance"], [3, 1, 1, "", "trim_optimal_sum_rf_distance"], [3, 1, 1, "", "trim_optimal_weight"], [3, 1, 1, "", "trim_topology"], [3, 1, 1, "", "underestimate_rf_diameter"], [3, 1, 1, "", "uniform_distribution_annotate"], [3, 1, 1, "", "unlabel"], [3, 1, 1, "", "update_label_fields"], [3, 1, 1, "", "weight_count"], [3, 1, 1, "", "weight_counts_with_ambiguities"], [3, 1, 1, "", "weight_range_annotate"]], "historydag.HistoryDagNode": [[4, 1, 1, "id0", "__init__"], [4, 1, 1, "", "add_edge"], [4, 1, 1, "", "child_clades"], [4, 1, 1, "", "children"], [4, 1, 1, "", "clade_union"], [4, 1, 1, "", "empty_copy"], [4, 1, 1, "", "is_history_root"], [4, 1, 1, "", "is_leaf"], [4, 1, 1, "", "is_root"], [4, 1, 1, "", "is_ua_node"], [4, 1, 1, "", "node_self"], [4, 1, 1, "", "partitions"], [4, 1, 1, "", "remove_node"], [4, 1, 1, "", "sorted_child_clades"], [4, 1, 1, "", "sorted_partitions"], [4, 1, 1, "", "to_ascii"], [4, 1, 1, "", "to_ete"], [4, 1, 1, "", "under_clade"]], "historydag.compact_genome": [[5, 0, 1, "", "CompactGenome"], [5, 3, 1, "", "ambiguous_cg_diff"], [5, 3, 1, "", "cg_diff"], [5, 3, 1, "", "compact_genome_from_sequence"], [5, 3, 1, "", "read_alignment"], [5, 3, 1, "", "reconcile_cgs"], [5, 3, 1, "", "unpack_mut_string"]], "historydag.compact_genome.CompactGenome": [[5, 1, 1, "", "__init__"], [5, 1, 1, "", "apply_muts"], [5, 1, 1, "", "apply_muts_raw"], [5, 1, 1, "", "get_site"], [5, 1, 1, "", "mask_sites"], [5, 1, 1, "", "mutate"], [5, 1, 1, "", "mutations_as_strings"], [5, 1, 1, "", "remove_sites"], [5, 1, 1, "", "subset_sites"], [5, 1, 1, "", "superset_sites"], [5, 1, 1, "", "to_sequence"]], "historydag.counterops": [[6, 3, 1, "", "counter_prod"], [6, 3, 1, "", "counter_sum"]], "historydag.dag": [[7, 0, 1, "", "HistoryDag"], [7, 4, 1, "", "IntersectionError"], [7, 3, 1, "", "ascii_compare_histories"], [7, 3, 1, "", "convert"], [7, 3, 1, "", "from_newick"], [7, 3, 1, "", "from_tree"], [7, 3, 1, "", "history_dag_from_clade_trees"], [7, 3, 1, "", "history_dag_from_etes"], [7, 3, 1, "", "history_dag_from_histories"], [7, 3, 1, "", "history_dag_from_newicks"], [7, 3, 1, "", "history_dag_from_nodes"], [7, 3, 1, "", "history_dag_from_trees"]], "historydag.dag.HistoryDag": [[7, 1, 1, "", "__init__"], [7, 1, 1, "", "add_all_allowed_edges"], [7, 1, 1, "", "add_label_fields"], [7, 1, 1, "", "add_node_at_all_possible_places"], [7, 1, 1, "", "average_pairwise_rf_distance"], [7, 1, 1, "", "convert_to_collapsed"], [7, 1, 1, "", "copy"], [7, 1, 1, "", "count_edges"], [7, 1, 1, "", "count_histories"], [7, 1, 1, "", "count_nodes"], [7, 1, 1, "", "count_optimal_histories"], [7, 1, 1, "", "count_paths_to_leaf"], [7, 1, 1, "", "count_rf_distances"], [7, 1, 1, "", "count_sum_rf_distances"], [7, 1, 1, "", "count_topologies"], [7, 1, 1, "", "count_topologies_fast"], [7, 1, 1, "", "count_trees"], [7, 1, 1, "", "explode_nodes"], [7, 1, 1, "", "export_edge_probabilities"], [7, 1, 1, "", "find_node"], [7, 1, 1, "", "find_nodes"], [7, 1, 1, "", "from_history_dag"], [7, 1, 1, "", "get_annotated_edges"], [7, 1, 1, "", "get_edges"], [7, 1, 1, "", "get_histories"], [7, 1, 1, "", "get_label_type"], [7, 1, 1, "", "get_leaves"], [7, 1, 1, "", "get_probability_countfuncs"], [7, 1, 1, "", "get_topologies"], [7, 1, 1, "", "get_trees"], [7, 1, 1, "", "hamming_parsimony_count"], [7, 1, 1, "", "history_intersect"], [7, 1, 1, "", "insert_node"], [7, 1, 1, "", "internal_avg_parents"], [7, 1, 1, "", "is_clade_tree"], [7, 1, 1, "", "is_history"], [7, 1, 1, "", "iter_covering_histories"], [7, 1, 1, "", "label_uncertainty_summary"], [7, 1, 1, "", "leaf_path_uncertainty_dag"], [7, 1, 1, "", "leaf_path_uncertainty_graphviz"], [7, 1, 1, "", "make_complete"], [7, 1, 1, "", "make_uniform"], [7, 1, 1, "", "merge"], [7, 1, 1, "", "most_supported_trees"], [7, 1, 1, "", "natural_distribution_annotate"], [7, 1, 1, "", "node_probabilities"], [7, 1, 1, "", "nodes_above_node"], [7, 1, 1, "", "num_edges"], [7, 1, 1, "", "num_leaves"], [7, 1, 1, "", "num_nodes"], [7, 1, 1, "", "optimal_rf_distance"], [7, 1, 1, "", "optimal_sum_rf_distance"], [7, 1, 1, "", "optimal_weight_annotate"], [7, 1, 1, "", "overestimate_rf_diameter"], [7, 1, 1, "", "postorder"], [7, 1, 1, "", "postorder_above"], [7, 1, 1, "", "postorder_cladetree_accum"], [7, 1, 1, "", "postorder_history_accum"], [7, 1, 1, "", "preorder"], [7, 1, 1, "", "preorder_history_accum"], [7, 1, 1, "", "probability_annotate"], [7, 1, 1, "", "recompute_parents"], [7, 1, 1, "", "relabel"], [7, 1, 1, "", "remove_label_fields"], [7, 1, 1, "", "sample"], [7, 1, 1, "", "sample_with_edge"], [7, 1, 1, "", "sample_with_node"], [7, 1, 1, "", "shared_history_count"], [7, 1, 1, "", "sum_probability"], [7, 1, 1, "", "sum_rf_distances"], [7, 1, 1, "", "sum_weights"], [7, 1, 1, "", "summary"], [7, 1, 1, "", "to_ascii"], [7, 1, 1, "", "to_ete"], [7, 1, 1, "", "to_graphviz"], [7, 1, 1, "", "to_newick"], [7, 1, 1, "", "to_newicks"], [7, 1, 1, "", "trim_below_weight"], [7, 1, 1, "", "trim_optimal_rf_distance"], [7, 1, 1, "", "trim_optimal_sum_rf_distance"], [7, 1, 1, "", "trim_optimal_weight"], [7, 1, 1, "", "trim_topology"], [7, 1, 1, "", "underestimate_rf_diameter"], [7, 1, 1, "", "uniform_distribution_annotate"], [7, 1, 1, "", "unlabel"], [7, 1, 1, "", "update_label_fields"], [7, 1, 1, "", "weight_count"], [7, 1, 1, "", "weight_counts_with_ambiguities"], [7, 1, 1, "", "weight_range_annotate"]], "historydag.mutation_annotated_dag": [[14, 0, 1, "", "AmbiguousLeafCGHistoryDag"], [14, 0, 1, "", "CGHistoryDag"], [14, 0, 1, "", "HDagJSONEncoder"], [14, 0, 1, "", "NodeIDHistoryDag"], [14, 3, 1, "", "load_MAD_protobuf"], [14, 3, 1, "", "load_MAD_protobuf_file"], [14, 3, 1, "", "load_json_file"], [14, 3, 1, "", "unflatten"]], "historydag.mutation_annotated_dag.AmbiguousLeafCGHistoryDag": [[14, 1, 1, "", "hamming_parsimony_count"], [14, 1, 1, "", "summary"]], "historydag.mutation_annotated_dag.CGHistoryDag": [[14, 1, 1, "", "adjusted_node_probabilities"], [14, 1, 1, "", "flatten"], [14, 1, 1, "", "get_reference_sequence"], [14, 1, 1, "", "hamming_parsimony_count"], [14, 1, 1, "", "summary"], [14, 1, 1, "", "test_equal"], [14, 1, 1, "", "to_json"], [14, 1, 1, "", "to_json_file"], [14, 1, 1, "", "to_protobuf"], [14, 1, 1, "", "to_protobuf_file"], [14, 1, 1, "", "weight_counts_with_ambiguities"]], "historydag.mutation_annotated_dag.HDagJSONEncoder": [[14, 1, 1, "", "default"]], "historydag.parsimony": [[15, 3, 1, "", "build_dag_from_trees"], [15, 3, 1, "", "build_tree"], [15, 3, 1, "", "build_trees_from_files"], [15, 3, 1, "", "disambiguate"], [15, 3, 1, "", "disambiguate_history"], [15, 3, 1, "", "make_weighted_hamming_count_funcs"], [15, 3, 1, "", "parsimony_score"], [15, 3, 1, "", "parsimony_scores_from_files"], [15, 3, 1, "", "parsimony_scores_from_topologies"], [15, 3, 1, "", "remove_invariant_sites"], [15, 3, 1, "", "replace_label_attr"], [15, 3, 1, "", "sankoff_downward"], [15, 3, 1, "", "sankoff_postorder_iter_accum"], [15, 3, 1, "", "sankoff_upward"], [15, 3, 1, "", "treewise_sankoff_in_dag"]], "historydag.sequence_dag": [[16, 0, 1, "", "AmbiguousLeafSequenceHistoryDag"], [16, 0, 1, "", "SequenceHistoryDag"]], "historydag.sequence_dag.AmbiguousLeafSequenceHistoryDag": [[16, 1, 1, "", "hamming_parsimony_count"], [16, 1, 1, "", "summary"]], "historydag.sequence_dag.SequenceHistoryDag": [[16, 1, 1, "", "hamming_parsimony_count"], [16, 1, 1, "", "summary"]], "historydag.utils": [[17, 0, 1, "", "AddFuncDict"], [17, 0, 1, "", "DecimalState"], [17, 0, 1, "", "FloatState"], [17, 0, 1, "", "HistoryDagFilter"], [17, 0, 1, "", "IntState"], [17, 0, 1, "", "StrState"], [17, 4, 1, "", "TaxaError"], [17, 0, 1, "", "UALabel"], [17, 3, 1, "", "access_field"], [17, 3, 1, "", "access_nodefield_default"], [17, 3, 1, "", "cartesian_product"], [17, 3, 1, "", "collapse_adjacent_sequences"], [17, 3, 1, "", "count_labeled_binary_topologies"], [17, 3, 1, "", "edge_difference_funcs"], [17, 3, 1, "", "explode_label"], [17, 3, 1, "", "hist"], [17, 3, 1, "", "ignore_uanode"], [17, 3, 1, "", "is_collapsed"], [17, 3, 1, "", "load_fasta"], [17, 5, 1, "", "log_natural_probability_funcs"], [17, 3, 1, "", "logsumexp"], [17, 3, 1, "", "make_newickcountfuncs"], [17, 3, 1, "", "make_rfdistance_countfuncs"], [17, 3, 1, "", "natural_edge_probability"], [17, 5, 1, "", "node_countfuncs"], [17, 3, 1, "", "prod"], [17, 3, 1, "", "read_fasta"], [17, 3, 1, "", "sum_rfdistance_funcs"]], "historydag.utils.AddFuncDict": [[17, 1, 1, "", "__init__"], [17, 1, 1, "", "linear_combination"]], "historydag.utils.DecimalState": [[17, 1, 1, "", "__init__"]], "historydag.utils.FloatState": [[17, 1, 1, "", "__init__"]], "historydag.utils.HistoryDagFilter": [[17, 1, 1, "", "__init__"]], "historydag.utils.IntState": [[17, 1, 1, "", "__init__"]], "historydag.utils.StrState": [[17, 1, 1, "", "__init__"]]}, "objtypes": {"0": "py:class", "1": "py:method", "2": "py:module", "3": "py:function", "4": "py:exception", "5": "py:data"}, "objnames": {"0": ["py", "class", "Python class"], "1": ["py", "method", "Python method"], "2": ["py", "module", "Python module"], "3": ["py", "function", "Python function"], "4": ["py", "exception", "Python exception"], "5": ["py", "data", "Python data"]}, "titleterms": {"descript": 0, "class": [0, 2], "function": 0, "modul": 0, "historydag": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], "document": 1, "user": 1, "guid": 1, "api": 1, "indic": 1, "tabl": 1, "quickstart": 2, "The": 2, "data": 2, "structur": 2, "instal": 2, "load": 2, "tree": 2, "non": 2, "ete3": 2, "newick": 2, "basic": 2, "oper": 2, "sampl": 2, "index": 2, "iter": 2, "over": 2, "histori": 2, "merg": 2, "intersect": 2, "complet": 2, "collaps": 2, "relabel": 2, "subtyp": 2, "convers": 2, "defin": 2, "comput": 2, "weight": 2, "addfuncdict": 2, "historydagfilt": 2, "combin": 2, "export": 2, "A": 2, "quick": 2, "tour": 2, "historydagnod": 4, "compact_genom": 5, "counterop": 6, "dag": 7, "empty_nod": 8, "from_newick": 9, "from_tre": 10, "history_dag_from_et": 11, "history_dag_from_histori": 12, "history_dag_from_newick": 13, "mutation_annotated_dag": 14, "parsimoni": 15, "sequence_dag": 16, "util": 17}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx.ext.viewcode": 1, "sphinx.ext.todo": 2, "sphinx": 60}, "alltitles": {"Description": [[0, "description"]], "Classes": [[0, "classes"]], "Functions": [[0, "functions"]], "Modules": [[0, "modules"]], "historydag documentation": [[1, "historydag-documentation"]], "User Guide": [[1, null]], "API Documentation": [[1, null]], "Indices and tables": [[1, "indices-and-tables"]], "Quickstart": [[2, "quickstart"]], "The data structure": [[2, "the-data-structure"]], "Installing": [[2, "installing"]], "Loading Tree Data": [[2, "loading-tree-data"]], "Loading Non-ete3 Tree Data:": [[2, "loading-non-ete3-tree-data"]], "Loading newick tree data:": [[2, "loading-newick-tree-data"]], "Basic HistoryDag operations": [[2, "basic-historydag-operations"]], "Sampling, Indexing, and Iterating Over Histories": [[2, "sampling-indexing-and-iterating-over-histories"]], "Merging": [[2, "merging"]], "Intersecting": [[2, "intersecting"]], "Completion": [[2, "completion"]], "Collapsing": [[2, "collapsing"]], "Relabeling": [[2, "relabeling"]], "HistoryDag Subtypes and Conversions": [[2, "historydag-subtypes-and-conversions"]], "Defining and Computing History Weights": [[2, "defining-and-computing-history-weights"]], "The AddFuncDict Class": [[2, "the-addfuncdict-class"]], "The HistoryDagFilter Class": [[2, "the-historydagfilter-class"]], "Combining Weights": [[2, "combining-weights"]], "Exporting Tree Data": [[2, "exporting-tree-data"]], "A Quick Tour": [[2, "a-quick-tour"]], "historydag.HistoryDag": [[3, "historydag-historydag"]], "historydag.HistoryDagNode": [[4, "historydag-historydagnode"]], "historydag.compact_genome": [[5, "module-historydag.compact_genome"]], "historydag.counterops": [[6, "module-historydag.counterops"]], "historydag.dag": [[7, "module-historydag.dag"]], "historydag.empty_node": [[8, "historydag-empty-node"]], "historydag.from_newick": [[9, "historydag-from-newick"]], "historydag.from_tree": [[10, "historydag-from-tree"]], "historydag.history_dag_from_etes": [[11, "historydag-history-dag-from-etes"]], "historydag.history_dag_from_histories": [[12, "historydag-history-dag-from-histories"]], "historydag.history_dag_from_newicks": [[13, "historydag-history-dag-from-newicks"]], "historydag.mutation_annotated_dag": [[14, "module-historydag.mutation_annotated_dag"]], "historydag.parsimony": [[15, "module-historydag.parsimony"]], "historydag.sequence_dag": [[16, "module-historydag.sequence_dag"]], "historydag.utils": [[17, "module-historydag.utils"]]}, "indexentries": {"historydag (class in historydag)": [[3, "historydag.HistoryDag"]], "__init__() (historydag.historydag method)": [[3, "historydag.HistoryDag.__init__"], [3, "id0"]], "add_all_allowed_edges() (historydag.historydag method)": [[3, "historydag.HistoryDag.add_all_allowed_edges"]], "add_label_fields() (historydag.historydag method)": [[3, "historydag.HistoryDag.add_label_fields"]], "add_node_at_all_possible_places() (historydag.historydag method)": [[3, "historydag.HistoryDag.add_node_at_all_possible_places"]], "average_pairwise_rf_distance() (historydag.historydag method)": [[3, "historydag.HistoryDag.average_pairwise_rf_distance"]], "convert_to_collapsed() (historydag.historydag method)": [[3, "historydag.HistoryDag.convert_to_collapsed"]], "copy() (historydag.historydag method)": [[3, "historydag.HistoryDag.copy"]], "count_edges() (historydag.historydag method)": [[3, "historydag.HistoryDag.count_edges"]], "count_histories() (historydag.historydag method)": [[3, "historydag.HistoryDag.count_histories"]], "count_nodes() (historydag.historydag method)": [[3, "historydag.HistoryDag.count_nodes"]], "count_optimal_histories() (historydag.historydag method)": [[3, "historydag.HistoryDag.count_optimal_histories"]], "count_paths_to_leaf() (historydag.historydag method)": [[3, "historydag.HistoryDag.count_paths_to_leaf"]], "count_rf_distances() (historydag.historydag method)": [[3, "historydag.HistoryDag.count_rf_distances"]], "count_sum_rf_distances() (historydag.historydag method)": [[3, "historydag.HistoryDag.count_sum_rf_distances"]], "count_topologies() (historydag.historydag method)": [[3, "historydag.HistoryDag.count_topologies"]], "count_topologies_fast() (historydag.historydag method)": [[3, "historydag.HistoryDag.count_topologies_fast"]], "count_trees() (historydag.historydag method)": [[3, "historydag.HistoryDag.count_trees"]], "explode_nodes() (historydag.historydag method)": [[3, "historydag.HistoryDag.explode_nodes"]], "export_edge_probabilities() (historydag.historydag method)": [[3, "historydag.HistoryDag.export_edge_probabilities"]], "find_node() (historydag.historydag method)": [[3, "historydag.HistoryDag.find_node"]], "find_nodes() (historydag.historydag method)": [[3, "historydag.HistoryDag.find_nodes"]], "from_history_dag() (historydag.historydag class method)": [[3, "historydag.HistoryDag.from_history_dag"]], "get_annotated_edges() (historydag.historydag method)": [[3, "historydag.HistoryDag.get_annotated_edges"]], "get_edges() (historydag.historydag method)": [[3, "historydag.HistoryDag.get_edges"]], "get_histories() (historydag.historydag method)": [[3, "historydag.HistoryDag.get_histories"]], "get_label_type() (historydag.historydag method)": [[3, "historydag.HistoryDag.get_label_type"]], "get_leaves() (historydag.historydag method)": [[3, "historydag.HistoryDag.get_leaves"]], "get_probability_countfuncs() (historydag.historydag method)": [[3, "historydag.HistoryDag.get_probability_countfuncs"]], "get_topologies() (historydag.historydag method)": [[3, "historydag.HistoryDag.get_topologies"]], "get_trees() (historydag.historydag method)": [[3, "historydag.HistoryDag.get_trees"]], "hamming_parsimony_count() (historydag.historydag method)": [[3, "historydag.HistoryDag.hamming_parsimony_count"]], "history_intersect() (historydag.historydag method)": [[3, "historydag.HistoryDag.history_intersect"]], "insert_node() (historydag.historydag method)": [[3, "historydag.HistoryDag.insert_node"]], "internal_avg_parents() (historydag.historydag method)": [[3, "historydag.HistoryDag.internal_avg_parents"]], "is_clade_tree() (historydag.historydag method)": [[3, "historydag.HistoryDag.is_clade_tree"]], "is_history() (historydag.historydag method)": [[3, "historydag.HistoryDag.is_history"]], "iter_covering_histories() (historydag.historydag method)": [[3, "historydag.HistoryDag.iter_covering_histories"]], "label_uncertainty_summary() (historydag.historydag method)": [[3, "historydag.HistoryDag.label_uncertainty_summary"]], "leaf_path_uncertainty_dag() (historydag.historydag method)": [[3, "historydag.HistoryDag.leaf_path_uncertainty_dag"]], "leaf_path_uncertainty_graphviz() (historydag.historydag method)": [[3, "historydag.HistoryDag.leaf_path_uncertainty_graphviz"]], "make_complete() (historydag.historydag method)": [[3, "historydag.HistoryDag.make_complete"]], "make_uniform() (historydag.historydag method)": [[3, "historydag.HistoryDag.make_uniform"]], "merge() (historydag.historydag method)": [[3, "historydag.HistoryDag.merge"]], "most_supported_trees() (historydag.historydag method)": [[3, "historydag.HistoryDag.most_supported_trees"]], "natural_distribution_annotate() (historydag.historydag method)": [[3, "historydag.HistoryDag.natural_distribution_annotate"]], "node_probabilities() (historydag.historydag method)": [[3, "historydag.HistoryDag.node_probabilities"]], "nodes_above_node() (historydag.historydag method)": [[3, "historydag.HistoryDag.nodes_above_node"]], "num_edges() (historydag.historydag method)": [[3, "historydag.HistoryDag.num_edges"]], "num_leaves() (historydag.historydag method)": [[3, "historydag.HistoryDag.num_leaves"]], "num_nodes() (historydag.historydag method)": [[3, "historydag.HistoryDag.num_nodes"]], "optimal_rf_distance() (historydag.historydag method)": [[3, "historydag.HistoryDag.optimal_rf_distance"]], "optimal_sum_rf_distance() (historydag.historydag method)": [[3, "historydag.HistoryDag.optimal_sum_rf_distance"]], "optimal_weight_annotate() (historydag.historydag method)": [[3, "historydag.HistoryDag.optimal_weight_annotate"]], "overestimate_rf_diameter() (historydag.historydag method)": [[3, "historydag.HistoryDag.overestimate_rf_diameter"]], "postorder() (historydag.historydag method)": [[3, "historydag.HistoryDag.postorder"]], "postorder_above() (historydag.historydag method)": [[3, "historydag.HistoryDag.postorder_above"]], "postorder_cladetree_accum() (historydag.historydag method)": [[3, "historydag.HistoryDag.postorder_cladetree_accum"]], "postorder_history_accum() (historydag.historydag method)": [[3, "historydag.HistoryDag.postorder_history_accum"]], "preorder() (historydag.historydag method)": [[3, "historydag.HistoryDag.preorder"]], "preorder_history_accum() (historydag.historydag method)": [[3, "historydag.HistoryDag.preorder_history_accum"]], "probability_annotate() (historydag.historydag method)": [[3, "historydag.HistoryDag.probability_annotate"]], "recompute_parents() (historydag.historydag method)": [[3, "historydag.HistoryDag.recompute_parents"]], "relabel() (historydag.historydag method)": [[3, "historydag.HistoryDag.relabel"]], "remove_label_fields() (historydag.historydag method)": [[3, "historydag.HistoryDag.remove_label_fields"]], "sample() (historydag.historydag method)": [[3, "historydag.HistoryDag.sample"]], "sample_with_edge() (historydag.historydag method)": [[3, "historydag.HistoryDag.sample_with_edge"]], "sample_with_node() (historydag.historydag method)": [[3, "historydag.HistoryDag.sample_with_node"]], "shared_history_count() (historydag.historydag method)": [[3, "historydag.HistoryDag.shared_history_count"]], "sum_probability() (historydag.historydag method)": [[3, "historydag.HistoryDag.sum_probability"]], "sum_rf_distances() (historydag.historydag method)": [[3, "historydag.HistoryDag.sum_rf_distances"]], "sum_weights() (historydag.historydag method)": [[3, "historydag.HistoryDag.sum_weights"]], "summary() (historydag.historydag method)": [[3, "historydag.HistoryDag.summary"]], "to_ascii() (historydag.historydag method)": [[3, "historydag.HistoryDag.to_ascii"]], "to_ete() (historydag.historydag method)": [[3, "historydag.HistoryDag.to_ete"]], "to_graphviz() (historydag.historydag method)": [[3, "historydag.HistoryDag.to_graphviz"]], "to_newick() (historydag.historydag method)": [[3, "historydag.HistoryDag.to_newick"]], "to_newicks() (historydag.historydag method)": [[3, "historydag.HistoryDag.to_newicks"]], "trim_below_weight() (historydag.historydag method)": [[3, "historydag.HistoryDag.trim_below_weight"]], "trim_optimal_rf_distance() (historydag.historydag method)": [[3, "historydag.HistoryDag.trim_optimal_rf_distance"]], "trim_optimal_sum_rf_distance() (historydag.historydag method)": [[3, "historydag.HistoryDag.trim_optimal_sum_rf_distance"]], "trim_optimal_weight() (historydag.historydag method)": [[3, "historydag.HistoryDag.trim_optimal_weight"]], "trim_topology() (historydag.historydag method)": [[3, "historydag.HistoryDag.trim_topology"]], "underestimate_rf_diameter() (historydag.historydag method)": [[3, "historydag.HistoryDag.underestimate_rf_diameter"]], "uniform_distribution_annotate() (historydag.historydag method)": [[3, "historydag.HistoryDag.uniform_distribution_annotate"]], "unlabel() (historydag.historydag method)": [[3, "historydag.HistoryDag.unlabel"]], "update_label_fields() (historydag.historydag method)": [[3, "historydag.HistoryDag.update_label_fields"]], "weight_count() (historydag.historydag method)": [[3, "historydag.HistoryDag.weight_count"]], "weight_counts_with_ambiguities() (historydag.historydag method)": [[3, "historydag.HistoryDag.weight_counts_with_ambiguities"]], "weight_range_annotate() (historydag.historydag method)": [[3, "historydag.HistoryDag.weight_range_annotate"]], "historydagnode (class in historydag)": [[4, "historydag.HistoryDagNode"]], "__init__() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.__init__"], [4, "id0"]], "add_edge() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.add_edge"]], "child_clades() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.child_clades"]], "children() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.children"]], "clade_union() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.clade_union"]], "empty_copy() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.empty_copy"]], "is_history_root() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.is_history_root"]], "is_leaf() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.is_leaf"]], "is_root() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.is_root"]], "is_ua_node() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.is_ua_node"]], "node_self() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.node_self"]], "partitions() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.partitions"]], "remove_node() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.remove_node"]], "sorted_child_clades() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.sorted_child_clades"]], "sorted_partitions() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.sorted_partitions"]], "to_ascii() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.to_ascii"]], "to_ete() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.to_ete"]], "under_clade() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.under_clade"]], "compactgenome (class in historydag.compact_genome)": [[5, "historydag.compact_genome.CompactGenome"]], "__init__() (historydag.compact_genome.compactgenome method)": [[5, "historydag.compact_genome.CompactGenome.__init__"]], "ambiguous_cg_diff() (in module historydag.compact_genome)": [[5, "historydag.compact_genome.ambiguous_cg_diff"]], "apply_muts() (historydag.compact_genome.compactgenome method)": [[5, "historydag.compact_genome.CompactGenome.apply_muts"]], "apply_muts_raw() (historydag.compact_genome.compactgenome method)": [[5, "historydag.compact_genome.CompactGenome.apply_muts_raw"]], "cg_diff() (in module historydag.compact_genome)": [[5, "historydag.compact_genome.cg_diff"]], "compact_genome_from_sequence() (in module historydag.compact_genome)": [[5, "historydag.compact_genome.compact_genome_from_sequence"]], "get_site() (historydag.compact_genome.compactgenome method)": [[5, "historydag.compact_genome.CompactGenome.get_site"]], "historydag.compact_genome": [[5, "module-historydag.compact_genome"]], "mask_sites() (historydag.compact_genome.compactgenome method)": [[5, "historydag.compact_genome.CompactGenome.mask_sites"]], "module": [[5, "module-historydag.compact_genome"], [6, "module-historydag.counterops"], [7, "module-historydag.dag"], [14, "module-historydag.mutation_annotated_dag"], [15, "module-historydag.parsimony"], [16, "module-historydag.sequence_dag"], [17, "module-historydag.utils"]], "mutate() (historydag.compact_genome.compactgenome method)": [[5, "historydag.compact_genome.CompactGenome.mutate"]], "mutations_as_strings() (historydag.compact_genome.compactgenome method)": [[5, "historydag.compact_genome.CompactGenome.mutations_as_strings"]], "read_alignment() (in module historydag.compact_genome)": [[5, "historydag.compact_genome.read_alignment"]], "reconcile_cgs() (in module historydag.compact_genome)": [[5, "historydag.compact_genome.reconcile_cgs"]], "remove_sites() (historydag.compact_genome.compactgenome method)": [[5, "historydag.compact_genome.CompactGenome.remove_sites"]], "subset_sites() (historydag.compact_genome.compactgenome method)": [[5, "historydag.compact_genome.CompactGenome.subset_sites"]], "superset_sites() (historydag.compact_genome.compactgenome method)": [[5, "historydag.compact_genome.CompactGenome.superset_sites"]], "to_sequence() (historydag.compact_genome.compactgenome method)": [[5, "historydag.compact_genome.CompactGenome.to_sequence"]], "unpack_mut_string() (in module historydag.compact_genome)": [[5, "historydag.compact_genome.unpack_mut_string"]], "counter_prod() (in module historydag.counterops)": [[6, "historydag.counterops.counter_prod"]], "counter_sum() (in module historydag.counterops)": [[6, "historydag.counterops.counter_sum"]], "historydag.counterops": [[6, "module-historydag.counterops"]], "historydag (class in historydag.dag)": [[7, "historydag.dag.HistoryDag"]], "intersectionerror": [[7, "historydag.dag.IntersectionError"]], "__init__() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.__init__"]], "add_all_allowed_edges() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.add_all_allowed_edges"]], "add_label_fields() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.add_label_fields"]], "add_node_at_all_possible_places() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.add_node_at_all_possible_places"]], "ascii_compare_histories() (in module historydag.dag)": [[7, "historydag.dag.ascii_compare_histories"]], "average_pairwise_rf_distance() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.average_pairwise_rf_distance"]], "convert() (in module historydag.dag)": [[7, "historydag.dag.convert"]], "convert_to_collapsed() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.convert_to_collapsed"]], "copy() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.copy"]], "count_edges() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.count_edges"]], "count_histories() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.count_histories"]], "count_nodes() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.count_nodes"]], "count_optimal_histories() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.count_optimal_histories"]], "count_paths_to_leaf() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.count_paths_to_leaf"]], "count_rf_distances() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.count_rf_distances"]], "count_sum_rf_distances() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.count_sum_rf_distances"]], "count_topologies() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.count_topologies"]], "count_topologies_fast() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.count_topologies_fast"]], "count_trees() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.count_trees"]], "explode_nodes() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.explode_nodes"]], "export_edge_probabilities() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.export_edge_probabilities"]], "find_node() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.find_node"]], "find_nodes() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.find_nodes"]], "from_history_dag() (historydag.dag.historydag class method)": [[7, "historydag.dag.HistoryDag.from_history_dag"]], "from_newick() (in module historydag.dag)": [[7, "historydag.dag.from_newick"]], "from_tree() (in module historydag.dag)": [[7, "historydag.dag.from_tree"]], "get_annotated_edges() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.get_annotated_edges"]], "get_edges() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.get_edges"]], "get_histories() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.get_histories"]], "get_label_type() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.get_label_type"]], "get_leaves() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.get_leaves"]], "get_probability_countfuncs() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.get_probability_countfuncs"]], "get_topologies() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.get_topologies"]], "get_trees() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.get_trees"]], "hamming_parsimony_count() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.hamming_parsimony_count"]], "history_dag_from_clade_trees() (in module historydag.dag)": [[7, "historydag.dag.history_dag_from_clade_trees"]], "history_dag_from_etes() (in module historydag.dag)": [[7, "historydag.dag.history_dag_from_etes"]], "history_dag_from_histories() (in module historydag.dag)": [[7, "historydag.dag.history_dag_from_histories"]], "history_dag_from_newicks() (in module historydag.dag)": [[7, "historydag.dag.history_dag_from_newicks"]], "history_dag_from_nodes() (in module historydag.dag)": [[7, "historydag.dag.history_dag_from_nodes"]], "history_dag_from_trees() (in module historydag.dag)": [[7, "historydag.dag.history_dag_from_trees"]], "history_intersect() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.history_intersect"]], "historydag.dag": [[7, "module-historydag.dag"]], "insert_node() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.insert_node"]], "internal_avg_parents() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.internal_avg_parents"]], "is_clade_tree() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.is_clade_tree"]], "is_history() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.is_history"]], "iter_covering_histories() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.iter_covering_histories"]], "label_uncertainty_summary() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.label_uncertainty_summary"]], "leaf_path_uncertainty_dag() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.leaf_path_uncertainty_dag"]], "leaf_path_uncertainty_graphviz() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.leaf_path_uncertainty_graphviz"]], "make_complete() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.make_complete"]], "make_uniform() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.make_uniform"]], "merge() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.merge"]], "most_supported_trees() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.most_supported_trees"]], "natural_distribution_annotate() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.natural_distribution_annotate"]], "node_probabilities() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.node_probabilities"]], "nodes_above_node() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.nodes_above_node"]], "num_edges() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.num_edges"]], "num_leaves() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.num_leaves"]], "num_nodes() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.num_nodes"]], "optimal_rf_distance() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.optimal_rf_distance"]], "optimal_sum_rf_distance() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.optimal_sum_rf_distance"]], "optimal_weight_annotate() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.optimal_weight_annotate"]], "overestimate_rf_diameter() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.overestimate_rf_diameter"]], "postorder() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.postorder"]], "postorder_above() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.postorder_above"]], "postorder_cladetree_accum() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.postorder_cladetree_accum"]], "postorder_history_accum() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.postorder_history_accum"]], "preorder() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.preorder"]], "preorder_history_accum() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.preorder_history_accum"]], "probability_annotate() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.probability_annotate"]], "recompute_parents() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.recompute_parents"]], "relabel() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.relabel"]], "remove_label_fields() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.remove_label_fields"]], "sample() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.sample"]], "sample_with_edge() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.sample_with_edge"]], "sample_with_node() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.sample_with_node"]], "shared_history_count() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.shared_history_count"]], "sum_probability() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.sum_probability"]], "sum_rf_distances() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.sum_rf_distances"]], "sum_weights() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.sum_weights"]], "summary() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.summary"]], "to_ascii() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.to_ascii"]], "to_ete() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.to_ete"]], "to_graphviz() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.to_graphviz"]], "to_newick() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.to_newick"]], "to_newicks() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.to_newicks"]], "trim_below_weight() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.trim_below_weight"]], "trim_optimal_rf_distance() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.trim_optimal_rf_distance"]], "trim_optimal_sum_rf_distance() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.trim_optimal_sum_rf_distance"]], "trim_optimal_weight() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.trim_optimal_weight"]], "trim_topology() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.trim_topology"]], "underestimate_rf_diameter() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.underestimate_rf_diameter"]], "uniform_distribution_annotate() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.uniform_distribution_annotate"]], "unlabel() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.unlabel"]], "update_label_fields() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.update_label_fields"]], "weight_count() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.weight_count"]], "weight_counts_with_ambiguities() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.weight_counts_with_ambiguities"]], "weight_range_annotate() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.weight_range_annotate"]], "empty_node() (in module historydag)": [[8, "historydag.empty_node"]], "from_newick() (in module historydag)": [[9, "historydag.from_newick"]], "from_tree() (in module historydag)": [[10, "historydag.from_tree"]], "history_dag_from_etes() (in module historydag)": [[11, "historydag.history_dag_from_etes"]], "history_dag_from_histories() (in module historydag)": [[12, "historydag.history_dag_from_histories"]], "history_dag_from_newicks() (in module historydag)": [[13, "historydag.history_dag_from_newicks"]], "ambiguousleafcghistorydag (class in historydag.mutation_annotated_dag)": [[14, "historydag.mutation_annotated_dag.AmbiguousLeafCGHistoryDag"]], "cghistorydag (class in historydag.mutation_annotated_dag)": [[14, "historydag.mutation_annotated_dag.CGHistoryDag"]], "hdagjsonencoder (class in historydag.mutation_annotated_dag)": [[14, "historydag.mutation_annotated_dag.HDagJSONEncoder"]], "nodeidhistorydag (class in historydag.mutation_annotated_dag)": [[14, "historydag.mutation_annotated_dag.NodeIDHistoryDag"]], "adjusted_node_probabilities() (historydag.mutation_annotated_dag.cghistorydag method)": [[14, "historydag.mutation_annotated_dag.CGHistoryDag.adjusted_node_probabilities"]], "default() (historydag.mutation_annotated_dag.hdagjsonencoder method)": [[14, "historydag.mutation_annotated_dag.HDagJSONEncoder.default"]], "flatten() (historydag.mutation_annotated_dag.cghistorydag method)": [[14, "historydag.mutation_annotated_dag.CGHistoryDag.flatten"]], "get_reference_sequence() (historydag.mutation_annotated_dag.cghistorydag method)": [[14, "historydag.mutation_annotated_dag.CGHistoryDag.get_reference_sequence"]], "hamming_parsimony_count() (historydag.mutation_annotated_dag.ambiguousleafcghistorydag method)": [[14, "historydag.mutation_annotated_dag.AmbiguousLeafCGHistoryDag.hamming_parsimony_count"]], "hamming_parsimony_count() (historydag.mutation_annotated_dag.cghistorydag method)": [[14, "historydag.mutation_annotated_dag.CGHistoryDag.hamming_parsimony_count"]], "historydag.mutation_annotated_dag": [[14, "module-historydag.mutation_annotated_dag"]], "load_mad_protobuf() (in module historydag.mutation_annotated_dag)": [[14, "historydag.mutation_annotated_dag.load_MAD_protobuf"]], "load_mad_protobuf_file() (in module historydag.mutation_annotated_dag)": [[14, "historydag.mutation_annotated_dag.load_MAD_protobuf_file"]], "load_json_file() (in module historydag.mutation_annotated_dag)": [[14, "historydag.mutation_annotated_dag.load_json_file"]], "summary() (historydag.mutation_annotated_dag.ambiguousleafcghistorydag method)": [[14, "historydag.mutation_annotated_dag.AmbiguousLeafCGHistoryDag.summary"]], "summary() (historydag.mutation_annotated_dag.cghistorydag method)": [[14, "historydag.mutation_annotated_dag.CGHistoryDag.summary"]], "test_equal() (historydag.mutation_annotated_dag.cghistorydag method)": [[14, "historydag.mutation_annotated_dag.CGHistoryDag.test_equal"]], "to_json() (historydag.mutation_annotated_dag.cghistorydag method)": [[14, "historydag.mutation_annotated_dag.CGHistoryDag.to_json"]], "to_json_file() (historydag.mutation_annotated_dag.cghistorydag method)": [[14, "historydag.mutation_annotated_dag.CGHistoryDag.to_json_file"]], "to_protobuf() (historydag.mutation_annotated_dag.cghistorydag method)": [[14, "historydag.mutation_annotated_dag.CGHistoryDag.to_protobuf"]], "to_protobuf_file() (historydag.mutation_annotated_dag.cghistorydag method)": [[14, "historydag.mutation_annotated_dag.CGHistoryDag.to_protobuf_file"]], "unflatten() (in module historydag.mutation_annotated_dag)": [[14, "historydag.mutation_annotated_dag.unflatten"]], "weight_counts_with_ambiguities() (historydag.mutation_annotated_dag.cghistorydag method)": [[14, "historydag.mutation_annotated_dag.CGHistoryDag.weight_counts_with_ambiguities"]], "build_dag_from_trees() (in module historydag.parsimony)": [[15, "historydag.parsimony.build_dag_from_trees"]], "build_tree() (in module historydag.parsimony)": [[15, "historydag.parsimony.build_tree"]], "build_trees_from_files() (in module historydag.parsimony)": [[15, "historydag.parsimony.build_trees_from_files"]], "disambiguate() (in module historydag.parsimony)": [[15, "historydag.parsimony.disambiguate"]], "disambiguate_history() (in module historydag.parsimony)": [[15, "historydag.parsimony.disambiguate_history"]], "historydag.parsimony": [[15, "module-historydag.parsimony"]], "make_weighted_hamming_count_funcs() (in module historydag.parsimony)": [[15, "historydag.parsimony.make_weighted_hamming_count_funcs"]], "parsimony_score() (in module historydag.parsimony)": [[15, "historydag.parsimony.parsimony_score"]], "parsimony_scores_from_files() (in module historydag.parsimony)": [[15, "historydag.parsimony.parsimony_scores_from_files"]], "parsimony_scores_from_topologies() (in module historydag.parsimony)": [[15, "historydag.parsimony.parsimony_scores_from_topologies"]], "remove_invariant_sites() (in module historydag.parsimony)": [[15, "historydag.parsimony.remove_invariant_sites"]], "replace_label_attr() (in module historydag.parsimony)": [[15, "historydag.parsimony.replace_label_attr"]], "sankoff_downward() (in module historydag.parsimony)": [[15, "historydag.parsimony.sankoff_downward"]], "sankoff_postorder_iter_accum() (in module historydag.parsimony)": [[15, "historydag.parsimony.sankoff_postorder_iter_accum"]], "sankoff_upward() (in module historydag.parsimony)": [[15, "historydag.parsimony.sankoff_upward"]], "treewise_sankoff_in_dag() (in module historydag.parsimony)": [[15, "historydag.parsimony.treewise_sankoff_in_dag"]], "ambiguousleafsequencehistorydag (class in historydag.sequence_dag)": [[16, "historydag.sequence_dag.AmbiguousLeafSequenceHistoryDag"]], "sequencehistorydag (class in historydag.sequence_dag)": [[16, "historydag.sequence_dag.SequenceHistoryDag"]], "hamming_parsimony_count() (historydag.sequence_dag.ambiguousleafsequencehistorydag method)": [[16, "historydag.sequence_dag.AmbiguousLeafSequenceHistoryDag.hamming_parsimony_count"]], "hamming_parsimony_count() (historydag.sequence_dag.sequencehistorydag method)": [[16, "historydag.sequence_dag.SequenceHistoryDag.hamming_parsimony_count"]], "historydag.sequence_dag": [[16, "module-historydag.sequence_dag"]], "summary() (historydag.sequence_dag.ambiguousleafsequencehistorydag method)": [[16, "historydag.sequence_dag.AmbiguousLeafSequenceHistoryDag.summary"]], "summary() (historydag.sequence_dag.sequencehistorydag method)": [[16, "historydag.sequence_dag.SequenceHistoryDag.summary"]], "addfuncdict (class in historydag.utils)": [[17, "historydag.utils.AddFuncDict"]], "decimalstate (class in historydag.utils)": [[17, "historydag.utils.DecimalState"]], "floatstate (class in historydag.utils)": [[17, "historydag.utils.FloatState"]], "historydagfilter (class in historydag.utils)": [[17, "historydag.utils.HistoryDagFilter"]], "intstate (class in historydag.utils)": [[17, "historydag.utils.IntState"]], "strstate (class in historydag.utils)": [[17, "historydag.utils.StrState"]], "taxaerror": [[17, "historydag.utils.TaxaError"]], "ualabel (class in historydag.utils)": [[17, "historydag.utils.UALabel"]], "__init__() (historydag.utils.addfuncdict method)": [[17, "historydag.utils.AddFuncDict.__init__"]], "__init__() (historydag.utils.decimalstate method)": [[17, "historydag.utils.DecimalState.__init__"]], "__init__() (historydag.utils.floatstate method)": [[17, "historydag.utils.FloatState.__init__"]], "__init__() (historydag.utils.historydagfilter method)": [[17, "historydag.utils.HistoryDagFilter.__init__"]], "__init__() (historydag.utils.intstate method)": [[17, "historydag.utils.IntState.__init__"]], "__init__() (historydag.utils.strstate method)": [[17, "historydag.utils.StrState.__init__"]], "access_field() (in module historydag.utils)": [[17, "historydag.utils.access_field"]], "access_nodefield_default() (in module historydag.utils)": [[17, "historydag.utils.access_nodefield_default"]], "cartesian_product() (in module historydag.utils)": [[17, "historydag.utils.cartesian_product"]], "collapse_adjacent_sequences() (in module historydag.utils)": [[17, "historydag.utils.collapse_adjacent_sequences"]], "count_labeled_binary_topologies() (in module historydag.utils)": [[17, "historydag.utils.count_labeled_binary_topologies"]], "edge_difference_funcs() (in module historydag.utils)": [[17, "historydag.utils.edge_difference_funcs"]], "explode_label() (in module historydag.utils)": [[17, "historydag.utils.explode_label"]], "hist() (in module historydag.utils)": [[17, "historydag.utils.hist"]], "historydag.utils": [[17, "module-historydag.utils"]], "ignore_uanode() (in module historydag.utils)": [[17, "historydag.utils.ignore_uanode"]], "is_collapsed() (in module historydag.utils)": [[17, "historydag.utils.is_collapsed"]], "linear_combination() (historydag.utils.addfuncdict method)": [[17, "historydag.utils.AddFuncDict.linear_combination"]], "load_fasta() (in module historydag.utils)": [[17, "historydag.utils.load_fasta"]], "log_natural_probability_funcs (in module historydag.utils)": [[17, "historydag.utils.log_natural_probability_funcs"]], "logsumexp() (in module historydag.utils)": [[17, "historydag.utils.logsumexp"]], "make_newickcountfuncs() (in module historydag.utils)": [[17, "historydag.utils.make_newickcountfuncs"]], "make_rfdistance_countfuncs() (in module historydag.utils)": [[17, "historydag.utils.make_rfdistance_countfuncs"]], "natural_edge_probability() (in module historydag.utils)": [[17, "historydag.utils.natural_edge_probability"]], "node_countfuncs (in module historydag.utils)": [[17, "historydag.utils.node_countfuncs"]], "prod() (in module historydag.utils)": [[17, "historydag.utils.prod"]], "read_fasta() (in module historydag.utils)": [[17, "historydag.utils.read_fasta"]], "sum_rfdistance_funcs() (in module historydag.utils)": [[17, "historydag.utils.sum_rfdistance_funcs"]]}}) \ No newline at end of file +Search.setIndex({"docnames": ["api", "index", "quickstart", "stubs/historydag.HistoryDag", "stubs/historydag.HistoryDagNode", "stubs/historydag.compact_genome", "stubs/historydag.counterops", "stubs/historydag.dag", "stubs/historydag.dag_node", "stubs/historydag.empty_node", "stubs/historydag.from_newick", "stubs/historydag.from_tree", "stubs/historydag.history_dag_from_etes", "stubs/historydag.history_dag_from_histories", "stubs/historydag.history_dag_from_newicks", "stubs/historydag.mutation_annotated_dag", "stubs/historydag.parsimony", "stubs/historydag.parsimony_utils", "stubs/historydag.sequence_dag", "stubs/historydag.utils"], "filenames": ["api.rst", "index.rst", "quickstart.rst", "stubs/historydag.HistoryDag.rst", "stubs/historydag.HistoryDagNode.rst", "stubs/historydag.compact_genome.rst", "stubs/historydag.counterops.rst", "stubs/historydag.dag.rst", "stubs/historydag.dag_node.rst", "stubs/historydag.empty_node.rst", "stubs/historydag.from_newick.rst", "stubs/historydag.from_tree.rst", "stubs/historydag.history_dag_from_etes.rst", "stubs/historydag.history_dag_from_histories.rst", "stubs/historydag.history_dag_from_newicks.rst", "stubs/historydag.mutation_annotated_dag.rst", "stubs/historydag.parsimony.rst", "stubs/historydag.parsimony_utils.rst", "stubs/historydag.sequence_dag.rst", "stubs/historydag.utils.rst"], "titles": ["Description", "historydag documentation", "Quickstart", "historydag.HistoryDag", "historydag.HistoryDagNode", "historydag.compact_genome", "historydag.counterops", "historydag.dag", "historydag.dag_node", "historydag.empty_node", "historydag.from_newick", "historydag.from_tree", "historydag.history_dag_from_etes", "historydag.history_dag_from_histories", "historydag.history_dag_from_newicks", "historydag.mutation_annotated_dag", "historydag.parsimony", "historydag.parsimony_utils", "historydag.sequence_dag", "historydag.utils"], "terms": {"thi": [0, 2, 3, 4, 5, 7, 8, 15, 16, 17, 18, 19], "page": [0, 1], "document": [0, 2, 3, 7], "api": [0, 2], "historydag": 0, "packag": [0, 1, 2], "The": [0, 3, 5, 7, 11, 15, 16, 17, 18, 19], "fundament": 0, "data": [0, 3, 7, 10, 11, 15, 16], "structur": [0, 4, 7, 8, 11], "implement": [0, 2, 3, 7, 11, 15, 16, 17, 19], "here": [0, 2], "i": [0, 1, 2, 3, 4, 5, 7, 8, 11, 15, 16, 17, 18, 19], "provid": [0, 2, 3, 4, 5, 7, 8, 10, 11, 15, 16, 17, 18, 19], "effici": [0, 2, 5], "storag": 0, "collect": [0, 1, 2, 3, 5, 6, 7, 17], "tree": [0, 1, 3, 4, 7, 8, 10, 11, 15, 16, 18, 19], "intern": [0, 1, 2, 3, 4, 7, 8, 10, 15, 16, 18, 19], "node": [0, 2, 3, 4, 7, 8, 10, 11, 15, 16, 17, 18, 19], "label": [0, 1, 2, 3, 4, 7, 8, 9, 10, 11, 15, 16, 17, 18, 19], "In": [0, 2, 3, 5, 7, 16, 17, 19], "we": [0, 2, 3, 7, 19], "refer": [0, 2, 3, 5, 7, 10, 15, 17, 19], "histori": [0, 1, 3, 4, 7, 8, 10, 11, 13, 14, 15, 16, 17, 18, 19], "A": [0, 3, 4, 5, 7, 8, 15, 16, 17, 18, 19], "can": [0, 2, 3, 6, 7, 11, 15, 16, 17, 19], "repres": [0, 1, 2, 3, 5, 6, 7, 15, 17, 19], "shape": [0, 2, 3, 4, 7, 8, 11], "object": [0, 2, 3, 4, 5, 6, 7, 8, 10, 11, 15, 16, 17, 18, 19], "creat": [0, 2, 3, 5, 7, 15, 17], "from": [0, 2, 3, 4, 5, 7, 8, 11, 13, 14, 15, 16, 17, 19], "merg": [0, 3, 7], "togeth": [0, 2, 3, 7, 15], "dag": [0, 1, 2, 3, 4, 8, 10, 13, 14, 15, 16, 18, 19], "do": [0, 2, 5, 15, 19], "comput": [0, 3, 5, 7, 15, 16, 17, 19], "store": [0, 2, 3, 7, 15, 16, 17], "access": [0, 5, 7, 11, 19], "contain": [0, 2, 3, 4, 5, 7, 8, 10, 11, 15, 16, 17, 18, 19], "export": 0, "them": [0, 2, 3, 7, 16, 17], "other": [0, 2, 3, 4, 7, 8, 15, 17, 19], "format": [0, 2, 3, 4, 5, 7, 8, 10, 15, 16], "top": 0, "level": [0, 3, 7, 15], "promot": 0, "direct": [1, 3, 7], "acycl": 1, "graph": [1, 3, 7], "For": [1, 2, 3, 7, 15, 17, 19], "exampl": [1, 2, 3, 5, 7, 15, 17, 19], "inform": [1, 3, 7, 15, 16], "get": [1, 2, 3, 5, 7, 15, 19], "start": [1, 3, 7], "see": [1, 2, 3, 7, 10, 14, 15, 16, 19], "quickstart": 1, "below": [1, 2, 3, 4, 7, 8, 17, 19], "readm": 1, "github": [1, 2], "descript": [1, 2, 3, 7, 15], "class": [1, 3, 4, 5, 7, 8, 15, 17, 18, 19], "historydagnod": [1, 2, 3, 7, 8, 9, 11, 17, 19], "function": [1, 2, 3, 4, 5, 6, 7, 8, 11, 15, 16, 17, 19], "from_tre": [1, 2, 7, 10], "empty_nod": [1, 8], "from_newick": [1, 7, 14], "history_dag_from_newick": [1, 2, 7], "history_dag_from_et": [1, 2, 7], "history_dag_from_histori": [1, 7], "modul": [1, 2, 5, 7, 15, 16, 17, 19], "sequence_dag": [1, 2, 3, 7, 15], "mutation_annotated_dag": [1, 2], "util": [1, 2, 3, 7, 10, 17], "parsimoni": [1, 2, 3, 7, 17, 18, 19], "parsimony_util": [1, 3, 7, 15, 16, 19], "compact_genom": [1, 2, 15, 17, 18], "dag_nod": 1, "counterop": 1, "index": [1, 3, 5, 7, 15, 17], "search": 1, "conceptu": 2, "introduct": 2, "walk": 2, "through": [2, 17], "essenti": 2, "featur": [2, 3, 7, 10, 19], "wai": [2, 3, 6, 7, 15, 16], "whose": [2, 3, 7, 16, 19], "includ": [2, 3, 4, 7, 8, 15, 16, 17, 19], "each": [2, 3, 4, 5, 6, 7, 8, 11, 15, 16, 17, 18, 19], "carri": [2, 3, 7], "nucleotid": [2, 5, 15, 17, 18], "sequenc": [2, 3, 5, 7, 11, 15, 16, 17, 18, 19], "its": [2, 3, 7, 8, 16, 17, 19], "simplest": 2, "form": [2, 3, 7], "mai": [2, 3, 4, 7, 8, 10, 11, 15, 16, 17, 18, 19], "singl": [2, 3, 7, 19], "To": [2, 3, 7, 15, 17, 19], "construct": [2, 7, 19], "annot": [2, 3, 7, 15, 19], "child": [2, 3, 4, 7, 8, 11, 15, 17, 19], "clade": [2, 3, 4, 7, 8, 9, 11, 15, 16, 19], "beneath": [2, 3, 7], "set": [2, 3, 4, 7, 8, 15, 16, 17, 19], "leaf": [2, 3, 4, 7, 8, 11, 15, 16, 17, 18, 19], "reachabl": [2, 3, 4, 7, 8], "": [2, 3, 4, 5, 7, 8, 11, 15, 16, 17, 19], "own": [2, 3, 7], "itself": [2, 3, 7], "also": [2, 3, 5, 7, 8, 17], "union": [2, 3, 4, 7, 8, 17], "sinc": [2, 3, 7, 19], "ar": [2, 3, 4, 5, 7, 8, 11, 13, 15, 16, 17, 19], "children": [2, 3, 4, 7, 8, 9, 11, 16], "after": [2, 3, 7, 15, 16, 19], "ua": [2, 3, 7, 10, 11, 15, 16, 17, 19], "univers": [2, 3, 7, 8], "ancestor": [2, 3, 7, 8], "ad": [2, 3, 4, 7, 8, 10, 11, 19], "parent": [2, 3, 4, 7, 8, 11, 15, 17, 19], "origin": [2, 3, 7, 15], "root": [2, 3, 4, 7, 8, 10, 11, 16, 17, 19], "result": [2, 3, 5, 6, 7, 10, 15, 16, 19], "an": [2, 3, 4, 6, 7, 8, 11, 15, 16, 17, 18, 19], "which": [2, 3, 4, 5, 6, 7, 8, 10, 11, 13, 15, 16, 17, 18, 19], "call": [2, 3, 7, 10, 15, 18, 19], "notic": [2, 19], "edg": [2, 3, 4, 7, 8, 11, 15, 17, 19], "associ": [2, 3, 7, 8, 16], "just": [2, 19], "specif": [2, 15, 16], "must": [2, 3, 6, 7, 11, 15, 16, 19], "same": [2, 3, 4, 6, 7, 8, 10, 11, 15, 16, 17, 19], "target": [2, 4, 8, 15, 19], "convert": [2, 3, 4, 5, 7, 8, 11, 15, 16, 18, 19], "multipl": [2, 3, 5, 7, 15, 16, 17, 19], "those": [2, 3, 5, 7, 16, 17, 19], "least": [2, 3, 5, 7], "us": [2, 3, 4, 5, 6, 7, 8, 10, 11, 15, 16, 17, 19], "ani": [2, 3, 4, 5, 7, 8, 10, 11, 17, 19], "all": [2, 3, 4, 5, 6, 7, 8, 15, 16, 17, 18, 19], "leav": [2, 3, 5, 7, 16, 19], "ha": [2, 3, 4, 7, 8, 10, 11, 17], "exactli": [2, 3, 7], "one": [2, 3, 5, 7, 8, 16, 17, 19], "pair": [2, 3, 5, 7, 15, 17, 19], "invers": 2, "correspond": [2, 3, 7, 8, 16], "introduc": [2, 19], "abov": [2, 3, 7], "highlight": 2, "red": [2, 3, 7], "imag": 2, "gener": [2, 3, 4, 7, 8, 16, 17, 19], "more": [2, 3, 4, 7, 8, 10, 16, 19], "than": [2, 3, 7, 15, 16], "automat": [2, 15, 18], "swap": [2, 3, 7], "certain": [2, 19], "substructur": 2, "between": [2, 3, 5, 7, 17, 19], "input": [2, 7, 10, 11, 19], "follow": [2, 3, 7], "figur": 2, "illustr": 2, "simpl": [2, 3, 7], "two": [2, 3, 5, 6, 7, 15, 16, 17, 19], "left": [2, 3, 7, 19], "panel": 2, "yield": [2, 3, 5, 7, 17, 19], "well": [2, 3, 7, 17], "new": [2, 3, 5, 7, 10, 11, 19], "shown": 2, "right": [2, 3, 7, 19], "although": [2, 19], "pypi": 2, "straightforward": 2, "pip": 2, "http": [2, 3, 7], "com": 2, "matsengrp": 2, "archiv": 2, "ref": 2, "head": 2, "main": 2, "zip": 2, "altern": [2, 3, 7], "clone": 2, "repositori": 2, "git": 2, "history_dag_from_tre": [2, 7, 12], "mani": [2, 3, 7, 19], "attribut": [2, 3, 4, 7, 8, 11, 15, 16, 17, 19], "type": [2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19], "namedtupl": [2, 3, 4, 7, 8, 15, 16, 17, 19], "distinguish": [2, 5, 7, 11, 19], "instanc": [2, 3, 7, 17, 19], "attr": [2, 3, 4, 7, 8, 9, 11, 15, 18], "interfac": [2, 15], "map": [2, 3, 4, 5, 7, 8, 10, 11, 17], "appropri": [2, 3, 7, 11], "place": [2, 3, 7, 15], "let": [2, 15], "some": [2, 3, 7, 19], "import": [2, 3, 7], "hdag": [2, 19], "pickl": 2, "open": 2, "sample_data": 2, "toy_tre": 2, "p": 2, "rb": 2, "fh": 2, "ete_tre": 2, "now": [2, 3, 7], "second": [2, 3, 7, 19], "argument": [2, 3, 5, 7, 8, 11, 14, 15, 16, 17, 19], "list": [2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 16, 19], "name": [2, 3, 4, 7, 8, 10, 11, 12, 16, 17, 19], "should": [2, 3, 5, 6, 7, 15, 16, 17, 19], "differ": [2, 3, 5, 7, 15, 19], "keyword": [2, 3, 5, 7, 15, 16, 17, 19], "label_funct": [2, 7, 10, 11, 14], "original_seq": 2, "lambda": [2, 3, 4, 7, 8, 10, 11, 14, 17, 19], "appear": [2, 3, 7, 19], "final": 2, "preserv": [2, 3, 7], "copi": [2, 3, 7], "overwrit": 2, "By": [2, 3, 7, 11], "take": [2, 3, 4, 7, 8, 11, 15, 16, 17, 19], "return": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], "valu": [2, 3, 5, 7, 11, 16, 17, 19], "attr_func": [2, 7, 10, 11, 14], "accept": [2, 3, 7, 11, 17], "default": [2, 3, 7, 11, 15, 16, 17, 19], "arbitrari": [2, 3, 6, 7, 8, 15, 19], "child_node_func": [2, 7, 11], "leaf_node_func": [2, 7, 11], "given": [2, 3, 7, 8, 9, 16, 19], "dendropi": 2, "treelist": [2, 7, 13], "record": [2, 5, 15, 16, 17, 19], "annotationset": 2, "seed_nod": 2, "get_valu": 2, "child_nod": 2, "leaf_it": 2, "string": [2, 3, 4, 5, 7, 8, 10, 14, 15, 16, 17, 19], "howev": [2, 3, 7, 16], "method": [2, 3, 4, 5, 7, 8, 15, 16, 17, 18, 19], "pars": [2, 7, 10], "support": [2, 3, 7, 8, 15, 19], "integ": [2, 3, 7, 15, 18], "via": 2, "pass": [2, 3, 7, 10, 15, 16, 19], "len": [2, 3, 7], "equival": [2, 3, 6, 7, 17], "0": [2, 4, 5, 8, 15, 16, 17, 19], "1": [2, 3, 5, 7, 8, 14, 15, 16, 17, 19], "is_histori": [2, 3, 7], "true": [2, 3, 4, 5, 7, 8, 15, 16, 17, 19], "It": [2, 15], "trivial": 2, "history_list1": 2, "history_list2": 2, "get_histori": [2, 3, 7], "fail": [2, 3, 4, 7, 8, 19], "overflow": 2, "error": [2, 3, 7, 19], "safer": 2, "count_histori": [2, 3, 7, 15], "rather": [2, 16], "python": 2, "size": 2, "rang": [2, 3, 7], "probabl": [2, 3, 6, 7, 8, 15, 19], "determin": [2, 3, 5, 7, 15], "distribut": [2, 3, 7, 19], "accord": [2, 3, 5, 7, 19], "uniform": [2, 3, 7], "make_uniform": [2, 3, 7], "style": 2, "combined_dag": 2, "dag1": 2, "dag2": 2, "both": [2, 3, 7, 17, 19], "hand": 2, "These": [2, 3, 7, 15, 19], "achiev": [2, 3, 5, 6, 7, 17], "so": [2, 3, 7, 16, 17, 19], "were": [2, 3, 7], "_": 2, "8": [2, 7, 10, 19], "idag": 2, "empti": [2, 3, 7, 19], "rais": [2, 3, 7, 15], "intersectionerror": [2, 7], "traceback": 2, "most": [2, 7, 15], "recent": 2, "last": [2, 16], "file": [2, 5, 15, 16, 19], "stdin": 2, "line": 2, "home": 2, "user": 2, "py": 2, "1086": 2, "history_compl": 2, "request": 2, "complement": [2, 3, 7], "shorthand": 2, "history_intersect": [2, 3, 7], "mean": [2, 3, 7, 19], "possibl": [2, 3, 5, 7, 8, 15, 16, 17], "rule": 2, "fairli": 2, "strict": 2, "number": [2, 3, 7, 8, 10, 15, 17, 19], "usual": 2, "manag": 2, "make_complet": [2, 3, 7], "471": 2, "convert_to_collaps": [2, 3, 7], "connect": [2, 3, 7, 19], "adjac": [2, 3, 7, 17], "affect": [2, 19], "chang": [2, 3, 7], "limit": [2, 17], "unlabel": [2, 3, 7], "equal": [2, 3, 5, 7, 15], "uniqu": [2, 3, 7, 8, 15], "topologi": [2, 3, 4, 7, 8, 10, 11, 16, 19], "explode_nod": [2, 3, 7], "duplic": 2, "when": [2, 3, 4, 5, 7, 8, 15, 16, 17, 19], "expand": [2, 17, 19], "ambigu": [2, 3, 5, 7, 15, 16, 17, 18], "assign": [2, 3, 7, 15, 16, 19], "subject": 2, "constraint": 2, "There": 2, "varieti": 2, "expect": [2, 3, 4, 5, 7, 8, 15, 17, 18, 19], "sequencehistorydag": [2, 3, 7, 15, 18], "guarante": [2, 3, 7, 15], "possess": 2, "unambigu": [2, 15, 16, 17, 18], "have": [2, 3, 7, 15, 16, 17, 19], "length": [2, 6, 16, 17], "ambiguousleafsequencehistorydag": [2, 17, 18], "onli": [2, 3, 4, 7, 8, 15, 16, 17, 19], "permit": [2, 17], "cghistorydag": [2, 15, 17], "compactgenom": [2, 5, 15, 17, 18], "compactli": 2, "summar": 2, "mutat": [2, 5, 15, 17], "rel": [2, 5, 15, 19], "larch": [2, 15], "protobuf": [2, 15], "from_history_dag": [2, 3, 7], "check": [2, 4, 5, 8, 15], "requir": [2, 3, 7, 10, 11, 15, 16, 18], "field": [2, 3, 4, 7, 8, 10, 11, 15, 16, 17, 18, 19], "exist": [2, 3, 7, 16], "thei": [2, 3, 5, 7, 15, 16], "attempt": [2, 3, 7, 15], "recov": [2, 3, 7], "alreadi": [2, 3, 4, 7, 8, 16], "present": [2, 3, 4, 7, 8], "detail": [2, 3, 7, 10, 14, 19], "process": 2, "sum": [2, 3, 6, 7, 17, 19], "Such": 2, "e": [2, 3, 7, 17, 19], "accumul": [2, 3, 7], "edge_weight_func": [2, 3, 7, 11, 17, 19], "accum_func": [2, 3, 7, 15, 17, 19], "respect": [2, 3, 7, 8, 15, 16, 17, 19], "weight_count": [2, 3, 7, 15, 17, 19], "counter": [2, 3, 6, 7, 15, 18, 19], "optimal_weight_annot": [2, 3, 7, 19], "optim": [2, 3, 7, 19], "sub": [2, 3, 4, 7, 8], "trim_optimal_weight": [2, 3, 7, 19], "trim": [2, 3, 7, 16, 19], "express": [2, 3, 5, 7, 16], "As": [2, 3, 7, 19], "suppos": 2, "want": [2, 17], "decompos": 2, "where": [2, 3, 7, 8, 15, 17, 19], "minimum": [2, 3, 7, 17], "n1": [2, 17, 19], "n2": [2, 17, 19], "optimal_func": [2, 3, 7, 19], "min": [2, 3, 5, 7, 16, 19], "35": 2, "17": 2, "36": 2, "325": 2, "37": 2, "173": 2, "kei": [2, 3, 4, 5, 6, 7, 8, 11, 15, 16, 18, 19], "alwai": [2, 3, 7, 15], "add": [2, 3, 4, 7, 8, 15, 16, 19], "maximum": [2, 3, 7], "max": [2, 3, 7, 19], "three": 2, "similar": [2, 3, 7, 19], "special": [2, 15], "subclass": [2, 3, 7, 15, 17, 18, 19], "dictionari": [2, 3, 4, 5, 7, 8, 11, 15, 16, 17, 19], "build": [2, 7, 11, 13, 14, 16], "addit": [2, 3, 7, 11, 16, 17], "start_func": [2, 3, 7, 15, 17, 19], "what": 2, "simpli": [2, 3, 7, 15, 19], "ident": [2, 3, 7, 8, 17], "node_count_func": 2, "n": [2, 3, 4, 7, 8, 10, 11, 14, 16, 17, 19], "nodecount": 2, "hamming_distance_countfunc": [2, 17, 19], "allow": [2, 3, 4, 7, 8, 15, 17, 19], "ham": [2, 16, 17, 18, 19], "score": [2, 3, 7, 16, 18], "compact_genome_hamming_distance_countfunc": [2, 17], "leaf_ambiguous_hamming_distance_countfunc": [2, 17], "charact": [2, 15, 16, 17], "node_countfunc": [2, 19], "count": [2, 3, 6, 7, 15, 17, 18, 19], "make_rfdistance_countfunc": [2, 3, 7, 19], "robinson": [2, 3, 7, 19], "fould": [2, 3, 7, 19], "distanc": [2, 3, 7, 16, 17, 19], "make_newickcountfunc": [2, 3, 7, 19], "conveni": [2, 3, 4, 5, 7, 8, 19], "wrap": [2, 19], "to_newick": [2, 3, 7, 19], "like": [2, 3, 5, 6, 7, 8, 15, 17, 19], "choic": [2, 3, 5, 7, 15, 17], "specifi": [2, 3, 4, 7, 8, 15, 16, 17, 19], "whether": [2, 3, 4, 5, 7, 8, 15, 17, 19], "minim": [2, 3, 5, 7], "maxim": [2, 3, 7, 16], "unpack": 2, "min_nod": 2, "print": [2, 3, 4, 5, 7, 8, 15, 18, 19], "min_parsimoni": 2, "filter": 2, "syntax": 2, "filtered_dag": 2, "primari": 2, "advantag": 2, "plain": [2, 19], "compos": 2, "simultan": 2, "tupl": [2, 3, 4, 5, 7, 8, 15, 17, 19], "fashion": 2, "73": 2, "320": 2, "74": 2, "5": 2, "112": 2, "61": 2, "lexicograph": 2, "order": [2, 3, 5, 7, 8, 16, 17, 19], "note": [2, 3, 7, 15, 19], "nest": [2, 15], "avoid": 2, "kwarg": [2, 3, 7, 12, 15, 16, 17, 19], "hammingparsimoni": [2, 17], "similari": 2, "sequenti": 2, "max_node_count": 2, "my_filt": 2, "faster": [2, 3, 7], "thing": 2, "without": [2, 3, 7, 15, 19], "modifi": [2, 3, 7], "describ": [2, 3, 5, 7, 15, 17], "et": [2, 3, 4, 7, 8, 16], "relev": 2, "to_et": [2, 3, 4, 7, 8], "name_func": [2, 3, 4, 7, 8, 19], "transfer": 2, "feature_func": [2, 3, 4, 7, 8, 19], "easili": 2, "visual": 2, "to_graphviz": [2, 3, 7], "recurs": [2, 3, 4, 7, 8, 15, 17], "consist": [2, 3, 7, 15], "face": 2, "point": [2, 3, 7, 8, 15, 19], "expos": [2, 3, 7], "work": [2, 3, 4, 7, 8, 15, 19], "directori": 2, "100": 2, "1041": 2, "count_topologi": [2, 3, 7], "389": 2, "ignor": [2, 3, 7, 16, 17, 19], "75": 2, "hamming_parsimony_count": [2, 3, 7, 15, 18], "If": [2, 3, 4, 5, 7, 8, 15, 16, 17, 19], "found": [2, 17], "program": [2, 3, 7], "dnapar": 2, "infer": [2, 3, 7, 15, 17], "ancestr": [2, 3, 7, 17], "code": [2, 16, 17], "expand_func": [2, 3, 7, 15], "sequence_resolut": [2, 17], "case": [2, 3, 7, 17, 19], "find": [2, 3, 7], "even": [2, 3, 7, 15], "compat": [2, 3, 5, 7, 17], "1048": 2, "3431531": 2, "longer": [2, 3, 7], "79": 2, "688307": 2, "78": 2, "656079": 2, "80": 2, "586769": 2, "77": 2, "476362": 2, "81": 2, "400509": 2, "76": 2, "220205": 2, "82": 2, "218542": 2, "83": 2, "96485": 2, "45983": 2, "84": 2, "32848": 2, "85": 2, "8070": 2, "86": 2, "1324": 2, "87": 2, "48": 2, "d": [2, 3, 7], "individu": [2, 3, 5, 7], "1208": 2, "1054": 2, "flexibl": 2, "how": [2, 3, 4, 5, 7, 8, 15, 19], "calcul": [2, 3, 7, 19], "up": [2, 17], "necessari": [2, 15], "custom": [2, 15, 17], "jointli": [2, 19], "time": 2, "50": 2, "444": 2, "51": 2, "328": 2, "49": 2, "270": 2, "52": 2, "94": 2, "68": 2, "53": 2, "4": 2, "make": [2, 3, 4, 7, 8, 10, 19], "further": 2, "render": [2, 3, 4, 7, 8], "t": [2, 3, 5, 7, 15, 16, 17, 19], "full": [2, 3, 5, 7, 18], "control": 2, "retriev": [2, 17], "anoth": [2, 3, 7, 11], "fetch": 2, "match": [2, 3, 5, 7, 16, 17, 19], "scrambled_tre": 2, "newdag": 2, "3": 2, "dagroot": [3, 7, 15, 18], "sourc": [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], "wrapper": [3, 7, 19], "paramet": [3, 4, 5, 7, 8, 10, 11, 15, 16, 17, 19], "dict": [3, 5, 7, 15, 16], "overrid": [3, 7, 17], "__init__": [3, 4, 5, 7, 8, 17, 19], "defin": [3, 5, 7, 15, 17, 19], "_required_label_field": [3, 7], "variabl": [3, 7], "entri": [3, 7, 17], "shall": [3, 7], "required_field": [3, 7], "from_field": [3, 7], "conversion_func": [3, 7], "convers": [3, 7], "Be": [3, 7], "sure": [3, 4, 7, 8], "avail": [3, 7], "docstr": [3, 7, 16], "classmethod": [3, 7], "label_field": [3, 7], "none": [3, 4, 5, 7, 8, 9, 15, 16, 17, 19], "No": [3, 7], "perform": [3, 7, 16], "option": [3, 4, 5, 7, 8, 16, 17, 19], "str": [3, 4, 5, 7, 8, 10, 11, 15, 17, 19], "static": [3, 7], "wa": [3, 4, 7, 8, 16], "to_cl": [3, 7], "about": [3, 7, 15, 18], "except": [3, 7, 15, 19], "miss": [3, 7], "omit": [3, 7], "befor": [3, 7, 19], "otherwis": [3, 5, 7, 15, 16, 17, 19], "get_label_typ": [3, 7], "trim_below_weight": [3, 7], "max_weight": [3, 7], "min_possible_weight": [3, 7], "inf": [3, 7], "within": [3, 7], "weight": [3, 4, 5, 7, 8, 11, 15, 16, 17, 19], "total": [3, 7, 15], "oper": [3, 7, 8, 19], "properli": [3, 7], "subtract": [3, 7], "That": [3, 7], "b": [3, 7, 19], "c": [3, 7, 17, 19], "neg": [3, 7, 15], "subgraph": [3, 7], "doe": [3, 4, 6, 7, 8, 16, 19], "necessarili": [3, 7], "slightli": [3, 7], "possibli": [3, 5, 7, 19], "memori": [3, 7], "intens": [3, 7], "get_tre": [3, 7], "deprec": [3, 4, 7, 8, 12, 15], "get_leav": [3, 7, 11], "get_edg": [3, 7], "skip_ua_nod": [3, 7], "fals": [3, 4, 5, 7, 8, 15, 16, 17, 19], "preorder": [3, 7], "get_annotated_edg": [3, 7], "downward": [3, 7, 19], "condit": [3, 7, 19], "num_edg": [3, 7], "descend": [3, 4, 7, 8, 15, 19], "unless": [3, 5, 7, 15], "int": [3, 7, 15, 17, 19], "num_nod": [3, 7], "num_leav": [3, 7], "find_nod": [3, 7], "filter_func": [3, 7], "non": [3, 7, 15, 16, 17, 19], "evalu": [3, 7, 8], "first": [3, 4, 5, 7, 8, 15, 19], "sampl": [3, 7, 8, 19], "edge_selector": [3, 7], "log_prob": [3, 7, 8, 15], "reproduc": [3, 7], "random": [3, 5, 7, 15, 16, 17], "seed": [3, 7], "selection_func": [3, 7], "chosen": [3, 7, 17], "nodes_above_nod": [3, 7], "along": [3, 7, 17], "sample_with_nod": [3, 7], "unbias": [3, 7], "test": [3, 7, 15], "sample_with_edg": [3, 7], "iter_covering_histori": [3, 7], "cover_edg": [3, 7, 16], "fewest": [3, 7], "therefor": [3, 7], "determinist": [3, 7, 16], "relabel": [3, 7, 16], "relabel_func": [3, 7], "relax_typ": [3, 7], "callabl": [3, 4, 7, 8, 10, 11, 17, 19], "ualabel": [3, 4, 7, 8, 15, 17, 19], "_field": [3, 7], "warn": [3, 5, 7], "silent": [3, 4, 7, 8, 19], "invalid": [3, 7], "self": [3, 4, 7, 8, 15, 17], "abstract": [3, 7], "add_label_field": [3, 7], "new_field_nam": [3, 7], "new_field_valu": [3, 7], "extend": [3, 4, 7, 8, 10], "remove_label_field": [3, 7], "fields_to_remov": [3, 7], "drop": [3, 7], "remov": [3, 4, 5, 7, 8, 16], "update_label_field": [3, 7], "field_nam": [3, 7, 17], "content": [3, 6, 7, 19], "bool": [3, 4, 5, 7, 8, 17, 19], "is_clade_tre": [3, 7], "bytestr": [3, 7], "serial": [3, 7, 15], "rtype": [3, 7], "reference_dag": [3, 7, 19], "intersect": [3, 7, 19], "compar": [3, 7, 15], "shared_history_count": [3, 7], "share": [3, 7], "add_all_allowed_edg": [3, 7], "arg": [3, 7, 8, 12, 15, 16, 19], "synonym": [3, 7, 16], "new_from_root": [3, 7], "adjacent_label": [3, 7], "preserve_parent_label": [3, 7], "constrain": [3, 7], "maintain": [3, 7], "collaps": [3, 7, 19], "state": [3, 7, 16, 17, 19], "ensur": [3, 7, 15, 17], "among": [3, 7], "newick": [3, 4, 7, 8, 10, 14, 16, 19], "extract": [3, 7], "represent": [3, 4, 5, 7, 8, 10, 15], "popul": [3, 4, 7, 8, 11], "standard": [3, 7, 10, 17, 19], "ete3": [3, 4, 7, 8, 10, 11, 16, 19], "to_ascii": [3, 4, 7, 8], "ascii": [3, 4, 7, 8, 15], "draw": [3, 4, 7, 8], "tool": [3, 4, 7, 8, 17], "treenod": [3, 4, 7, 8, 10, 11, 16, 19], "labelfunc": [3, 7], "namedict": [3, 7], "show_child_clad": [3, 7], "show_partit": [3, 7], "level_leav": [3, 7], "graph_attr": [3, 7], "node_attr": [3, 7], "edge_attr": [3, 7], "edge_attr_inherit": [3, 7], "show_edge_prob": [3, 7], "show_edge_weight": [3, 7], "graphviz": [3, 7], "dot": [3, 7], "digraph": [3, 7], "hash": [3, 7], "too": [3, 7], "larg": [3, 7], "instead": [3, 5, 7, 15, 19], "output": [3, 7, 15, 16], "alia": [3, 7], "wherev": [3, 7], "fall": [3, 7], "natur": [3, 7, 19], "doc": [3, 7, 10, 16], "inherit": [3, 7], "show": [3, 4, 7, 8], "org": [3, 7], "info": [3, 7, 15, 18], "html": [3, 7], "entir": [3, 5, 7], "under": [3, 7], "gv_attr": [3, 7], "color": [3, 7], "internal_avg_par": [3, 7], "averag": [3, 7], "measur": [3, 7], "keep": [3, 7, 19], "mind": [3, 7], "would": [3, 5, 7, 15, 17, 19], "consid": [3, 7, 17, 19], "unalik": [3, 7], "float": [3, 7, 8, 15, 17, 19], "default_nt_transit": [3, 5, 7, 15, 16, 17], "ambiguity_map": [3, 7, 15, 17], "get_sequence_resolution_func": [3, 7, 17], "expand_node_func": [3, 7], "expandable_func": [3, 7], "explod": [3, 7, 15, 16, 19], "iter": [3, 7, 8, 11, 15, 16, 17, 19], "disambigu": [3, 7, 15, 16, 17], "explode_label": [3, 7, 19], "easi": [3, 7], "write": [3, 7, 15, 19], "item": [3, 7, 15, 17, 19], "leaf_path_uncertainty_dag": [3, 7], "terminal_nod": [3, 7], "node_data_func": [3, 7], "path": [3, 7], "lead": [3, 7], "end": [3, 7], "valid": [3, 7, 17], "child_dictionari": [3, 7], "leaf_path_uncertainty_graphviz": [3, 7], "node_label_func": [3, 7], "displai": [3, 7], "summari": [3, 7, 15, 18], "label_uncertainty_summari": [3, 7], "postorder_history_accum": [3, 7, 16], "leaf_func": [3, 7], "edge_func": [3, 7, 15], "accum_within_clad": [3, 7], "accum_between_clad": [3, 7], "accum_above_edg": [3, 7], "compute_edge_prob": [3, 7], "normalize_edgeweight": [3, 7], "templat": [3, 7, 15], "dynam": [3, 7], "intermedi": [3, 7], "_dp_data": [3, 7], "whatev": [3, 7], "you": [3, 7, 15], "subtre": [3, 7, 15, 16], "part": [3, 4, 7, 8, 19], "proport": [3, 7], "aggreg": [3, 7], "postorder_cladetree_accum": [3, 7], "base": [3, 5, 7, 15, 16, 17], "count_optimal_histori": [3, 7], "eq_func": [3, 7, 19], "param": [3, 7], "intstat": [3, 7, 19], "side": [3, 7, 19], "effect": [3, 7], "sum_weight": [3, 7], "over": [3, 7, 19], "hashabl": [3, 7, 15], "_default_arg": [3, 7], "weight_range_annot": [3, 7], "min_func": [3, 7], "built": [3, 7, 17, 19], "max_func": [3, 7], "edge__weight_func": [3, 7], "favor": [3, 7], "collapse_leav": [3, 7, 19], "give": [3, 7, 19], "account": [3, 7], "prohibit": [3, 7], "slow": [3, 7], "count_topologies_fast": [3, 7], "assum": [3, 5, 7, 16, 17], "count_tre": [3, 7], "expand_count_func": [3, 7], "l": [3, 7, 19], "bifurc": [3, 7, 19], "underneath": [3, 7], "underestim": [3, 7], "resolut": [3, 5, 7, 17, 19], "multifurc": [3, 7, 19], "complet": [3, 7, 15, 16], "being": [3, 7], "count_labeled_binary_topologi": [3, 7, 19], "preorder_history_accum": [3, 7], "ua_start_v": [3, 7], "One": [3, 7, 19], "upward": [3, 7, 16], "count_nod": [3, 7], "uniform_distribution_annot": [3, 7], "node_prob": [3, 7, 15], "flag": [3, 5, 7], "treat": [3, 7, 16, 17], "Then": [3, 7], "split": [3, 7, 19], "doubl": [3, 7], "count_edg": [3, 7], "most_supported_tre": [3, 7], "highest": [3, 7], "count_paths_to_leaf": [3, 7], "leaf_label": [3, 7], "interest": [3, 7], "weight_counts_with_ambigu": [3, 7, 15], "analog": [3, 7, 15], "correctli": [3, 7, 15], "handl": [3, 7, 15], "greater": [3, 7, 15], "come": [3, 7, 15], "underestimate_rf_diamet": [3, 7], "rf": [3, 7, 19], "diamet": [3, 7], "estim": [3, 7], "topolog": [3, 7], "outlier": [3, 7], "On": [3, 7, 15], "2000": [3, 7], "less": [3, 7], "quit": [3, 7], "accur": [3, 7], "actual": [3, 7], "overestimate_rf_diamet": [3, 7], "overestim": [3, 7], "twice": [3, 7, 19], "median": [3, 7], "close": [3, 7], "never": [3, 7], "optimal_sum_rf_dist": [3, 7], "one_sid": [3, 7, 19], "one_sided_coeffici": [3, 7, 19], "taxa": [3, 7, 19], "expens": [3, 7], "better": [3, 7], "meth": [3, 7, 16], "trim_optimal_sum_rf_dist": [3, 7], "sum_rfdistance_func": [3, 7, 19], "trim_optimal_rf_dist": [3, 7], "optimal_rf_dist": [3, 7], "count_rf_dist": [3, 7], "count_sum_rf_dist": [3, 7], "sum_rf_dist": [3, 7], "pairwis": [3, 7], "especi": [3, 7, 19], "might": [3, 7, 17, 19], "coeffici": [3, 7, 19], "symmetr": [3, 7, 19], "sum_": [3, 7], "nonempti": [3, 7], "average_pairwise_rf_dist": [3, 7], "non_ident": [3, 7], "divisor": [3, 7], "normal": [3, 7, 8, 19], "constant": [3, 7, 19], "product": [3, 6, 7, 19], "depend": [3, 7, 17], "reliabl": [3, 7], "particular": [3, 7], "recommend": [3, 7], "precursor": [3, 7], "choos": [3, 7, 19], "numpi": [3, 7], "help": [3, 7], "get_topologi": [3, 7], "pseudo": [3, 7], "trim_topologi": [3, 7], "internal_label": [3, 7, 19], "collapsed_leav": [3, 7], "desir": [3, 5, 7], "export_edge_prob": [3, 7], "get_probability_countfunc": [3, 7], "edge_prob": [3, 7], "produc": [3, 5, 7, 19], "addfuncdict": [3, 7, 16, 17, 19], "g": [3, 5, 7, 17, 19], "probability_annot": [3, 7], "interpret": [3, 5, 7], "log": [3, 7], "sum_prob": [3, 7], "immedi": [3, 7], "aggregate_func": [3, 7], "ua_node_v": [3, 7, 15], "collapse_kei": [3, 7], "adjust_func": [3, 7, 15], "correct": [3, 7, 17], "observ": [3, 7, 19], "clade_union": [3, 4, 7, 8], "factor": [3, 7], "adjust": [3, 5, 7, 15], "confid": [3, 7], "contribut": [3, 7, 17, 19], "induc": [3, 7, 19], "suppli": [3, 7], "futur": [3, 7], "un": [3, 7], "natural_distribution_annot": [3, 7], "recompute_par": [3, 7], "repopul": [3, 7], "rebuild": [3, 7], "add_node_at_all_possible_plac": [3, 7], "new_leaf_id": [3, 7], "id_nam": [3, 7], "insert": [3, 7, 15], "everi": [3, 7], "insert_nod": [3, 7], "transitionmodel": [3, 7, 15, 16, 17], "weighted_hamming_edge_weight": [3, 7, 17], "local": [3, 7, 17], "edge_weight": [3, 7, 17], "dagnod": [3, 7], "realiz": [3, 7], "overal": [3, 7], "look": [3, 7, 17], "incompat": [3, 7], "postorder_abov": [3, 7], "postord": [3, 7, 16], "travers": [3, 7, 16], "revers": [3, 5, 7, 17], "With": [3, 7], "toward": [3, 7], "visit": [3, 7], "recomput": [3, 7, 16], "repeat": [3, 7, 16], "much": [3, 7, 19], "lie": [3, 7], "node_as_leaf": [3, 7], "include_root": [3, 7], "skip_root": [3, 7], "care": [3, 7], "need": [3, 7], "skip": [3, 7, 15, 16], "backward": [3, 7, 17], "frozenset": [4, 8], "edgeset": [4, 8], "empty_copi": [4, 8], "node_self": [4, 8], "under_clad": [4, 8], "is_leaf": [4, 8], "is_ua_nod": [4, 8, 19], "is_root": [4, 8], "is_history_root": [4, 8], "child_clad": [4, 8], "uanod": [4, 8, 19], "partit": [4, 8], "sorted_child_clad": [4, 8], "sort": [4, 5, 6, 8, 15], "sorted_partit": [4, 8], "add_edg": [4, 8], "prob": [4, 8], "prob_norm": [4, 8], "remove_nod": [4, 8], "nodedict": [4, 8], "orphan": [4, 8], "still": [4, 8], "show_intern": [4, 8], "compact": [4, 5, 8, 15, 17], "sort_method": [4, 8], "identifi": [4, 8, 15, 16], "either": [4, 8], "ladder": [4, 8], "alphabet": [4, 8, 17], "directli": [4, 5, 8], "whitespac": [4, 8, 15], "newlin": [4, 8, 15], "tab": [4, 8], "sort_func": [4, 8], "seq": [4, 8], "subhistori": [4, 8], "intend": [5, 7, 11], "site": [5, 15, 16, 17, 19], "impli": [5, 15], "indic": [5, 15, 16, 17], "get_sit": 5, "mutations_as_str": 5, "mutstr": 5, "appli": [5, 16], "a110g": 5, "genom": [5, 15, 17], "old": 5, "110": 5, "doesn": 5, "apply_muts_raw": 5, "mut": 5, "from_bas": [5, 17], "to_bas": [5, 17], "apply_mut": 5, "debug": 5, "against": 5, "current": [5, 8], "to_sequ": 5, "mask_sit": 5, "one_bas": 5, "unchang": [5, 16], "mask": [5, 8], "superset_sit": 5, "new_refer": 5, "opposit": 5, "subset_sit": 5, "variant": [5, 16], "kept": 5, "remove_sit": 5, "unpack_mut_str": 5, "compact_genome_from_sequ": 5, "cg_diff": 5, "parent_cg": [5, 17], "child_cg": [5, 17], "parent_nuc": 5, "child_nuc": 5, "sequence_index": 5, "ambiguous_cg_diff": 5, "transition_model": [5, 15, 16], "reconcile_cg": 5, "cg_list": 5, "check_refer": 5, "ambiguitymap": [5, 15, 17], "standard_nt_ambiguity_map": [5, 15, 17], "cg": [5, 17], "read_align": [5, 15], "alignment_fil": 5, "reference_sequ": [5, 16], "read": [5, 15, 19], "fasta": [5, 16, 19], "vcf": 5, "align": [5, 15, 16, 19], "id": [5, 15, 16, 19], "extens": 5, "fa": 5, "explicitli": [5, 17], "manipul": [6, 15], "counter_prod": 6, "counterlist": 6, "accumfunc": 6, "multipli": [6, 19], "realli": 6, "cartesian": [6, 19], "act": 6, "counter_sum": 6, "counter_typ": 6, "concaten": 6, "newclass": 7, "treeroot": [7, 11], "label_featur": [7, 10, 11, 14], "suitabl": [7, 11, 17], "load": [7, 11, 15, 16, 19], "getattr": [7, 11], "preced": [7, 11, 17], "overwritten": [7, 11], "ascii_compare_histori": 7, "history1": 7, "history2": 7, "name_func2": 7, "art": 7, "Will": 7, "newick_format": [7, 10, 14], "newicklist": [7, 14], "history_dag_from_clade_tre": 7, "history_dag_from_nod": 7, "targetnod": 8, "goal": 8, "lookup": [8, 17], "enforc": 8, "element": [8, 15, 19], "set_target": 8, "set_edge_stat": 8, "shallowcopi": 8, "randomli": [8, 16], "selection_funct": 8, "add_to_edgeset": 8, "noth": [8, 19], "vector": [8, 16, 17], "refseq": 15, "hdagjsonencod": 15, "skipkei": 15, "ensure_ascii": 15, "check_circular": 15, "allow_nan": 15, "sort_kei": 15, "indent": 15, "separ": [15, 19], "constructor": [15, 17, 18, 19], "jsonencod": 15, "sensibl": 15, "typeerror": 15, "encod": [15, 17], "incom": 15, "escap": 15, "circular": 15, "dure": 15, "prevent": 15, "infinit": 15, "caus": 15, "recursionerror": 15, "nan": 15, "infin": [15, 17], "behavior": [15, 19], "json": 15, "compliant": 15, "javascript": 15, "decod": 15, "valueerror": 15, "regress": 15, "dai": 15, "basi": 15, "arrai": [15, 17], "member": 15, "pretti": [15, 19], "item_separ": 15, "key_separ": 15, "elimin": [15, 16], "version": 15, "obj": 15, "serializ": 15, "o": 15, "could": 15, "def": 15, "try": 15, "els": [15, 16, 19], "nodeidhistorydag": 15, "node_id": 15, "hold": [15, 17, 18], "from_dag": [15, 18], "madag": 15, "hamming_parsim": 15, "ony_count": 15, "to_protobuf": 15, "leaf_data_func": 15, "randomize_leaf_mut": 15, "mad": 15, "node_nam": 15, "condensed_leav": 15, "append": 15, "pendant": 15, "decid": 15, "reassign": 15, "to_protobuf_fil": 15, "filenam": [15, 16], "flatten": 15, "sort_compact_genom": 15, "four": 15, "compact_genome_list": 15, "seq_idx": 15, "old_bas": 15, "new_bas": 15, "node_list": [15, 16], "label_idx": 15, "clade_list": 15, "edge_list": 15, "tripl": 15, "parent_idx": 15, "child_idx": 15, "clade_idx": 15, "test_equ": 15, "get_reference_sequ": 15, "to_json": 15, "to_json_fil": 15, "adjusted_node_prob": 15, "frequenc": 15, "ambiguousleafcghistorydag": [15, 17], "load_json_fil": 15, "unflatten": 15, "flat_dag": 15, "load_mad_protobuf": 15, "pbdata": 15, "leaf_cg": 15, "cgleafidhistorydag": 15, "contradict": 15, "conflict": 15, "load_mad_protobuf_fil": 15, "sankoff": [16, 17], "algorithm": 16, "replace_label_attr": 16, "original_label": 16, "list_of_replac": 16, "_replac": 16, "datatyp": 16, "replac": 16, "onc": 16, "caveat": 16, "make_weighted_hamming_count_func": 16, "allow_ambiguous_leav": 16, "sequence_label": 16, "sankoff_postorder_iter_accum": 16, "postorder_it": 16, "node_clade_funct": 16, "child_node_funct": 16, "re": 16, "alter": 16, "simplifi": 16, "combin": [16, 19], "sankoff_upward": 16, "seq_len": [16, 17], "sequence_attr_nam": 16, "use_internal_node_sequ": 16, "cost": [16, 17], "best": 16, "subset": [16, 17], "remain": 16, "fact": 16, "equip": 16, "transit": [16, 17], "sankoff_downward": 16, "skip_ua_children": 16, "partial_node_list": 16, "compute_cv": 16, "updat": 16, "post": 16, "run": 16, "random_st": 16, "remove_cv": 16, "adj_dist": 16, "min_ambigu": 16, "resolv": 16, "consecut": 16, "getstat": 16, "dist": 16, "reconstruct": 16, "paper": 16, "known": 16, "strictli": 16, "build_tre": 16, "newickstr": [16, 19], "fasta_map": 16, "newickformat": 16, "reference_id": 16, "ignore_internal_sequ": 16, "aren": 16, "fulli": [16, 17], "fix": [16, 19], "build_trees_from_fil": 16, "newickfil": 16, "fastafil": 16, "parsimony_scor": 16, "remove_invariant_sit": 16, "invari": 16, "parsimony_scores_from_topologi": 16, "gap_as_char": 16, "remove_invari": 16, "load_fasta": [16, 19], "gap": 16, "fifth": [16, 17], "parsimony_scores_from_fil": 16, "treefil": 16, "build_dag_from_tre": 16, "unifurc": 16, "delet": 16, "disambiguate_histori": 16, "ugli": 16, "back": 16, "treewise_sankoff_in_dag": 16, "wise": [16, 19], "forward": 17, "unittransitionmodel": 17, "unit": 17, "sitewisetransitionmodel": 17, "locat": 17, "occur": 17, "ambiguity_character_map": 17, "reversed_default": 17, "biject": [17, 19], "power": 17, "inject": 17, "made": 17, "arbitrarili": [17, 19], "is_ambigu": 17, "depth": 17, "sequence_resolution_count": 17, "get_sequence_resolution_count_func": 17, "held": 17, "reversedambiguitymap": 17, "frozendict": 17, "iupac": 17, "standard_nt_ambiguity_map_gap_as_char": 17, "exclud": 17, "agct": 17, "transition_weight": 17, "base_indic": 17, "mask_vector": 17, "matrix": 17, "get_adjacency_arrai": 17, "get_ambiguity_from_tupl": 17, "tup": 17, "character_dist": 17, "parent_char": 17, "child_char": 17, "weighted_hamming_dist": 17, "parent_seq": 17, "child_seq": 17, "sitewis": 17, "weighted_cg_hamming_dist": 17, "matric": 17, "nonzero": 17, "diagon": 17, "min_character_mut": 17, "min_character_dist": 17, "min_weighted_hamming_dist": 17, "min_weighted_cg_hamming_dist": 17, "weighted_cg_hamming_edge_weight": 17, "count_root_mut": 17, "min_weighted_hamming_edge_weight": 17, "min_weighted_cg_hamming_edge_weight": 17, "get_weighted_cg_parsimony_countfunc": 17, "leaf_ambigu": 17, "weightedparsimoni": 17, "get_weighted_parsimony_countfunc": 17, "transition_matrix": 17, "model": 17, "default_nt_gaps_transit": 17, "hamming_edge_weight": 17, "hamming_edge_weight_ambiguous_leav": 17, "hamming_cg_edge_weight": 17, "hamming_cg_edge_weight_ambiguous_leav": 17, "leaf_ambiguous_compact_genome_hamming_distance_countfunc": 17, "taxaerror": 19, "access_nodefield_default": 19, "fieldnam": 19, "decor": 19, "posit": 19, "func": 19, "access_field": 19, "someth": 19, "l1": 19, "l2": 19, "typevar": 19, "f": 19, "bound": 19, "ignore_uanod": 19, "zero": 19, "labelfield": 19, "easier": 19, "whole": 19, "cartesian_product": 19, "optionlist": 19, "accum": 19, "fresh": 19, "hist": 19, "is_collaps": 19, "collapse_adjacent_sequ": 19, "nonleaf": 19, "initialdata": 19, "primarili": 19, "becaus": 19, "linear_combin": 19, "coeff": 19, "significant_digit": 19, "linear": 19, "usabl": 19, "undefin": 19, "combat": 19, "digit": 19, "decim": 19, "signific": 19, "comparison": 19, "historydagfilt": 19, "weight_func": 19, "ordering_nam": 19, "eq": 19, "natural_edge_prob": 19, "log_natural_probability_func": 19, "explain": 19, "implicitli": 19, "d_": 19, "unroot": 19, "shift": 19, "k": 19, "ref_tre": 19, "robinson_fould": 19, "cardin": 19, "our": 19, "reli": 19, "long": 19, "independ": 19, "accommod": 19, "track": 19, "framework": 19, "regardless": 19, "sign": 19, "edge_difference_func": 19, "prod": 19, "logsumexp": 19, "numer": 19, "stabl": 19, "scipi": 19, "mutabl": 19, "indistinguish": 19, "floatstat": 19, "decimalst": 19, "strstate": 19, "binari": 19, "branch": 19, "rank": 19, "read_fasta": 19, "fastapath": 19, "sequence_typ": 19}, "objects": {"historydag": [[3, 0, 1, "", "HistoryDag"], [4, 0, 1, "", "HistoryDagNode"], [5, 2, 0, "-", "compact_genome"], [6, 2, 0, "-", "counterops"], [7, 2, 0, "-", "dag"], [8, 2, 0, "-", "dag_node"], [9, 3, 1, "", "empty_node"], [10, 3, 1, "", "from_newick"], [11, 3, 1, "", "from_tree"], [12, 3, 1, "", "history_dag_from_etes"], [13, 3, 1, "", "history_dag_from_histories"], [14, 3, 1, "", "history_dag_from_newicks"], [15, 2, 0, "-", "mutation_annotated_dag"], [16, 2, 0, "-", "parsimony"], [17, 2, 0, "-", "parsimony_utils"], [18, 2, 0, "-", "sequence_dag"], [19, 2, 0, "-", "utils"]], "historydag.HistoryDag": [[3, 1, 1, "id0", "__init__"], [3, 1, 1, "", "add_all_allowed_edges"], [3, 1, 1, "", "add_label_fields"], [3, 1, 1, "", "add_node_at_all_possible_places"], [3, 1, 1, "", "average_pairwise_rf_distance"], [3, 1, 1, "", "convert_to_collapsed"], [3, 1, 1, "", "copy"], [3, 1, 1, "", "count_edges"], [3, 1, 1, "", "count_histories"], [3, 1, 1, "", "count_nodes"], [3, 1, 1, "", "count_optimal_histories"], [3, 1, 1, "", "count_paths_to_leaf"], [3, 1, 1, "", "count_rf_distances"], [3, 1, 1, "", "count_sum_rf_distances"], [3, 1, 1, "", "count_topologies"], [3, 1, 1, "", "count_topologies_fast"], [3, 1, 1, "", "count_trees"], [3, 1, 1, "", "explode_nodes"], [3, 1, 1, "", "export_edge_probabilities"], [3, 1, 1, "", "find_node"], [3, 1, 1, "", "find_nodes"], [3, 1, 1, "", "from_history_dag"], [3, 1, 1, "", "get_annotated_edges"], [3, 1, 1, "", "get_edges"], [3, 1, 1, "", "get_histories"], [3, 1, 1, "", "get_label_type"], [3, 1, 1, "", "get_leaves"], [3, 1, 1, "", "get_probability_countfuncs"], [3, 1, 1, "", "get_topologies"], [3, 1, 1, "", "get_trees"], [3, 1, 1, "", "hamming_parsimony_count"], [3, 1, 1, "", "history_intersect"], [3, 1, 1, "", "insert_node"], [3, 1, 1, "", "internal_avg_parents"], [3, 1, 1, "", "is_clade_tree"], [3, 1, 1, "", "is_history"], [3, 1, 1, "", "iter_covering_histories"], [3, 1, 1, "", "label_uncertainty_summary"], [3, 1, 1, "", "leaf_path_uncertainty_dag"], [3, 1, 1, "", "leaf_path_uncertainty_graphviz"], [3, 1, 1, "", "make_complete"], [3, 1, 1, "", "make_uniform"], [3, 1, 1, "", "merge"], [3, 1, 1, "", "most_supported_trees"], [3, 1, 1, "", "natural_distribution_annotate"], [3, 1, 1, "", "node_probabilities"], [3, 1, 1, "", "nodes_above_node"], [3, 1, 1, "", "num_edges"], [3, 1, 1, "", "num_leaves"], [3, 1, 1, "", "num_nodes"], [3, 1, 1, "", "optimal_rf_distance"], [3, 1, 1, "", "optimal_sum_rf_distance"], [3, 1, 1, "", "optimal_weight_annotate"], [3, 1, 1, "", "overestimate_rf_diameter"], [3, 1, 1, "", "postorder"], [3, 1, 1, "", "postorder_above"], [3, 1, 1, "", "postorder_cladetree_accum"], [3, 1, 1, "", "postorder_history_accum"], [3, 1, 1, "", "preorder"], [3, 1, 1, "", "preorder_history_accum"], [3, 1, 1, "", "probability_annotate"], [3, 1, 1, "", "recompute_parents"], [3, 1, 1, "", "relabel"], [3, 1, 1, "", "remove_label_fields"], [3, 1, 1, "", "sample"], [3, 1, 1, "", "sample_with_edge"], [3, 1, 1, "", "sample_with_node"], [3, 1, 1, "", "shared_history_count"], [3, 1, 1, "", "sum_probability"], [3, 1, 1, "", "sum_rf_distances"], [3, 1, 1, "", "sum_weights"], [3, 1, 1, "", "summary"], [3, 1, 1, "", "to_ascii"], [3, 1, 1, "", "to_ete"], [3, 1, 1, "", "to_graphviz"], [3, 1, 1, "", "to_newick"], [3, 1, 1, "", "to_newicks"], [3, 1, 1, "", "trim_below_weight"], [3, 1, 1, "", "trim_optimal_rf_distance"], [3, 1, 1, "", "trim_optimal_sum_rf_distance"], [3, 1, 1, "", "trim_optimal_weight"], [3, 1, 1, "", "trim_topology"], [3, 1, 1, "", "underestimate_rf_diameter"], [3, 1, 1, "", "uniform_distribution_annotate"], [3, 1, 1, "", "unlabel"], [3, 1, 1, "", "update_label_fields"], [3, 1, 1, "", "weight_count"], [3, 1, 1, "", "weight_counts_with_ambiguities"], [3, 1, 1, "", "weight_range_annotate"]], "historydag.HistoryDagNode": [[4, 1, 1, "id0", "__init__"], [4, 1, 1, "", "add_edge"], [4, 1, 1, "", "child_clades"], [4, 1, 1, "", "children"], [4, 1, 1, "", "clade_union"], [4, 1, 1, "", "empty_copy"], [4, 1, 1, "", "is_history_root"], [4, 1, 1, "", "is_leaf"], [4, 1, 1, "", "is_root"], [4, 1, 1, "", "is_ua_node"], [4, 1, 1, "", "node_self"], [4, 1, 1, "", "partitions"], [4, 1, 1, "", "remove_node"], [4, 1, 1, "", "sorted_child_clades"], [4, 1, 1, "", "sorted_partitions"], [4, 1, 1, "", "to_ascii"], [4, 1, 1, "", "to_ete"], [4, 1, 1, "", "under_clade"]], "historydag.compact_genome": [[5, 0, 1, "", "CompactGenome"], [5, 3, 1, "", "ambiguous_cg_diff"], [5, 3, 1, "", "cg_diff"], [5, 3, 1, "", "compact_genome_from_sequence"], [5, 3, 1, "", "read_alignment"], [5, 3, 1, "", "reconcile_cgs"], [5, 3, 1, "", "unpack_mut_string"]], "historydag.compact_genome.CompactGenome": [[5, 1, 1, "", "__init__"], [5, 1, 1, "", "apply_muts"], [5, 1, 1, "", "apply_muts_raw"], [5, 1, 1, "", "get_site"], [5, 1, 1, "", "mask_sites"], [5, 1, 1, "", "mutate"], [5, 1, 1, "", "mutations_as_strings"], [5, 1, 1, "", "remove_sites"], [5, 1, 1, "", "subset_sites"], [5, 1, 1, "", "superset_sites"], [5, 1, 1, "", "to_sequence"]], "historydag.counterops": [[6, 3, 1, "", "counter_prod"], [6, 3, 1, "", "counter_sum"]], "historydag.dag": [[7, 0, 1, "", "HistoryDag"], [7, 4, 1, "", "IntersectionError"], [7, 3, 1, "", "ascii_compare_histories"], [7, 3, 1, "", "convert"], [7, 3, 1, "", "from_newick"], [7, 3, 1, "", "from_tree"], [7, 3, 1, "", "history_dag_from_clade_trees"], [7, 3, 1, "", "history_dag_from_etes"], [7, 3, 1, "", "history_dag_from_histories"], [7, 3, 1, "", "history_dag_from_newicks"], [7, 3, 1, "", "history_dag_from_nodes"], [7, 3, 1, "", "history_dag_from_trees"]], "historydag.dag.HistoryDag": [[7, 1, 1, "", "__init__"], [7, 1, 1, "", "add_all_allowed_edges"], [7, 1, 1, "", "add_label_fields"], [7, 1, 1, "", "add_node_at_all_possible_places"], [7, 1, 1, "", "average_pairwise_rf_distance"], [7, 1, 1, "", "convert_to_collapsed"], [7, 1, 1, "", "copy"], [7, 1, 1, "", "count_edges"], [7, 1, 1, "", "count_histories"], [7, 1, 1, "", "count_nodes"], [7, 1, 1, "", "count_optimal_histories"], [7, 1, 1, "", "count_paths_to_leaf"], [7, 1, 1, "", "count_rf_distances"], [7, 1, 1, "", "count_sum_rf_distances"], [7, 1, 1, "", "count_topologies"], [7, 1, 1, "", "count_topologies_fast"], [7, 1, 1, "", "count_trees"], [7, 1, 1, "", "explode_nodes"], [7, 1, 1, "", "export_edge_probabilities"], [7, 1, 1, "", "find_node"], [7, 1, 1, "", "find_nodes"], [7, 1, 1, "", "from_history_dag"], [7, 1, 1, "", "get_annotated_edges"], [7, 1, 1, "", "get_edges"], [7, 1, 1, "", "get_histories"], [7, 1, 1, "", "get_label_type"], [7, 1, 1, "", "get_leaves"], [7, 1, 1, "", "get_probability_countfuncs"], [7, 1, 1, "", "get_topologies"], [7, 1, 1, "", "get_trees"], [7, 1, 1, "", "hamming_parsimony_count"], [7, 1, 1, "", "history_intersect"], [7, 1, 1, "", "insert_node"], [7, 1, 1, "", "internal_avg_parents"], [7, 1, 1, "", "is_clade_tree"], [7, 1, 1, "", "is_history"], [7, 1, 1, "", "iter_covering_histories"], [7, 1, 1, "", "label_uncertainty_summary"], [7, 1, 1, "", "leaf_path_uncertainty_dag"], [7, 1, 1, "", "leaf_path_uncertainty_graphviz"], [7, 1, 1, "", "make_complete"], [7, 1, 1, "", "make_uniform"], [7, 1, 1, "", "merge"], [7, 1, 1, "", "most_supported_trees"], [7, 1, 1, "", "natural_distribution_annotate"], [7, 1, 1, "", "node_probabilities"], [7, 1, 1, "", "nodes_above_node"], [7, 1, 1, "", "num_edges"], [7, 1, 1, "", "num_leaves"], [7, 1, 1, "", "num_nodes"], [7, 1, 1, "", "optimal_rf_distance"], [7, 1, 1, "", "optimal_sum_rf_distance"], [7, 1, 1, "", "optimal_weight_annotate"], [7, 1, 1, "", "overestimate_rf_diameter"], [7, 1, 1, "", "postorder"], [7, 1, 1, "", "postorder_above"], [7, 1, 1, "", "postorder_cladetree_accum"], [7, 1, 1, "", "postorder_history_accum"], [7, 1, 1, "", "preorder"], [7, 1, 1, "", "preorder_history_accum"], [7, 1, 1, "", "probability_annotate"], [7, 1, 1, "", "recompute_parents"], [7, 1, 1, "", "relabel"], [7, 1, 1, "", "remove_label_fields"], [7, 1, 1, "", "sample"], [7, 1, 1, "", "sample_with_edge"], [7, 1, 1, "", "sample_with_node"], [7, 1, 1, "", "shared_history_count"], [7, 1, 1, "", "sum_probability"], [7, 1, 1, "", "sum_rf_distances"], [7, 1, 1, "", "sum_weights"], [7, 1, 1, "", "summary"], [7, 1, 1, "", "to_ascii"], [7, 1, 1, "", "to_ete"], [7, 1, 1, "", "to_graphviz"], [7, 1, 1, "", "to_newick"], [7, 1, 1, "", "to_newicks"], [7, 1, 1, "", "trim_below_weight"], [7, 1, 1, "", "trim_optimal_rf_distance"], [7, 1, 1, "", "trim_optimal_sum_rf_distance"], [7, 1, 1, "", "trim_optimal_weight"], [7, 1, 1, "", "trim_topology"], [7, 1, 1, "", "underestimate_rf_diameter"], [7, 1, 1, "", "uniform_distribution_annotate"], [7, 1, 1, "", "unlabel"], [7, 1, 1, "", "update_label_fields"], [7, 1, 1, "", "weight_count"], [7, 1, 1, "", "weight_counts_with_ambiguities"], [7, 1, 1, "", "weight_range_annotate"]], "historydag.dag_node": [[8, 0, 1, "", "EdgeSet"], [8, 0, 1, "", "HistoryDagNode"], [8, 0, 1, "", "UANode"], [8, 3, 1, "", "empty_node"]], "historydag.dag_node.EdgeSet": [[8, 1, 1, "", "__init__"], [8, 1, 1, "", "add_to_edgeset"], [8, 1, 1, "", "sample"], [8, 1, 1, "", "set_edge_stats"], [8, 1, 1, "", "set_targets"], [8, 1, 1, "", "shallowcopy"]], "historydag.dag_node.HistoryDagNode": [[8, 1, 1, "", "__init__"], [8, 1, 1, "", "add_edge"], [8, 1, 1, "", "child_clades"], [8, 1, 1, "", "children"], [8, 1, 1, "", "clade_union"], [8, 1, 1, "", "empty_copy"], [8, 1, 1, "", "is_history_root"], [8, 1, 1, "", "is_leaf"], [8, 1, 1, "", "is_root"], [8, 1, 1, "", "is_ua_node"], [8, 1, 1, "", "node_self"], [8, 1, 1, "", "partitions"], [8, 1, 1, "", "remove_node"], [8, 1, 1, "", "sorted_child_clades"], [8, 1, 1, "", "sorted_partitions"], [8, 1, 1, "", "to_ascii"], [8, 1, 1, "", "to_ete"], [8, 1, 1, "", "under_clade"]], "historydag.dag_node.UANode": [[8, 1, 1, "", "__init__"], [8, 1, 1, "", "empty_copy"], [8, 1, 1, "", "is_ua_node"]], "historydag.mutation_annotated_dag": [[15, 0, 1, "", "AmbiguousLeafCGHistoryDag"], [15, 0, 1, "", "CGHistoryDag"], [15, 0, 1, "", "HDagJSONEncoder"], [15, 0, 1, "", "NodeIDHistoryDag"], [15, 3, 1, "", "load_MAD_protobuf"], [15, 3, 1, "", "load_MAD_protobuf_file"], [15, 3, 1, "", "load_json_file"], [15, 3, 1, "", "unflatten"]], "historydag.mutation_annotated_dag.AmbiguousLeafCGHistoryDag": [[15, 1, 1, "", "hamming_parsimony_count"], [15, 1, 1, "", "summary"]], "historydag.mutation_annotated_dag.CGHistoryDag": [[15, 1, 1, "", "adjusted_node_probabilities"], [15, 1, 1, "", "flatten"], [15, 1, 1, "", "get_reference_sequence"], [15, 1, 1, "", "hamming_parsimony_count"], [15, 1, 1, "", "summary"], [15, 1, 1, "", "test_equal"], [15, 1, 1, "", "to_json"], [15, 1, 1, "", "to_json_file"], [15, 1, 1, "", "to_protobuf"], [15, 1, 1, "", "to_protobuf_file"], [15, 1, 1, "", "weight_counts_with_ambiguities"]], "historydag.mutation_annotated_dag.HDagJSONEncoder": [[15, 1, 1, "", "default"]], "historydag.parsimony": [[16, 3, 1, "", "build_dag_from_trees"], [16, 3, 1, "", "build_tree"], [16, 3, 1, "", "build_trees_from_files"], [16, 3, 1, "", "disambiguate"], [16, 3, 1, "", "disambiguate_history"], [16, 3, 1, "", "make_weighted_hamming_count_funcs"], [16, 3, 1, "", "parsimony_score"], [16, 3, 1, "", "parsimony_scores_from_files"], [16, 3, 1, "", "parsimony_scores_from_topologies"], [16, 3, 1, "", "remove_invariant_sites"], [16, 3, 1, "", "replace_label_attr"], [16, 3, 1, "", "sankoff_downward"], [16, 3, 1, "", "sankoff_postorder_iter_accum"], [16, 3, 1, "", "sankoff_upward"], [16, 3, 1, "", "treewise_sankoff_in_dag"]], "historydag.parsimony_utils": [[17, 0, 1, "", "AmbiguityMap"], [17, 0, 1, "", "ReversedAmbiguityMap"], [17, 0, 1, "", "SitewiseTransitionModel"], [17, 0, 1, "", "TransitionModel"], [17, 0, 1, "", "UnitTransitionModel"], [17, 5, 1, "", "compact_genome_hamming_distance_countfuncs"], [17, 5, 1, "", "default_nt_gaps_transitions"], [17, 5, 1, "", "default_nt_transitions"], [17, 3, 1, "", "hamming_cg_edge_weight"], [17, 3, 1, "", "hamming_cg_edge_weight_ambiguous_leaves"], [17, 5, 1, "", "hamming_distance_countfuncs"], [17, 3, 1, "", "hamming_edge_weight"], [17, 3, 1, "", "hamming_edge_weight_ambiguous_leaves"], [17, 5, 1, "", "leaf_ambiguous_compact_genome_hamming_distance_countfuncs"], [17, 5, 1, "", "leaf_ambiguous_hamming_distance_countfuncs"], [17, 5, 1, "", "standard_nt_ambiguity_map"], [17, 5, 1, "", "standard_nt_ambiguity_map_gap_as_char"]], "historydag.parsimony_utils.AmbiguityMap": [[17, 1, 1, "", "__init__"], [17, 1, 1, "", "get_sequence_resolution_count_func"], [17, 1, 1, "", "get_sequence_resolution_func"], [17, 1, 1, "", "is_ambiguous"], [17, 1, 1, "", "sequence_resolution_count"], [17, 1, 1, "", "sequence_resolutions"]], "historydag.parsimony_utils.SitewiseTransitionModel": [[17, 1, 1, "", "__init__"], [17, 1, 1, "", "character_distance"], [17, 1, 1, "", "get_adjacency_array"], [17, 1, 1, "", "min_character_mutation"]], "historydag.parsimony_utils.TransitionModel": [[17, 1, 1, "", "__init__"], [17, 1, 1, "", "character_distance"], [17, 1, 1, "", "get_adjacency_array"], [17, 1, 1, "", "get_ambiguity_from_tuple"], [17, 1, 1, "", "get_weighted_cg_parsimony_countfuncs"], [17, 1, 1, "", "get_weighted_parsimony_countfuncs"], [17, 1, 1, "", "min_character_distance"], [17, 1, 1, "", "min_character_mutation"], [17, 1, 1, "", "min_weighted_cg_hamming_distance"], [17, 1, 1, "", "min_weighted_cg_hamming_edge_weight"], [17, 1, 1, "", "min_weighted_hamming_distance"], [17, 1, 1, "", "min_weighted_hamming_edge_weight"], [17, 1, 1, "", "weighted_cg_hamming_distance"], [17, 1, 1, "", "weighted_cg_hamming_edge_weight"], [17, 1, 1, "", "weighted_hamming_distance"], [17, 1, 1, "", "weighted_hamming_edge_weight"]], "historydag.parsimony_utils.UnitTransitionModel": [[17, 1, 1, "", "__init__"], [17, 1, 1, "", "character_distance"], [17, 1, 1, "", "get_weighted_cg_parsimony_countfuncs"], [17, 1, 1, "", "get_weighted_parsimony_countfuncs"], [17, 1, 1, "", "min_character_mutation"]], "historydag.sequence_dag": [[18, 0, 1, "", "AmbiguousLeafSequenceHistoryDag"], [18, 0, 1, "", "SequenceHistoryDag"]], "historydag.sequence_dag.AmbiguousLeafSequenceHistoryDag": [[18, 1, 1, "", "hamming_parsimony_count"], [18, 1, 1, "", "summary"]], "historydag.sequence_dag.SequenceHistoryDag": [[18, 1, 1, "", "hamming_parsimony_count"], [18, 1, 1, "", "summary"]], "historydag.utils": [[19, 0, 1, "", "AddFuncDict"], [19, 0, 1, "", "DecimalState"], [19, 0, 1, "", "FloatState"], [19, 0, 1, "", "HistoryDagFilter"], [19, 0, 1, "", "IntState"], [19, 0, 1, "", "StrState"], [19, 4, 1, "", "TaxaError"], [19, 0, 1, "", "UALabel"], [19, 3, 1, "", "access_field"], [19, 3, 1, "", "access_nodefield_default"], [19, 3, 1, "", "cartesian_product"], [19, 3, 1, "", "collapse_adjacent_sequences"], [19, 3, 1, "", "count_labeled_binary_topologies"], [19, 3, 1, "", "edge_difference_funcs"], [19, 3, 1, "", "explode_label"], [19, 3, 1, "", "hist"], [19, 3, 1, "", "ignore_uanode"], [19, 3, 1, "", "is_collapsed"], [19, 3, 1, "", "load_fasta"], [19, 5, 1, "", "log_natural_probability_funcs"], [19, 3, 1, "", "logsumexp"], [19, 3, 1, "", "make_newickcountfuncs"], [19, 3, 1, "", "make_rfdistance_countfuncs"], [19, 3, 1, "", "natural_edge_probability"], [19, 5, 1, "", "node_countfuncs"], [19, 3, 1, "", "prod"], [19, 3, 1, "", "read_fasta"], [19, 3, 1, "", "sum_rfdistance_funcs"]], "historydag.utils.AddFuncDict": [[19, 1, 1, "", "__init__"], [19, 1, 1, "", "linear_combination"]], "historydag.utils.DecimalState": [[19, 1, 1, "", "__init__"]], "historydag.utils.FloatState": [[19, 1, 1, "", "__init__"]], "historydag.utils.HistoryDagFilter": [[19, 1, 1, "", "__init__"]], "historydag.utils.IntState": [[19, 1, 1, "", "__init__"]], "historydag.utils.StrState": [[19, 1, 1, "", "__init__"]]}, "objtypes": {"0": "py:class", "1": "py:method", "2": "py:module", "3": "py:function", "4": "py:exception", "5": "py:data"}, "objnames": {"0": ["py", "class", "Python class"], "1": ["py", "method", "Python method"], "2": ["py", "module", "Python module"], "3": ["py", "function", "Python function"], "4": ["py", "exception", "Python exception"], "5": ["py", "data", "Python data"]}, "titleterms": {"descript": 0, "class": [0, 2], "function": 0, "modul": 0, "historydag": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], "document": 1, "user": 1, "guid": 1, "api": 1, "indic": 1, "tabl": 1, "quickstart": 2, "The": 2, "data": 2, "structur": 2, "instal": 2, "load": 2, "tree": 2, "non": 2, "ete3": 2, "newick": 2, "basic": 2, "oper": 2, "sampl": 2, "index": 2, "iter": 2, "over": 2, "histori": 2, "merg": 2, "intersect": 2, "complet": 2, "collaps": 2, "relabel": 2, "subtyp": 2, "convers": 2, "defin": 2, "comput": 2, "weight": 2, "addfuncdict": 2, "historydagfilt": 2, "combin": 2, "export": 2, "A": 2, "quick": 2, "tour": 2, "historydagnod": 4, "compact_genom": 5, "counterop": 6, "dag": 7, "dag_nod": 8, "empty_nod": 9, "from_newick": 10, "from_tre": 11, "history_dag_from_et": 12, "history_dag_from_histori": 13, "history_dag_from_newick": 14, "mutation_annotated_dag": 15, "parsimoni": 16, "parsimony_util": 17, "sequence_dag": 18, "util": 19}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx.ext.viewcode": 1, "sphinx.ext.todo": 2, "sphinx": 60}, "alltitles": {"Description": [[0, "description"]], "Classes": [[0, "classes"]], "Functions": [[0, "functions"]], "Modules": [[0, "modules"]], "historydag documentation": [[1, "historydag-documentation"]], "User Guide": [[1, null]], "API Documentation": [[1, null]], "Indices and tables": [[1, "indices-and-tables"]], "Quickstart": [[2, "quickstart"]], "The data structure": [[2, "the-data-structure"]], "Installing": [[2, "installing"]], "Loading Tree Data": [[2, "loading-tree-data"]], "Loading Non-ete3 Tree Data:": [[2, "loading-non-ete3-tree-data"]], "Loading newick tree data:": [[2, "loading-newick-tree-data"]], "Basic HistoryDag operations": [[2, "basic-historydag-operations"]], "Sampling, Indexing, and Iterating Over Histories": [[2, "sampling-indexing-and-iterating-over-histories"]], "Merging": [[2, "merging"]], "Intersecting": [[2, "intersecting"]], "Completion": [[2, "completion"]], "Collapsing": [[2, "collapsing"]], "Relabeling": [[2, "relabeling"]], "HistoryDag Subtypes and Conversions": [[2, "historydag-subtypes-and-conversions"]], "Defining and Computing History Weights": [[2, "defining-and-computing-history-weights"]], "The AddFuncDict Class": [[2, "the-addfuncdict-class"]], "The HistoryDagFilter Class": [[2, "the-historydagfilter-class"]], "Combining Weights": [[2, "combining-weights"]], "Exporting Tree Data": [[2, "exporting-tree-data"]], "A Quick Tour": [[2, "a-quick-tour"]], "historydag.HistoryDag": [[3, "historydag-historydag"]], "historydag.HistoryDagNode": [[4, "historydag-historydagnode"]], "historydag.compact_genome": [[5, "module-historydag.compact_genome"]], "historydag.counterops": [[6, "module-historydag.counterops"]], "historydag.dag": [[7, "module-historydag.dag"]], "historydag.dag_node": [[8, "module-historydag.dag_node"]], "historydag.empty_node": [[9, "historydag-empty-node"]], "historydag.from_newick": [[10, "historydag-from-newick"]], "historydag.from_tree": [[11, "historydag-from-tree"]], "historydag.history_dag_from_etes": [[12, "historydag-history-dag-from-etes"]], "historydag.history_dag_from_histories": [[13, "historydag-history-dag-from-histories"]], "historydag.history_dag_from_newicks": [[14, "historydag-history-dag-from-newicks"]], "historydag.mutation_annotated_dag": [[15, "module-historydag.mutation_annotated_dag"]], "historydag.parsimony": [[16, "module-historydag.parsimony"]], "historydag.parsimony_utils": [[17, "module-historydag.parsimony_utils"]], "historydag.sequence_dag": [[18, "module-historydag.sequence_dag"]], "historydag.utils": [[19, "module-historydag.utils"]]}, "indexentries": {"historydag (class in historydag)": [[3, "historydag.HistoryDag"]], "__init__() (historydag.historydag method)": [[3, "historydag.HistoryDag.__init__"], [3, "id0"]], "add_all_allowed_edges() (historydag.historydag method)": [[3, "historydag.HistoryDag.add_all_allowed_edges"]], "add_label_fields() (historydag.historydag method)": [[3, "historydag.HistoryDag.add_label_fields"]], "add_node_at_all_possible_places() (historydag.historydag method)": [[3, "historydag.HistoryDag.add_node_at_all_possible_places"]], "average_pairwise_rf_distance() (historydag.historydag method)": [[3, "historydag.HistoryDag.average_pairwise_rf_distance"]], "convert_to_collapsed() (historydag.historydag method)": [[3, "historydag.HistoryDag.convert_to_collapsed"]], "copy() (historydag.historydag method)": [[3, "historydag.HistoryDag.copy"]], "count_edges() (historydag.historydag method)": [[3, "historydag.HistoryDag.count_edges"]], "count_histories() (historydag.historydag method)": [[3, "historydag.HistoryDag.count_histories"]], "count_nodes() (historydag.historydag method)": [[3, "historydag.HistoryDag.count_nodes"]], "count_optimal_histories() (historydag.historydag method)": [[3, "historydag.HistoryDag.count_optimal_histories"]], "count_paths_to_leaf() (historydag.historydag method)": [[3, "historydag.HistoryDag.count_paths_to_leaf"]], "count_rf_distances() (historydag.historydag method)": [[3, "historydag.HistoryDag.count_rf_distances"]], "count_sum_rf_distances() (historydag.historydag method)": [[3, "historydag.HistoryDag.count_sum_rf_distances"]], "count_topologies() (historydag.historydag method)": [[3, "historydag.HistoryDag.count_topologies"]], "count_topologies_fast() (historydag.historydag method)": [[3, "historydag.HistoryDag.count_topologies_fast"]], "count_trees() (historydag.historydag method)": [[3, "historydag.HistoryDag.count_trees"]], "explode_nodes() (historydag.historydag method)": [[3, "historydag.HistoryDag.explode_nodes"]], "export_edge_probabilities() (historydag.historydag method)": [[3, "historydag.HistoryDag.export_edge_probabilities"]], "find_node() (historydag.historydag method)": [[3, "historydag.HistoryDag.find_node"]], "find_nodes() (historydag.historydag method)": [[3, "historydag.HistoryDag.find_nodes"]], "from_history_dag() (historydag.historydag class method)": [[3, "historydag.HistoryDag.from_history_dag"]], "get_annotated_edges() (historydag.historydag method)": [[3, "historydag.HistoryDag.get_annotated_edges"]], "get_edges() (historydag.historydag method)": [[3, "historydag.HistoryDag.get_edges"]], "get_histories() (historydag.historydag method)": [[3, "historydag.HistoryDag.get_histories"]], "get_label_type() (historydag.historydag method)": [[3, "historydag.HistoryDag.get_label_type"]], "get_leaves() (historydag.historydag method)": [[3, "historydag.HistoryDag.get_leaves"]], "get_probability_countfuncs() (historydag.historydag method)": [[3, "historydag.HistoryDag.get_probability_countfuncs"]], "get_topologies() (historydag.historydag method)": [[3, "historydag.HistoryDag.get_topologies"]], "get_trees() (historydag.historydag method)": [[3, "historydag.HistoryDag.get_trees"]], "hamming_parsimony_count() (historydag.historydag method)": [[3, "historydag.HistoryDag.hamming_parsimony_count"]], "history_intersect() (historydag.historydag method)": [[3, "historydag.HistoryDag.history_intersect"]], "insert_node() (historydag.historydag method)": [[3, "historydag.HistoryDag.insert_node"]], "internal_avg_parents() (historydag.historydag method)": [[3, "historydag.HistoryDag.internal_avg_parents"]], "is_clade_tree() (historydag.historydag method)": [[3, "historydag.HistoryDag.is_clade_tree"]], "is_history() (historydag.historydag method)": [[3, "historydag.HistoryDag.is_history"]], "iter_covering_histories() (historydag.historydag method)": [[3, "historydag.HistoryDag.iter_covering_histories"]], "label_uncertainty_summary() (historydag.historydag method)": [[3, "historydag.HistoryDag.label_uncertainty_summary"]], "leaf_path_uncertainty_dag() (historydag.historydag method)": [[3, "historydag.HistoryDag.leaf_path_uncertainty_dag"]], "leaf_path_uncertainty_graphviz() (historydag.historydag method)": [[3, "historydag.HistoryDag.leaf_path_uncertainty_graphviz"]], "make_complete() (historydag.historydag method)": [[3, "historydag.HistoryDag.make_complete"]], "make_uniform() (historydag.historydag method)": [[3, "historydag.HistoryDag.make_uniform"]], "merge() (historydag.historydag method)": [[3, "historydag.HistoryDag.merge"]], "most_supported_trees() (historydag.historydag method)": [[3, "historydag.HistoryDag.most_supported_trees"]], "natural_distribution_annotate() (historydag.historydag method)": [[3, "historydag.HistoryDag.natural_distribution_annotate"]], "node_probabilities() (historydag.historydag method)": [[3, "historydag.HistoryDag.node_probabilities"]], "nodes_above_node() (historydag.historydag method)": [[3, "historydag.HistoryDag.nodes_above_node"]], "num_edges() (historydag.historydag method)": [[3, "historydag.HistoryDag.num_edges"]], "num_leaves() (historydag.historydag method)": [[3, "historydag.HistoryDag.num_leaves"]], "num_nodes() (historydag.historydag method)": [[3, "historydag.HistoryDag.num_nodes"]], "optimal_rf_distance() (historydag.historydag method)": [[3, "historydag.HistoryDag.optimal_rf_distance"]], "optimal_sum_rf_distance() (historydag.historydag method)": [[3, "historydag.HistoryDag.optimal_sum_rf_distance"]], "optimal_weight_annotate() (historydag.historydag method)": [[3, "historydag.HistoryDag.optimal_weight_annotate"]], "overestimate_rf_diameter() (historydag.historydag method)": [[3, "historydag.HistoryDag.overestimate_rf_diameter"]], "postorder() (historydag.historydag method)": [[3, "historydag.HistoryDag.postorder"]], "postorder_above() (historydag.historydag method)": [[3, "historydag.HistoryDag.postorder_above"]], "postorder_cladetree_accum() (historydag.historydag method)": [[3, "historydag.HistoryDag.postorder_cladetree_accum"]], "postorder_history_accum() (historydag.historydag method)": [[3, "historydag.HistoryDag.postorder_history_accum"]], "preorder() (historydag.historydag method)": [[3, "historydag.HistoryDag.preorder"]], "preorder_history_accum() (historydag.historydag method)": [[3, "historydag.HistoryDag.preorder_history_accum"]], "probability_annotate() (historydag.historydag method)": [[3, "historydag.HistoryDag.probability_annotate"]], "recompute_parents() (historydag.historydag method)": [[3, "historydag.HistoryDag.recompute_parents"]], "relabel() (historydag.historydag method)": [[3, "historydag.HistoryDag.relabel"]], "remove_label_fields() (historydag.historydag method)": [[3, "historydag.HistoryDag.remove_label_fields"]], "sample() (historydag.historydag method)": [[3, "historydag.HistoryDag.sample"]], "sample_with_edge() (historydag.historydag method)": [[3, "historydag.HistoryDag.sample_with_edge"]], "sample_with_node() (historydag.historydag method)": [[3, "historydag.HistoryDag.sample_with_node"]], "shared_history_count() (historydag.historydag method)": [[3, "historydag.HistoryDag.shared_history_count"]], "sum_probability() (historydag.historydag method)": [[3, "historydag.HistoryDag.sum_probability"]], "sum_rf_distances() (historydag.historydag method)": [[3, "historydag.HistoryDag.sum_rf_distances"]], "sum_weights() (historydag.historydag method)": [[3, "historydag.HistoryDag.sum_weights"]], "summary() (historydag.historydag method)": [[3, "historydag.HistoryDag.summary"]], "to_ascii() (historydag.historydag method)": [[3, "historydag.HistoryDag.to_ascii"]], "to_ete() (historydag.historydag method)": [[3, "historydag.HistoryDag.to_ete"]], "to_graphviz() (historydag.historydag method)": [[3, "historydag.HistoryDag.to_graphviz"]], "to_newick() (historydag.historydag method)": [[3, "historydag.HistoryDag.to_newick"]], "to_newicks() (historydag.historydag method)": [[3, "historydag.HistoryDag.to_newicks"]], "trim_below_weight() (historydag.historydag method)": [[3, "historydag.HistoryDag.trim_below_weight"]], "trim_optimal_rf_distance() (historydag.historydag method)": [[3, "historydag.HistoryDag.trim_optimal_rf_distance"]], "trim_optimal_sum_rf_distance() (historydag.historydag method)": [[3, "historydag.HistoryDag.trim_optimal_sum_rf_distance"]], "trim_optimal_weight() (historydag.historydag method)": [[3, "historydag.HistoryDag.trim_optimal_weight"]], "trim_topology() (historydag.historydag method)": [[3, "historydag.HistoryDag.trim_topology"]], "underestimate_rf_diameter() (historydag.historydag method)": [[3, "historydag.HistoryDag.underestimate_rf_diameter"]], "uniform_distribution_annotate() (historydag.historydag method)": [[3, "historydag.HistoryDag.uniform_distribution_annotate"]], "unlabel() (historydag.historydag method)": [[3, "historydag.HistoryDag.unlabel"]], "update_label_fields() (historydag.historydag method)": [[3, "historydag.HistoryDag.update_label_fields"]], "weight_count() (historydag.historydag method)": [[3, "historydag.HistoryDag.weight_count"]], "weight_counts_with_ambiguities() (historydag.historydag method)": [[3, "historydag.HistoryDag.weight_counts_with_ambiguities"]], "weight_range_annotate() (historydag.historydag method)": [[3, "historydag.HistoryDag.weight_range_annotate"]], "historydagnode (class in historydag)": [[4, "historydag.HistoryDagNode"]], "__init__() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.__init__"], [4, "id0"]], "add_edge() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.add_edge"]], "child_clades() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.child_clades"]], "children() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.children"]], "clade_union() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.clade_union"]], "empty_copy() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.empty_copy"]], "is_history_root() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.is_history_root"]], "is_leaf() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.is_leaf"]], "is_root() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.is_root"]], "is_ua_node() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.is_ua_node"]], "node_self() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.node_self"]], "partitions() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.partitions"]], "remove_node() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.remove_node"]], "sorted_child_clades() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.sorted_child_clades"]], "sorted_partitions() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.sorted_partitions"]], "to_ascii() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.to_ascii"]], "to_ete() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.to_ete"]], "under_clade() (historydag.historydagnode method)": [[4, "historydag.HistoryDagNode.under_clade"]], "compactgenome (class in historydag.compact_genome)": [[5, "historydag.compact_genome.CompactGenome"]], "__init__() (historydag.compact_genome.compactgenome method)": [[5, "historydag.compact_genome.CompactGenome.__init__"]], "ambiguous_cg_diff() (in module historydag.compact_genome)": [[5, "historydag.compact_genome.ambiguous_cg_diff"]], "apply_muts() (historydag.compact_genome.compactgenome method)": [[5, "historydag.compact_genome.CompactGenome.apply_muts"]], "apply_muts_raw() (historydag.compact_genome.compactgenome method)": [[5, "historydag.compact_genome.CompactGenome.apply_muts_raw"]], "cg_diff() (in module historydag.compact_genome)": [[5, "historydag.compact_genome.cg_diff"]], "compact_genome_from_sequence() (in module historydag.compact_genome)": [[5, "historydag.compact_genome.compact_genome_from_sequence"]], "get_site() (historydag.compact_genome.compactgenome method)": [[5, "historydag.compact_genome.CompactGenome.get_site"]], "historydag.compact_genome": [[5, "module-historydag.compact_genome"]], "mask_sites() (historydag.compact_genome.compactgenome method)": [[5, "historydag.compact_genome.CompactGenome.mask_sites"]], "module": [[5, "module-historydag.compact_genome"], [6, "module-historydag.counterops"], [7, "module-historydag.dag"], [8, "module-historydag.dag_node"], [15, "module-historydag.mutation_annotated_dag"], [16, "module-historydag.parsimony"], [17, "module-historydag.parsimony_utils"], [18, "module-historydag.sequence_dag"], [19, "module-historydag.utils"]], "mutate() (historydag.compact_genome.compactgenome method)": [[5, "historydag.compact_genome.CompactGenome.mutate"]], "mutations_as_strings() (historydag.compact_genome.compactgenome method)": [[5, "historydag.compact_genome.CompactGenome.mutations_as_strings"]], "read_alignment() (in module historydag.compact_genome)": [[5, "historydag.compact_genome.read_alignment"]], "reconcile_cgs() (in module historydag.compact_genome)": [[5, "historydag.compact_genome.reconcile_cgs"]], "remove_sites() (historydag.compact_genome.compactgenome method)": [[5, "historydag.compact_genome.CompactGenome.remove_sites"]], "subset_sites() (historydag.compact_genome.compactgenome method)": [[5, "historydag.compact_genome.CompactGenome.subset_sites"]], "superset_sites() (historydag.compact_genome.compactgenome method)": [[5, "historydag.compact_genome.CompactGenome.superset_sites"]], "to_sequence() (historydag.compact_genome.compactgenome method)": [[5, "historydag.compact_genome.CompactGenome.to_sequence"]], "unpack_mut_string() (in module historydag.compact_genome)": [[5, "historydag.compact_genome.unpack_mut_string"]], "counter_prod() (in module historydag.counterops)": [[6, "historydag.counterops.counter_prod"]], "counter_sum() (in module historydag.counterops)": [[6, "historydag.counterops.counter_sum"]], "historydag.counterops": [[6, "module-historydag.counterops"]], "historydag (class in historydag.dag)": [[7, "historydag.dag.HistoryDag"]], "intersectionerror": [[7, "historydag.dag.IntersectionError"]], "__init__() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.__init__"]], "add_all_allowed_edges() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.add_all_allowed_edges"]], "add_label_fields() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.add_label_fields"]], "add_node_at_all_possible_places() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.add_node_at_all_possible_places"]], "ascii_compare_histories() (in module historydag.dag)": [[7, "historydag.dag.ascii_compare_histories"]], "average_pairwise_rf_distance() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.average_pairwise_rf_distance"]], "convert() (in module historydag.dag)": [[7, "historydag.dag.convert"]], "convert_to_collapsed() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.convert_to_collapsed"]], "copy() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.copy"]], "count_edges() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.count_edges"]], "count_histories() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.count_histories"]], "count_nodes() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.count_nodes"]], "count_optimal_histories() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.count_optimal_histories"]], "count_paths_to_leaf() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.count_paths_to_leaf"]], "count_rf_distances() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.count_rf_distances"]], "count_sum_rf_distances() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.count_sum_rf_distances"]], "count_topologies() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.count_topologies"]], "count_topologies_fast() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.count_topologies_fast"]], "count_trees() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.count_trees"]], "explode_nodes() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.explode_nodes"]], "export_edge_probabilities() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.export_edge_probabilities"]], "find_node() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.find_node"]], "find_nodes() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.find_nodes"]], "from_history_dag() (historydag.dag.historydag class method)": [[7, "historydag.dag.HistoryDag.from_history_dag"]], "from_newick() (in module historydag.dag)": [[7, "historydag.dag.from_newick"]], "from_tree() (in module historydag.dag)": [[7, "historydag.dag.from_tree"]], "get_annotated_edges() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.get_annotated_edges"]], "get_edges() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.get_edges"]], "get_histories() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.get_histories"]], "get_label_type() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.get_label_type"]], "get_leaves() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.get_leaves"]], "get_probability_countfuncs() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.get_probability_countfuncs"]], "get_topologies() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.get_topologies"]], "get_trees() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.get_trees"]], "hamming_parsimony_count() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.hamming_parsimony_count"]], "history_dag_from_clade_trees() (in module historydag.dag)": [[7, "historydag.dag.history_dag_from_clade_trees"]], "history_dag_from_etes() (in module historydag.dag)": [[7, "historydag.dag.history_dag_from_etes"]], "history_dag_from_histories() (in module historydag.dag)": [[7, "historydag.dag.history_dag_from_histories"]], "history_dag_from_newicks() (in module historydag.dag)": [[7, "historydag.dag.history_dag_from_newicks"]], "history_dag_from_nodes() (in module historydag.dag)": [[7, "historydag.dag.history_dag_from_nodes"]], "history_dag_from_trees() (in module historydag.dag)": [[7, "historydag.dag.history_dag_from_trees"]], "history_intersect() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.history_intersect"]], "historydag.dag": [[7, "module-historydag.dag"]], "insert_node() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.insert_node"]], "internal_avg_parents() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.internal_avg_parents"]], "is_clade_tree() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.is_clade_tree"]], "is_history() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.is_history"]], "iter_covering_histories() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.iter_covering_histories"]], "label_uncertainty_summary() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.label_uncertainty_summary"]], "leaf_path_uncertainty_dag() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.leaf_path_uncertainty_dag"]], "leaf_path_uncertainty_graphviz() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.leaf_path_uncertainty_graphviz"]], "make_complete() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.make_complete"]], "make_uniform() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.make_uniform"]], "merge() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.merge"]], "most_supported_trees() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.most_supported_trees"]], "natural_distribution_annotate() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.natural_distribution_annotate"]], "node_probabilities() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.node_probabilities"]], "nodes_above_node() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.nodes_above_node"]], "num_edges() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.num_edges"]], "num_leaves() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.num_leaves"]], "num_nodes() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.num_nodes"]], "optimal_rf_distance() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.optimal_rf_distance"]], "optimal_sum_rf_distance() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.optimal_sum_rf_distance"]], "optimal_weight_annotate() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.optimal_weight_annotate"]], "overestimate_rf_diameter() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.overestimate_rf_diameter"]], "postorder() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.postorder"]], "postorder_above() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.postorder_above"]], "postorder_cladetree_accum() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.postorder_cladetree_accum"]], "postorder_history_accum() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.postorder_history_accum"]], "preorder() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.preorder"]], "preorder_history_accum() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.preorder_history_accum"]], "probability_annotate() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.probability_annotate"]], "recompute_parents() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.recompute_parents"]], "relabel() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.relabel"]], "remove_label_fields() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.remove_label_fields"]], "sample() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.sample"]], "sample_with_edge() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.sample_with_edge"]], "sample_with_node() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.sample_with_node"]], "shared_history_count() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.shared_history_count"]], "sum_probability() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.sum_probability"]], "sum_rf_distances() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.sum_rf_distances"]], "sum_weights() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.sum_weights"]], "summary() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.summary"]], "to_ascii() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.to_ascii"]], "to_ete() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.to_ete"]], "to_graphviz() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.to_graphviz"]], "to_newick() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.to_newick"]], "to_newicks() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.to_newicks"]], "trim_below_weight() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.trim_below_weight"]], "trim_optimal_rf_distance() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.trim_optimal_rf_distance"]], "trim_optimal_sum_rf_distance() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.trim_optimal_sum_rf_distance"]], "trim_optimal_weight() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.trim_optimal_weight"]], "trim_topology() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.trim_topology"]], "underestimate_rf_diameter() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.underestimate_rf_diameter"]], "uniform_distribution_annotate() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.uniform_distribution_annotate"]], "unlabel() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.unlabel"]], "update_label_fields() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.update_label_fields"]], "weight_count() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.weight_count"]], "weight_counts_with_ambiguities() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.weight_counts_with_ambiguities"]], "weight_range_annotate() (historydag.dag.historydag method)": [[7, "historydag.dag.HistoryDag.weight_range_annotate"]], "edgeset (class in historydag.dag_node)": [[8, "historydag.dag_node.EdgeSet"]], "historydagnode (class in historydag.dag_node)": [[8, "historydag.dag_node.HistoryDagNode"]], "uanode (class in historydag.dag_node)": [[8, "historydag.dag_node.UANode"]], "__init__() (historydag.dag_node.edgeset method)": [[8, "historydag.dag_node.EdgeSet.__init__"]], "__init__() (historydag.dag_node.historydagnode method)": [[8, "historydag.dag_node.HistoryDagNode.__init__"]], "__init__() (historydag.dag_node.uanode method)": [[8, "historydag.dag_node.UANode.__init__"]], "add_edge() (historydag.dag_node.historydagnode method)": [[8, "historydag.dag_node.HistoryDagNode.add_edge"]], "add_to_edgeset() (historydag.dag_node.edgeset method)": [[8, "historydag.dag_node.EdgeSet.add_to_edgeset"]], "child_clades() (historydag.dag_node.historydagnode method)": [[8, "historydag.dag_node.HistoryDagNode.child_clades"]], "children() (historydag.dag_node.historydagnode method)": [[8, "historydag.dag_node.HistoryDagNode.children"]], "clade_union() (historydag.dag_node.historydagnode method)": [[8, "historydag.dag_node.HistoryDagNode.clade_union"]], "empty_copy() (historydag.dag_node.historydagnode method)": [[8, "historydag.dag_node.HistoryDagNode.empty_copy"]], "empty_copy() (historydag.dag_node.uanode method)": [[8, "historydag.dag_node.UANode.empty_copy"]], "empty_node() (in module historydag.dag_node)": [[8, "historydag.dag_node.empty_node"]], "historydag.dag_node": [[8, "module-historydag.dag_node"]], "is_history_root() (historydag.dag_node.historydagnode method)": [[8, "historydag.dag_node.HistoryDagNode.is_history_root"]], "is_leaf() (historydag.dag_node.historydagnode method)": [[8, "historydag.dag_node.HistoryDagNode.is_leaf"]], "is_root() (historydag.dag_node.historydagnode method)": [[8, "historydag.dag_node.HistoryDagNode.is_root"]], "is_ua_node() (historydag.dag_node.historydagnode method)": [[8, "historydag.dag_node.HistoryDagNode.is_ua_node"]], "is_ua_node() (historydag.dag_node.uanode method)": [[8, "historydag.dag_node.UANode.is_ua_node"]], "node_self() (historydag.dag_node.historydagnode method)": [[8, "historydag.dag_node.HistoryDagNode.node_self"]], "partitions() (historydag.dag_node.historydagnode method)": [[8, "historydag.dag_node.HistoryDagNode.partitions"]], "remove_node() (historydag.dag_node.historydagnode method)": [[8, "historydag.dag_node.HistoryDagNode.remove_node"]], "sample() (historydag.dag_node.edgeset method)": [[8, "historydag.dag_node.EdgeSet.sample"]], "set_edge_stats() (historydag.dag_node.edgeset method)": [[8, "historydag.dag_node.EdgeSet.set_edge_stats"]], "set_targets() (historydag.dag_node.edgeset method)": [[8, "historydag.dag_node.EdgeSet.set_targets"]], "shallowcopy() (historydag.dag_node.edgeset method)": [[8, "historydag.dag_node.EdgeSet.shallowcopy"]], "sorted_child_clades() (historydag.dag_node.historydagnode method)": [[8, "historydag.dag_node.HistoryDagNode.sorted_child_clades"]], "sorted_partitions() (historydag.dag_node.historydagnode method)": [[8, "historydag.dag_node.HistoryDagNode.sorted_partitions"]], "to_ascii() (historydag.dag_node.historydagnode method)": [[8, "historydag.dag_node.HistoryDagNode.to_ascii"]], "to_ete() (historydag.dag_node.historydagnode method)": [[8, "historydag.dag_node.HistoryDagNode.to_ete"]], "under_clade() (historydag.dag_node.historydagnode method)": [[8, "historydag.dag_node.HistoryDagNode.under_clade"]], "empty_node() (in module historydag)": [[9, "historydag.empty_node"]], "from_newick() (in module historydag)": [[10, "historydag.from_newick"]], "from_tree() (in module historydag)": [[11, "historydag.from_tree"]], "history_dag_from_etes() (in module historydag)": [[12, "historydag.history_dag_from_etes"]], "history_dag_from_histories() (in module historydag)": [[13, "historydag.history_dag_from_histories"]], "history_dag_from_newicks() (in module historydag)": [[14, "historydag.history_dag_from_newicks"]], "ambiguousleafcghistorydag (class in historydag.mutation_annotated_dag)": [[15, "historydag.mutation_annotated_dag.AmbiguousLeafCGHistoryDag"]], "cghistorydag (class in historydag.mutation_annotated_dag)": [[15, "historydag.mutation_annotated_dag.CGHistoryDag"]], "hdagjsonencoder (class in historydag.mutation_annotated_dag)": [[15, "historydag.mutation_annotated_dag.HDagJSONEncoder"]], "nodeidhistorydag (class in historydag.mutation_annotated_dag)": [[15, "historydag.mutation_annotated_dag.NodeIDHistoryDag"]], "adjusted_node_probabilities() (historydag.mutation_annotated_dag.cghistorydag method)": [[15, "historydag.mutation_annotated_dag.CGHistoryDag.adjusted_node_probabilities"]], "default() (historydag.mutation_annotated_dag.hdagjsonencoder method)": [[15, "historydag.mutation_annotated_dag.HDagJSONEncoder.default"]], "flatten() (historydag.mutation_annotated_dag.cghistorydag method)": [[15, "historydag.mutation_annotated_dag.CGHistoryDag.flatten"]], "get_reference_sequence() (historydag.mutation_annotated_dag.cghistorydag method)": [[15, "historydag.mutation_annotated_dag.CGHistoryDag.get_reference_sequence"]], "hamming_parsimony_count() (historydag.mutation_annotated_dag.ambiguousleafcghistorydag method)": [[15, "historydag.mutation_annotated_dag.AmbiguousLeafCGHistoryDag.hamming_parsimony_count"]], "hamming_parsimony_count() (historydag.mutation_annotated_dag.cghistorydag method)": [[15, "historydag.mutation_annotated_dag.CGHistoryDag.hamming_parsimony_count"]], "historydag.mutation_annotated_dag": [[15, "module-historydag.mutation_annotated_dag"]], "load_mad_protobuf() (in module historydag.mutation_annotated_dag)": [[15, "historydag.mutation_annotated_dag.load_MAD_protobuf"]], "load_mad_protobuf_file() (in module historydag.mutation_annotated_dag)": [[15, "historydag.mutation_annotated_dag.load_MAD_protobuf_file"]], "load_json_file() (in module historydag.mutation_annotated_dag)": [[15, "historydag.mutation_annotated_dag.load_json_file"]], "summary() (historydag.mutation_annotated_dag.ambiguousleafcghistorydag method)": [[15, "historydag.mutation_annotated_dag.AmbiguousLeafCGHistoryDag.summary"]], "summary() (historydag.mutation_annotated_dag.cghistorydag method)": [[15, "historydag.mutation_annotated_dag.CGHistoryDag.summary"]], "test_equal() (historydag.mutation_annotated_dag.cghistorydag method)": [[15, "historydag.mutation_annotated_dag.CGHistoryDag.test_equal"]], "to_json() (historydag.mutation_annotated_dag.cghistorydag method)": [[15, "historydag.mutation_annotated_dag.CGHistoryDag.to_json"]], "to_json_file() (historydag.mutation_annotated_dag.cghistorydag method)": [[15, "historydag.mutation_annotated_dag.CGHistoryDag.to_json_file"]], "to_protobuf() (historydag.mutation_annotated_dag.cghistorydag method)": [[15, "historydag.mutation_annotated_dag.CGHistoryDag.to_protobuf"]], "to_protobuf_file() (historydag.mutation_annotated_dag.cghistorydag method)": [[15, "historydag.mutation_annotated_dag.CGHistoryDag.to_protobuf_file"]], "unflatten() (in module historydag.mutation_annotated_dag)": [[15, "historydag.mutation_annotated_dag.unflatten"]], "weight_counts_with_ambiguities() (historydag.mutation_annotated_dag.cghistorydag method)": [[15, "historydag.mutation_annotated_dag.CGHistoryDag.weight_counts_with_ambiguities"]], "build_dag_from_trees() (in module historydag.parsimony)": [[16, "historydag.parsimony.build_dag_from_trees"]], "build_tree() (in module historydag.parsimony)": [[16, "historydag.parsimony.build_tree"]], "build_trees_from_files() (in module historydag.parsimony)": [[16, "historydag.parsimony.build_trees_from_files"]], "disambiguate() (in module historydag.parsimony)": [[16, "historydag.parsimony.disambiguate"]], "disambiguate_history() (in module historydag.parsimony)": [[16, "historydag.parsimony.disambiguate_history"]], "historydag.parsimony": [[16, "module-historydag.parsimony"]], "make_weighted_hamming_count_funcs() (in module historydag.parsimony)": [[16, "historydag.parsimony.make_weighted_hamming_count_funcs"]], "parsimony_score() (in module historydag.parsimony)": [[16, "historydag.parsimony.parsimony_score"]], "parsimony_scores_from_files() (in module historydag.parsimony)": [[16, "historydag.parsimony.parsimony_scores_from_files"]], "parsimony_scores_from_topologies() (in module historydag.parsimony)": [[16, "historydag.parsimony.parsimony_scores_from_topologies"]], "remove_invariant_sites() (in module historydag.parsimony)": [[16, "historydag.parsimony.remove_invariant_sites"]], "replace_label_attr() (in module historydag.parsimony)": [[16, "historydag.parsimony.replace_label_attr"]], "sankoff_downward() (in module historydag.parsimony)": [[16, "historydag.parsimony.sankoff_downward"]], "sankoff_postorder_iter_accum() (in module historydag.parsimony)": [[16, "historydag.parsimony.sankoff_postorder_iter_accum"]], "sankoff_upward() (in module historydag.parsimony)": [[16, "historydag.parsimony.sankoff_upward"]], "treewise_sankoff_in_dag() (in module historydag.parsimony)": [[16, "historydag.parsimony.treewise_sankoff_in_dag"]], "ambiguitymap (class in historydag.parsimony_utils)": [[17, "historydag.parsimony_utils.AmbiguityMap"]], "reversedambiguitymap (class in historydag.parsimony_utils)": [[17, "historydag.parsimony_utils.ReversedAmbiguityMap"]], "sitewisetransitionmodel (class in historydag.parsimony_utils)": [[17, "historydag.parsimony_utils.SitewiseTransitionModel"]], "transitionmodel (class in historydag.parsimony_utils)": [[17, "historydag.parsimony_utils.TransitionModel"]], "unittransitionmodel (class in historydag.parsimony_utils)": [[17, "historydag.parsimony_utils.UnitTransitionModel"]], "__init__() (historydag.parsimony_utils.ambiguitymap method)": [[17, "historydag.parsimony_utils.AmbiguityMap.__init__"]], "__init__() (historydag.parsimony_utils.sitewisetransitionmodel method)": [[17, "historydag.parsimony_utils.SitewiseTransitionModel.__init__"]], "__init__() (historydag.parsimony_utils.transitionmodel method)": [[17, "historydag.parsimony_utils.TransitionModel.__init__"]], "__init__() (historydag.parsimony_utils.unittransitionmodel method)": [[17, "historydag.parsimony_utils.UnitTransitionModel.__init__"]], "character_distance() (historydag.parsimony_utils.sitewisetransitionmodel method)": [[17, "historydag.parsimony_utils.SitewiseTransitionModel.character_distance"]], "character_distance() (historydag.parsimony_utils.transitionmodel method)": [[17, "historydag.parsimony_utils.TransitionModel.character_distance"]], "character_distance() (historydag.parsimony_utils.unittransitionmodel method)": [[17, "historydag.parsimony_utils.UnitTransitionModel.character_distance"]], "compact_genome_hamming_distance_countfuncs (in module historydag.parsimony_utils)": [[17, "historydag.parsimony_utils.compact_genome_hamming_distance_countfuncs"]], "default_nt_gaps_transitions (in module historydag.parsimony_utils)": [[17, "historydag.parsimony_utils.default_nt_gaps_transitions"]], "default_nt_transitions (in module historydag.parsimony_utils)": [[17, "historydag.parsimony_utils.default_nt_transitions"]], "get_adjacency_array() (historydag.parsimony_utils.sitewisetransitionmodel method)": [[17, "historydag.parsimony_utils.SitewiseTransitionModel.get_adjacency_array"]], "get_adjacency_array() (historydag.parsimony_utils.transitionmodel method)": [[17, "historydag.parsimony_utils.TransitionModel.get_adjacency_array"]], "get_ambiguity_from_tuple() (historydag.parsimony_utils.transitionmodel method)": [[17, "historydag.parsimony_utils.TransitionModel.get_ambiguity_from_tuple"]], "get_sequence_resolution_count_func() (historydag.parsimony_utils.ambiguitymap method)": [[17, "historydag.parsimony_utils.AmbiguityMap.get_sequence_resolution_count_func"]], "get_sequence_resolution_func() (historydag.parsimony_utils.ambiguitymap method)": [[17, "historydag.parsimony_utils.AmbiguityMap.get_sequence_resolution_func"]], "get_weighted_cg_parsimony_countfuncs() (historydag.parsimony_utils.transitionmodel method)": [[17, "historydag.parsimony_utils.TransitionModel.get_weighted_cg_parsimony_countfuncs"]], "get_weighted_cg_parsimony_countfuncs() (historydag.parsimony_utils.unittransitionmodel method)": [[17, "historydag.parsimony_utils.UnitTransitionModel.get_weighted_cg_parsimony_countfuncs"]], "get_weighted_parsimony_countfuncs() (historydag.parsimony_utils.transitionmodel method)": [[17, "historydag.parsimony_utils.TransitionModel.get_weighted_parsimony_countfuncs"]], "get_weighted_parsimony_countfuncs() (historydag.parsimony_utils.unittransitionmodel method)": [[17, "historydag.parsimony_utils.UnitTransitionModel.get_weighted_parsimony_countfuncs"]], "hamming_cg_edge_weight() (in module historydag.parsimony_utils)": [[17, "historydag.parsimony_utils.hamming_cg_edge_weight"]], "hamming_cg_edge_weight_ambiguous_leaves() (in module historydag.parsimony_utils)": [[17, "historydag.parsimony_utils.hamming_cg_edge_weight_ambiguous_leaves"]], "hamming_distance_countfuncs (in module historydag.parsimony_utils)": [[17, "historydag.parsimony_utils.hamming_distance_countfuncs"]], "hamming_edge_weight() (in module historydag.parsimony_utils)": [[17, "historydag.parsimony_utils.hamming_edge_weight"]], "hamming_edge_weight_ambiguous_leaves() (in module historydag.parsimony_utils)": [[17, "historydag.parsimony_utils.hamming_edge_weight_ambiguous_leaves"]], "historydag.parsimony_utils": [[17, "module-historydag.parsimony_utils"]], "is_ambiguous() (historydag.parsimony_utils.ambiguitymap method)": [[17, "historydag.parsimony_utils.AmbiguityMap.is_ambiguous"]], "leaf_ambiguous_compact_genome_hamming_distance_countfuncs (in module historydag.parsimony_utils)": [[17, "historydag.parsimony_utils.leaf_ambiguous_compact_genome_hamming_distance_countfuncs"]], "leaf_ambiguous_hamming_distance_countfuncs (in module historydag.parsimony_utils)": [[17, "historydag.parsimony_utils.leaf_ambiguous_hamming_distance_countfuncs"]], "min_character_distance() (historydag.parsimony_utils.transitionmodel method)": [[17, "historydag.parsimony_utils.TransitionModel.min_character_distance"]], "min_character_mutation() (historydag.parsimony_utils.sitewisetransitionmodel method)": [[17, "historydag.parsimony_utils.SitewiseTransitionModel.min_character_mutation"]], "min_character_mutation() (historydag.parsimony_utils.transitionmodel method)": [[17, "historydag.parsimony_utils.TransitionModel.min_character_mutation"]], "min_character_mutation() (historydag.parsimony_utils.unittransitionmodel method)": [[17, "historydag.parsimony_utils.UnitTransitionModel.min_character_mutation"]], "min_weighted_cg_hamming_distance() (historydag.parsimony_utils.transitionmodel method)": [[17, "historydag.parsimony_utils.TransitionModel.min_weighted_cg_hamming_distance"]], "min_weighted_cg_hamming_edge_weight() (historydag.parsimony_utils.transitionmodel method)": [[17, "historydag.parsimony_utils.TransitionModel.min_weighted_cg_hamming_edge_weight"]], "min_weighted_hamming_distance() (historydag.parsimony_utils.transitionmodel method)": [[17, "historydag.parsimony_utils.TransitionModel.min_weighted_hamming_distance"]], "min_weighted_hamming_edge_weight() (historydag.parsimony_utils.transitionmodel method)": [[17, "historydag.parsimony_utils.TransitionModel.min_weighted_hamming_edge_weight"]], "sequence_resolution_count() (historydag.parsimony_utils.ambiguitymap method)": [[17, "historydag.parsimony_utils.AmbiguityMap.sequence_resolution_count"]], "sequence_resolutions() (historydag.parsimony_utils.ambiguitymap method)": [[17, "historydag.parsimony_utils.AmbiguityMap.sequence_resolutions"]], "standard_nt_ambiguity_map (in module historydag.parsimony_utils)": [[17, "historydag.parsimony_utils.standard_nt_ambiguity_map"]], "standard_nt_ambiguity_map_gap_as_char (in module historydag.parsimony_utils)": [[17, "historydag.parsimony_utils.standard_nt_ambiguity_map_gap_as_char"]], "weighted_cg_hamming_distance() (historydag.parsimony_utils.transitionmodel method)": [[17, "historydag.parsimony_utils.TransitionModel.weighted_cg_hamming_distance"]], "weighted_cg_hamming_edge_weight() (historydag.parsimony_utils.transitionmodel method)": [[17, "historydag.parsimony_utils.TransitionModel.weighted_cg_hamming_edge_weight"]], "weighted_hamming_distance() (historydag.parsimony_utils.transitionmodel method)": [[17, "historydag.parsimony_utils.TransitionModel.weighted_hamming_distance"]], "weighted_hamming_edge_weight() (historydag.parsimony_utils.transitionmodel method)": [[17, "historydag.parsimony_utils.TransitionModel.weighted_hamming_edge_weight"]], "ambiguousleafsequencehistorydag (class in historydag.sequence_dag)": [[18, "historydag.sequence_dag.AmbiguousLeafSequenceHistoryDag"]], "sequencehistorydag (class in historydag.sequence_dag)": [[18, "historydag.sequence_dag.SequenceHistoryDag"]], "hamming_parsimony_count() (historydag.sequence_dag.ambiguousleafsequencehistorydag method)": [[18, "historydag.sequence_dag.AmbiguousLeafSequenceHistoryDag.hamming_parsimony_count"]], "hamming_parsimony_count() (historydag.sequence_dag.sequencehistorydag method)": [[18, "historydag.sequence_dag.SequenceHistoryDag.hamming_parsimony_count"]], "historydag.sequence_dag": [[18, "module-historydag.sequence_dag"]], "summary() (historydag.sequence_dag.ambiguousleafsequencehistorydag method)": [[18, "historydag.sequence_dag.AmbiguousLeafSequenceHistoryDag.summary"]], "summary() (historydag.sequence_dag.sequencehistorydag method)": [[18, "historydag.sequence_dag.SequenceHistoryDag.summary"]], "addfuncdict (class in historydag.utils)": [[19, "historydag.utils.AddFuncDict"]], "decimalstate (class in historydag.utils)": [[19, "historydag.utils.DecimalState"]], "floatstate (class in historydag.utils)": [[19, "historydag.utils.FloatState"]], "historydagfilter (class in historydag.utils)": [[19, "historydag.utils.HistoryDagFilter"]], "intstate (class in historydag.utils)": [[19, "historydag.utils.IntState"]], "strstate (class in historydag.utils)": [[19, "historydag.utils.StrState"]], "taxaerror": [[19, "historydag.utils.TaxaError"]], "ualabel (class in historydag.utils)": [[19, "historydag.utils.UALabel"]], "__init__() (historydag.utils.addfuncdict method)": [[19, "historydag.utils.AddFuncDict.__init__"]], "__init__() (historydag.utils.decimalstate method)": [[19, "historydag.utils.DecimalState.__init__"]], "__init__() (historydag.utils.floatstate method)": [[19, "historydag.utils.FloatState.__init__"]], "__init__() (historydag.utils.historydagfilter method)": [[19, "historydag.utils.HistoryDagFilter.__init__"]], "__init__() (historydag.utils.intstate method)": [[19, "historydag.utils.IntState.__init__"]], "__init__() (historydag.utils.strstate method)": [[19, "historydag.utils.StrState.__init__"]], "access_field() (in module historydag.utils)": [[19, "historydag.utils.access_field"]], "access_nodefield_default() (in module historydag.utils)": [[19, "historydag.utils.access_nodefield_default"]], "cartesian_product() (in module historydag.utils)": [[19, "historydag.utils.cartesian_product"]], "collapse_adjacent_sequences() (in module historydag.utils)": [[19, "historydag.utils.collapse_adjacent_sequences"]], "count_labeled_binary_topologies() (in module historydag.utils)": [[19, "historydag.utils.count_labeled_binary_topologies"]], "edge_difference_funcs() (in module historydag.utils)": [[19, "historydag.utils.edge_difference_funcs"]], "explode_label() (in module historydag.utils)": [[19, "historydag.utils.explode_label"]], "hist() (in module historydag.utils)": [[19, "historydag.utils.hist"]], "historydag.utils": [[19, "module-historydag.utils"]], "ignore_uanode() (in module historydag.utils)": [[19, "historydag.utils.ignore_uanode"]], "is_collapsed() (in module historydag.utils)": [[19, "historydag.utils.is_collapsed"]], "linear_combination() (historydag.utils.addfuncdict method)": [[19, "historydag.utils.AddFuncDict.linear_combination"]], "load_fasta() (in module historydag.utils)": [[19, "historydag.utils.load_fasta"]], "log_natural_probability_funcs (in module historydag.utils)": [[19, "historydag.utils.log_natural_probability_funcs"]], "logsumexp() (in module historydag.utils)": [[19, "historydag.utils.logsumexp"]], "make_newickcountfuncs() (in module historydag.utils)": [[19, "historydag.utils.make_newickcountfuncs"]], "make_rfdistance_countfuncs() (in module historydag.utils)": [[19, "historydag.utils.make_rfdistance_countfuncs"]], "natural_edge_probability() (in module historydag.utils)": [[19, "historydag.utils.natural_edge_probability"]], "node_countfuncs (in module historydag.utils)": [[19, "historydag.utils.node_countfuncs"]], "prod() (in module historydag.utils)": [[19, "historydag.utils.prod"]], "read_fasta() (in module historydag.utils)": [[19, "historydag.utils.read_fasta"]], "sum_rfdistance_funcs() (in module historydag.utils)": [[19, "historydag.utils.sum_rfdistance_funcs"]]}}) \ No newline at end of file diff --git a/stubs/historydag.HistoryDag.html b/stubs/historydag.HistoryDag.html index 795435d..8e12088 100644 --- a/stubs/historydag.HistoryDag.html +++ b/stubs/historydag.HistoryDag.html @@ -36,6 +36,7 @@ +
      @@ -191,7 +192,7 @@

      historydag.HistoryDag
      Parameters:
        -
      • dagroot (HistoryDagNode) – The root node of the history DAG

      • +
      • dagroot (HistoryDagNode) – The root node of the history DAG

      • attr (Any) – An attribute to contain data which will be preserved by copying (default and empty dict)

      @@ -594,7 +595,7 @@

      historydag.HistoryDag

      Return a generator containing all leaf nodes in the history DAG.

      Return type:
      -

      Generator[HistoryDagNode, None, None]

      +

      Generator[HistoryDagNode, None, None]

      @@ -607,7 +608,7 @@

      historydag.HistoryDagEdges’ parent nodes will be in preorder.

      Return type:
      -

      Generator[Tuple[HistoryDagNode, HistoryDagNode], None, None]

      +

      Generator[Tuple[HistoryDagNode, HistoryDagNode], None, None]

      @@ -621,7 +622,7 @@

      historydag.HistoryDagEdges’ parent nodes will be in preorder.

      Return type:
      -

      Generator[Tuple[HistoryDagNode, HistoryDagNode], None, None]

      +

      Generator[Tuple[HistoryDagNode, HistoryDagNode], None, None]

      @@ -667,7 +668,7 @@

      historydag.HistoryDag
      Return type:
      -

      Generator[HistoryDagNode, None, None]

      +

      Generator[HistoryDagNode, None, None]

      @@ -679,7 +680,7 @@

      historydag.HistoryDag
      Return type:
      -

      HistoryDagNode

      +

      HistoryDagNode

      @@ -707,7 +708,7 @@

      historydag.HistoryDag
      Return type:
      -

      Set[HistoryDagNode]

      +

      Set[HistoryDagNode]

      @@ -779,7 +780,7 @@

      historydag.HistoryDag
      Parameters:

      + +
      +
      + +
      + + + + \ No newline at end of file diff --git a/stubs/historydag.empty_node.html b/stubs/historydag.empty_node.html index 802a0ea..c42ad60 100644 --- a/stubs/historydag.empty_node.html +++ b/stubs/historydag.empty_node.html @@ -35,6 +35,7 @@ +
      @@ -100,7 +101,7 @@

      historydag.empty_node
      Return type:
      -

      HistoryDagNode

      +

      HistoryDagNode

      diff --git a/stubs/historydag.from_newick.html b/stubs/historydag.from_newick.html index 9b9133b..41360cc 100644 --- a/stubs/historydag.from_newick.html +++ b/stubs/historydag.from_newick.html @@ -35,6 +35,7 @@ +
      diff --git a/stubs/historydag.from_tree.html b/stubs/historydag.from_tree.html index 5cbabf6..fc3197e 100644 --- a/stubs/historydag.from_tree.html +++ b/stubs/historydag.from_tree.html @@ -35,6 +35,7 @@ +
      diff --git a/stubs/historydag.history_dag_from_etes.html b/stubs/historydag.history_dag_from_etes.html index 2099581..f936c10 100644 --- a/stubs/historydag.history_dag_from_etes.html +++ b/stubs/historydag.history_dag_from_etes.html @@ -35,6 +35,7 @@ +
      diff --git a/stubs/historydag.history_dag_from_histories.html b/stubs/historydag.history_dag_from_histories.html index 9f9776f..8afa7bc 100644 --- a/stubs/historydag.history_dag_from_histories.html +++ b/stubs/historydag.history_dag_from_histories.html @@ -35,6 +35,7 @@ +
      diff --git a/stubs/historydag.history_dag_from_newicks.html b/stubs/historydag.history_dag_from_newicks.html index 3e08118..8561d80 100644 --- a/stubs/historydag.history_dag_from_newicks.html +++ b/stubs/historydag.history_dag_from_newicks.html @@ -35,6 +35,7 @@ +
      diff --git a/stubs/historydag.mutation_annotated_dag.html b/stubs/historydag.mutation_annotated_dag.html index 87591c9..4bca917 100644 --- a/stubs/historydag.mutation_annotated_dag.html +++ b/stubs/historydag.mutation_annotated_dag.html @@ -35,6 +35,7 @@ +

    @@ -297,7 +300,7 @@
  • randomize_leaf_muts – When leaf node sequences contain ambiguities, if True the mutations on pendant edges will be randomized, when there are multiple choices.

  • -
  • transition_model – A historydag.parsimony_utils.TransitionModel() object, +

  • transition_model – A historydag.parsimony_utils.TransitionModel() object, used to decide which bases to record on pendant edge mutations with ambiguous bases as targets.

  • @@ -448,7 +451,7 @@ labels are unique.

  • leaf_cgs – (not implemented) A dictionary keyed by unique string leaf IDs containing CompactGenomes. Use compact_genome.read_alignment() to read an alignment from a file.

  • -
  • ambiguity_map – A historydag.parsimony_utils.AmbiguityMap() object +

  • ambiguity_map – A historydag.parsimony_utils.AmbiguityMap() object to determine how conflicting pendant edge mutations are represented.

  • diff --git a/stubs/historydag.parsimony.html b/stubs/historydag.parsimony.html index c45c0b0..5e47c2a 100644 --- a/stubs/historydag.parsimony.html +++ b/stubs/historydag.parsimony.html @@ -21,7 +21,7 @@ - + @@ -35,6 +35,7 @@ +