A collection of Tree objects, all referencing the same “universe” of opeational taxonomic unit concepts through the same TaxonNamespace object reference.
Constructs a new TreeList object, populating it with any iterable container with Tree object members passed as unnamed argument, or from a data source if stream and schema are passed.
If passed an iterable container, the objects in that container must be of type Tree (or derived). If the container is of type TreeList, then, because each Tree object must have the same TaxonNamespace reference as the containing TreeList, the trees in the container passed as an initialization argument will be deep-copied (except for associated TaxonNamespace and Taxon objects, which will be shallow-copied). If the container is any other type of iterable, then the Tree objects will be shallow-copied.
TreeList objects can directly thus be instantiated in the following ways:
# /usr/bin/env python
from dendropy import TaxonNamespace, Tree, TreeList
# instantiate an empty tree
tlst1 = TreeList()
# TreeList objects can be instantiated from an external data source
# using the 'get()' factory class method
tlst2 = TreeList.get(file=open('treefile.tre', 'rU'), schema="newick")
tlst3 = TreeList.get(path='sometrees.nexus', schema="nexus")
tlst4 = TreeList.get(data="((A,B),(C,D));((A,C),(B,D));", schema="newick")
# can also call `read()` on a TreeList object; each read adds
# (appends) the tree(s) found to the TreeList
tlst5 = TreeList()
tlst5.read(file=open('boot1.tre', 'rU'), schema="newick")
tlst5.read(path="boot3.tre", schema="newick")
tlst5.read(value="((A,B),(C,D));((A,C),(B,D));", schema="newick")
# populated from list of Tree objects
tlist6_1 = Tree.get(
data="((A,B),(C,D))",
schema="newick")
tlist6_2 = Tree.get(
data="((A,C),(B,D))",
schema="newick")
tlist6 = TreeList([tlist5_1, tlist5_2])
# passing keywords to underlying tree parser
tlst8 = TreeList.get(
data="((A,B),(C,D));((A,C),(B,D));",
schema="newick",
taxon_namespace=tlst3.taxon_namespace,
rooting="force-rooted",
extract_comment_metadata=True,
store_tree_weights=False,
preserve_underscores=True)
# Subsets of trees can be read. Note that in most cases, the entire
# data source is parsed, so this is not more efficient than reading
# all the trees and then manually-extracting them later; just more
# convenient
# skip the *first* 100 trees in the *first* (offset=0) collection of trees
trees = TreeList.get(
path="mcmc.tre",
schema="newick",
collection_offset=0,
tree_offset=100)
# get the *last* 10 trees in the *second* (offset=1) collection of trees
trees = TreeList.get(
path="mcmc.tre",
schema="newick",
collection_offset=1,
tree_offset=-10)
# get the last 10 trees in the second-to-last collection of trees
trees = TreeList.get(
path="mcmc.tre",
schema="newick",
collection_offset=-2,
tree_offset=100)
# Slices give shallow-copy: trees are references
tlst4copy0a = t4[:]
assert tlst4copy0a[0] is t4[0]
tlst4copy0b = t4[:4]
assert tlst4copy0b[0] is t4[0]
# 'Taxon-namespace-scoped' copy:
# I.e., Deep-copied objects but taxa and taxon namespace
# are copied as references
tlst4copy1a = TreeList(t4)
tlst4copy1b = TreeList([Tree(t) for t in tlst5])
assert tlst4copy1a[0] is not tlst4[0] # True
assert tlst4copy1a.taxon_namespace is tlst4.taxon_namespace # True
assert tlst4copy1b[0] is not tlst4[0] # True
assert tlst4copy1b.taxon_namespace is tlst4.taxon_namespace # True
alias of Tree
Creates and returns new TreeList with clones of all trees in self as well as all Tree objects in other. If other is a TreeList, then the trees are cloned and migrated into self.taxon_namespace; otherwise, the original objects are migrated into self.taxon_namespace and added directly.
| Returns: | tlist (|TreeList| object) – TreeList object containing clones of Tree objects in self and other. |
|---|
x.__delattr__(‘name’) <==> del x.name
default object formatter
x.__getattribute__(‘name’) <==> x.name
If index is an integer, then Tree object at position index is returned. If index is a slice, then a TreeList is returned with references (i.e., not copies or clones, but the actual original instances themselves) to Tree objects in the positions given by the slice. The TaxonNamespace is the same as self.
| Parameters: | index (integer or slice) – Index or slice. |
|---|---|
| Returns: | t (|Tree| object or |TreeList| object) |
In-place addition of Tree objects in other to self.
If other is a TreeList, then the trees are copied and migrated into self.taxon_namespace; otherwise, the original objects are migrated into self.taxon_namespace and added directly.
| Returns: | ``self`` (|TreeList|) |
|---|
helper for pickle
helper for pickle
x.__repr__() <==> repr(x)
x.__setattr__(‘name’, value) <==> x.name = value
size of object in memory, in bytes
Adds a Tree object, tree, to the collection.
The TaxonNamespace reference of tree will be set to that of self. Any Taxon objects associated with nodes in tree that are not already in self.taxon_namespace will be handled according to taxon_import_strategy:
- ‘migrate’
- Taxon objects associated with tree that are not already in self.taxon_nameaspace will be remapped based on their labels, with new :class|Taxon| objects being reconstructed if none with matching labels are found. Specifically, dendropy.datamodel.treemodel.Tree.migrate_taxon_namespace will be called on tree, where kwargs is as passed to this function.
| Parameters: |
|
|---|
See also
Tree.migrate_taxon_namespace
Composes and returns string representation of the data.
Mandatory Schema-Specification Keyword Argument:
- schema (str) – Identifier of format of data. See “DendroPy Schemas: Phylogenetic and Evolutionary Biology Data Formats” for more details.
Optional Schema-Specific Keyword Arguments:
These provide control over how the data is formatted, and supported argument names and values depend on the schema as specified by the value passed as the “schema” argument. See “DendroPy Schemas: Phylogenetic and Evolutionary Biology Data Formats” for more details.
Return TreeArray collecting information on splits in contained trees. Keyword arguments get passed directly to TreeArray constructor.
Creates and returns a copy of self.
| Parameters: | depth (integer) – The depth of the copy:
|
|---|
Returns a consensus tree of all trees in self, with minumum frequency of bipartition to be added to the consensus tree given by min_freq.
Copies annotations from other, which must be of Annotable type.
Copies are deep-copies, in that the Annotation objects added to the annotation_set AnnotationSet collection of self are independent copies of those in the annotate_set collection of other. However, dynamic bound-attribute annotations retain references to the original objects as given in other, which may or may not be desirable. This is handled by updated the objects to which attributes are bound via mappings found in attribute_object_mapper. In dynamic bound-attribute annotations, the _value attribute of the annotations object (Annotation._value) is a tuple consisting of “(obj, attr_name)”, which instructs the Annotation object to return “getattr(obj, attr_name)” (via: “getattr(*self._value)”) when returning the value of the Annotation. “obj” is typically the object to which the AnnotationSet belongs (i.e., self). When a copy of Annotation is created, the object reference given in the first element of the _value tuple of dynamic bound-attribute annotations are unchanged, unless the id of the object reference is fo
| Parameters: |
|
|---|
Note that all references to other in any annotation value (and sub-annotation, and sub-sub-sub-annotation, etc.) will be replaced with references to self. This may not always make sense (i.e., a reference to a particular entity may be absolute regardless of context).
In-place addition of Tree objects in other to self.
If other is a TreeList, then the trees are copied and migrated into self.taxon_namespace; otherwise, the original objects are migrated into self.taxon_namespace and added directly.
| Returns: | ``self`` (|TreeList|) |
|---|
Given a bipartition specified as:
- a Bipartition instance given the keyword ‘bipartition’
- a split bitmask given the keyword ‘split_bitmask’
- a list of Taxon objects given with the keyword taxa
- a list of taxon labels given with the keyword labels
this function returns the proportion of trees in self in which the split is found.
If the tree(s) in the collection are unrooted, then the bipartition will be normalized for the comparison.
Instantiate and return a new TreeList object from a data source.
Mandatory Source-Specification Keyword Argument (Exactly One Required):
- file (file) – File or file-like object of data opened for reading.
- path (str) – Path to file of data.
- url (str) – URL of data.
- data (str) – Data given directly.
Mandatory Schema-Specification Keyword Argument:
- schema (str) – Identifier of format of data given by the “file”, “path”, “data”, or “url” argument specified above: “newick”, “nexus”, or “nexml”. See “DendroPy Schemas: Phylogenetic and Evolutionary Biology Data Formats” for more details.
Optional General Keyword Arguments:
- label (str) – Name or identifier to be assigned to the new object; if not given, will be assigned the one specified in the data source, or None otherwise.
- taxon_namespace (TaxonNamespace) – The TaxonNamespace instance to use to manage the taxon names. If not specified, a new one will be created.
- collection_offset (int) – 0-based index of tree block or collection in source to be parsed. If not specified then the first collection (offset = 0) is assumed.
- tree_offset (int) – 0-based index of first tree within the collection specified by collection_offset to be parsed (i.e., skipping the first tree_offset trees). If not specified, then the first tree (offset = 0) is assumed (i.e., no trees within the specified collection will be skipped). Use this to specify, e.g. a burn-in.
- ignore_unrecognized_keyword_arguments (bool) – If True, then unsupported or unrecognized keyword arguments will not result in an error. Default is False: unsupported keyword arguments will result in an error.
Optional Schema-Specific Keyword Arguments:
These provide control over how the data is interpreted and processed, and supported argument names and values depend on the schema as specified by the value passed as the “schema” argument. See “DendroPy Schemas: Phylogenetic and Evolutionary Biology Data Formats” for more details.
Examples:
tlst1 = dendropy.TreeList.get(
file=open('treefile.tre', 'rU'),
schema="newick")
tlst2 = dendropy.TreeList.get(
path='sometrees.nexus',
schema="nexus",
collection_offset=2,
tree_offset=100)
tlst3 = dendropy.TreeList.get(
data="((A,B),(C,D));((A,C),(B,D));",
schema="newick")
tree4 = dendropy.dendropy.TreeList.get(
url="http://api.opentreeoflife.org/v2/study/pg_1144/tree/tree2324.nex",
schema="nexus")
Factory method to return new object of this class from file specified by string src.
| Parameters: |
|
|---|---|
| Returns: | pdo (phylogenetic data object) – New instance of object, constructed and populated from data given in source. |
Factory method to return new object of this class from file-like object src.
| Parameters: |
|
|---|---|
| Returns: | pdo (phylogenetic data object) – New instance of object, constructed and populated from data given in source. |
Factory method to return new object of this class from string src.
| Parameters: |
|
|---|---|
| Returns: | pdo (phylogenetic data object) – New instance of object, constructed and populated from data given in source. |
Factory method to return a new object of this class from URL given by src.
| Parameters: |
|
|---|---|
| Returns: | pdo (phylogenetic data object) – New instance of object, constructed and populated from data given in source. |
Inserts a Tree object, tree, into the collection before index.
The TaxonNamespace reference of tree will be set to that of self. Any Taxon objects associated with nodes in tree that are not already in self.taxon_namespace will be handled according to taxon_import_strategy:
- ‘migrate’
- Taxon objects associated with tree that are not already in self.taxon_nameaspace will be remapped based on their labels, with new :class|Taxon| objects being reconstructed if none with matching labels are found. Specifically, dendropy.datamodel.treemodel.Tree.migrate_taxon_namespace will be called on tree, where kwargs is as passed to this function.
| Parameters: |
|
|---|
See also
Tree.migrate_taxon_namespace
Return the tree with that maximizes the product of split supports, also known as the “Maximum Clade Credibility Tree” or MCCT.
| Parameters: | include_external_splits (bool) – If True, then non-internal split posteriors will be included in the score. Defaults to False: these are skipped. This should only make a difference when dealing with splits collected from trees of different leaf sets. |
|---|---|
| Returns: | mcct_tree (Tree) – Tree that maximizes the product of split supports. |
Return the tree with that maximizes the sum of split supports.
| Parameters: | include_external_splits (bool) – If True, then non-internal split posteriors will be included in the score. Defaults to False: these are skipped. This should only make a difference when dealing with splits collected from trees of different leaf sets. |
|---|---|
| Returns: | mcct_tree (Tree) – Tree that maximizes the sum of split supports. |
Move this object and all members to a new operational taxonomic unit concept namespace scope.
Current self.taxon_namespace value will be replaced with value given in taxon_namespace if this is not None, or a new TaxonNamespace object. Following this, reconstruct_taxon_namespace() will be called: each distinct Taxon object associated with self or members of self that is not alread in taxon_namespace will be replaced with a new Taxon object that will be created with the same label and added to self.taxon_namespace. Calling this method results in the object (and all its member objects) being associated with a new, independent taxon namespace.
Label mapping case sensitivity follows the self.taxon_namespace.is_case_sensitive setting. If False and unify_taxa_by_label is also True, then the establishment of correspondence between Taxon objects in the old and new namespaces with be based on case-insensitive matching of labels. E.g., if there are four Taxon objects with labels ‘Foo’, ‘Foo’, ‘FOO’, and ‘FoO’ in the old namespace, then all objects that reference these will reference a single new Taxon object in the new namespace (with a label some existing casing variant of ‘foo’). If True: if unify_taxa_by_label is True, Taxon objects with labels identical except in case will be considered distinct.
| Parameters: |
|
|---|
Examples
Use this method to move an object from one taxon namespace to another.
For example, to get a copy of an object associated with another taxon namespace and associate it with a different namespace:
# Get handle to the new TaxonNamespace
other_taxon_namespace = some_other_data.taxon_namespace
# Get a taxon-namespace scoped copy of a tree
# in another namespace
t2 = Tree(t1)
# Replace taxon namespace of copy
t2.migrate_taxon_namespace(other_taxon_namespace)
You can also use this method to get a copy of a structure and then move it to a new namespace:
t2 = Tree(t1) t2.migrate_taxon_namespace(TaxonNamespace())
# Note: the same effect can be achived by: t3 = copy.deepcopy(t1)
See also
reconstruct_taxon_namespace
Returns a set populated with all of Taxon instances associated with self.
| Parameters: | taxa (set()) – Set to populate. If not specified, a new one will be created. |
|---|---|
| Returns: | taxa (set[|Taxon|]) – Set of taxa associated with self. |
Remove all Taxon instances in self.taxon_namespace that are not associated with self or any item in self.
Add Tree objects to existing TreeList from data source providing one or more collections of trees.
Mandatory Source-Specification Keyword Argument (Exactly One Required):
- file (file) – File or file-like object of data opened for reading.
- path (str) – Path to file of data.
- url (str) – URL of data.
- data (str) – Data given directly.
Mandatory Schema-Specification Keyword Argument:
- schema (str) – Identifier of format of data given by the “file”, “path”, “data”, or “url” argument specified above: “newick”, “nexus”, or “nexml”. See “DendroPy Schemas: Phylogenetic and Evolutionary Biology Data Formats” for more details.
Optional General Keyword Arguments:
- collection_offset (int) – 0-based index of tree block or collection in source to be parsed. If not specified then the first collection (offset = 0) is assumed.
- tree_offset (int) – 0-based index of first tree within the collection specified by collection_offset to be parsed (i.e., skipping the first tree_offset trees). If not specified, then the first tree (offset = 0) is assumed (i.e., no trees within the specified collection will be skipped). Use this to specify, e.g. a burn-in.
- ignore_unrecognized_keyword_arguments (bool) – If True, then unsupported or unrecognized keyword arguments will not result in an error. Default is False: unsupported keyword arguments will result in an error.
Optional Schema-Specific Keyword Arguments:
These provide control over how the data is interpreted and processed, and supported argument names and values depend on the schema as specified by the value passed as the “schema” argument. See “DendroPy Schemas: Phylogenetic and Evolutionary Biology Data Formats” for more details.
Examples:
tlist = dendropy.TreeList()
tlist.read(
file=open('treefile.tre', 'rU'),
schema="newick",
tree_offset=100)
tlist.read(
path='sometrees.nexus',
schema="nexus",
collection_offset=2,
tree_offset=100)
tlist.read(
data="((A,B),(C,D));((A,C),(B,D));",
schema="newick")
tlist.read(
url="http://api.opentreeoflife.org/v2/study/pg_1144/tree/tree2324.nex",
schema="nexus")
Reads data from file specified by filepath.
| Parameters: |
|
|---|---|
| Returns: | n (tuple [integer]) – A value indicating size of data read, where “size” depends on the object:
|
Reads from file (exactly equivalent to just read(), provided here as a separate method for completeness.
| Parameters: |
|
|---|---|
| Returns: | n (tuple [integer]) – A value indicating size of data read, where “size” depends on the object:
|
Reads a string.
| Parameters: |
|
|---|---|
| Returns: | n (tuple [integer]) – A value indicating size of data read, where “size” depends on the object:
|
Reads a URL source.
| Parameters: |
|
|---|---|
| Returns: | n (tuple [integer]) – A value indicating size of data read, where “size” depends on the object:
|
DEPRECATED: Use migrate_taxon_namespace() instead. Rebuilds taxon_namespace from scratch, or assigns Taxon objects from given TaxonNamespace object taxon_namespace based on label values.
Return SplitDistribution collecting information on splits in contained trees. Keyword arguments get passed directly to SplitDistribution constructor.
Creates and returns a Tree of a type that this list understands how to manage.
Deriving classes can override this to provide for custom Tree-type object lists. You can simple override the class-level variable DEFAULT_TREE_TYPE in your derived class if the constructor signature of the alternate tree type is the same as Tree. If you want to have a TreeList instance that generates custom trees (i.e., as opposed to a TreeList-ish class of instances), set the tree_type attribute of the TreeList instance.
| Parameters: | |
|---|---|
| Returns: | A |Tree| object. |
Writes out self in schema format.
Mandatory Destination-Specification Keyword Argument (Exactly One of the Following Required):
- file (file) – File or file-like object opened for writing.
- path (str) – Path to file to which to write.
Mandatory Schema-Specification Keyword Argument:
- schema (str) – Identifier of format of data. See “DendroPy Schemas: Phylogenetic and Evolutionary Biology Data Formats” for more details.
Optional Schema-Specific Keyword Arguments:
These provide control over how the data is formatted, and supported argument names and values depend on the schema as specified by the value passed as the “schema” argument. See “DendroPy Schemas: Phylogenetic and Evolutionary Biology Data Formats” for more details.
Examples
d.write(path="path/to/file.dat",
schema="nexus",
preserve_underscores=True)
f = open("path/to/file.dat")
d.write(file=f,
schema="nexus",
preserve_underscores=True)
Writes to file specified by dest.
Writes to file-like object dest.
Write out collection of trees to file.
| Mandatory Destimation-Specification Keyword Arguments (one and exactly one of the following required): | |
|---|---|
|
|
| Mandatory Schema-Specification Keyword Argument: | |
| Optional Schema-Specific Keyword Arguments: | |
|
|
High-performance collection of tree structures.
Storage of minimal tree structural information as represented by toplogy and edge lengths, minimizing memory and processing time. This class stores trees as collections of splits and edge lengths. All other information, such as labels, metadata annotations, etc. will be discarded. A full Tree instance can be reconstructed as needed from the structural information stored by this class, at the cost of computation time.
| Parameters: |
|
|---|
Creates and returns new TreeArray.
| Returns: | tlist (|TreeArray| object) – TreeArray object containing clones of Tree objects in self and other. |
|---|
Accession of data from tree_array to self.
| Parameters: | tree_array (TreeArray) – A TreeArray instance from which to add data. |
|---|
Adds the structure represented by a Tree instance to the collection.
| Parameters: |
|
|---|---|
| Returns: |
|
Adds multiple structures represneted by an iterator over or iterable of Tree instances to the collection.
| Parameters: |
|
|---|
Adds a Tree instance to the collection before position given by index.
| Parameters: |
|
|---|
Returns a dictionary with keys being bipartition encodings of trees (as frozenset collections of Bipartition objects) and values the frequency of occurrence of trees represented by that encoding in the collection.
Calculates the log product of split support for each of the trees in the collection.
| Parameters: | include_external_splits (bool) – If True, then non-internal split posteriors will be included in the score. Defaults to False: these are skipped. This should only make a difference when dealing with splits collected from trees of different leaf sets. |
|---|---|
| Returns: | s (tuple(list[numeric], integer)) – Returns a tuple, with the first element being the list of scores and the second being the index of the highest score. The element order corresponds to the trees accessioned in the collection. |
Calculates the sum of split support for all trees in the collection.
| Parameters: | include_external_splits (bool) – If True, then non-internal split posteriors will be included in the score. Defaults to False: these are skipped. This should only make a difference when dealing with splits collected from trees of different leaf sets. |
|---|---|
| Returns: | s (tuple(list[numeric], integer)) – Returns a tuple, with the first element being the list of scores and the second being the index of the highest score. The element order corresponds to the trees accessioned in the collection. |
Returns a consensus tree from splits in self.
| Parameters: |
|
|---|---|
| Returns: | t (consensus tree) |
Accession of data from tree_array to self.
| Parameters: | tree_array (TreeArray) – A TreeArray instance from which to add data. |
|---|
Returns a pair of tuples, ( (splits...), (lengths...) ), corresponding to the “tree” at index.
Adds a Tree instance to the collection before position given by index.
| Parameters: |
|
|---|---|
| Returns: |
|
Return the tree with that maximizes the product of split supports, also known as the “Maximum Clade Credibility Tree” or MCCT.
| Parameters: | include_external_splits (bool) – If True, then non-internal split posteriors will be included in the score. Defaults to False: these are skipped. This should only make a difference when dealing with splits collected from trees of different leaf sets. |
|---|---|
| Returns: | mcct_tree (Tree) – Tree that maximizes the product of split supports. |
Return the tree with that maximizes the sum of split supports.
| Parameters: | include_external_splits (bool) – If True, then non-internal split posteriors will be included in the score. Defaults to False: these are skipped. This should only make a difference when dealing with splits collected from trees of different leaf sets. |
|---|---|
| Returns: | mst_tree (Tree) – Tree that maximizes the sum of split supports. |
Add Tree objects to existing TreeList from data source providing one or more collections of trees.
Mandatory Source-Specification Keyword Argument (Exactly One Required):
- file (file) – File or file-like object of data opened for reading.
- path (str) – Path to file of data.
- url (str) – URL of data.
- data (str) – Data given directly.
Mandatory Schema-Specification Keyword Argument:
- schema (str) – Identifier of format of data given by the “file”, “path”, “data”, or “url” argument specified above: “newick”, “nexus”, or “nexml”. See “DendroPy Schemas: Phylogenetic and Evolutionary Biology Data Formats” for more details.
Optional General Keyword Arguments:
- collection_offset (int) – 0-based index of tree block or collection in source to be parsed. If not specified then the first collection (offset = 0) is assumed.
- tree_offset (int) – 0-based index of first tree within the collection specified by collection_offset to be parsed (i.e., skipping the first tree_offset trees). If not specified, then the first tree (offset = 0) is assumed (i.e., no trees within the specified collection will be skipped). Use this to specify, e.g. a burn-in.
- ignore_unrecognized_keyword_arguments (bool) – If True, then unsupported or unrecognized keyword arguments will not result in an error. Default is False: unsupported keyword arguments will result in an error.
Optional Schema-Specific Keyword Arguments:
These provide control over how the data is interpreted and processed, and supported argument names and values depend on the schema as specified by the value passed as the “schema” argument. See “DendroPy Schemas: Phylogenetic and Evolutionary Biology Data Formats” for more details.
Examples:
tree_array = dendropy.TreeArray()
tree_array.read(
file=open('treefile.tre', 'rU'),
schema="newick",
tree_offset=100)
tree_array.read(
path='sometrees.nexus',
schema="nexus",
collection_offset=2,
tree_offset=100)
tree_array.read(
data="((A,B),(C,D));((A,C),(B,D));",
schema="newick")
tree_array.read(
url="http://api.opentreeoflife.org/v2/study/pg_1144/tree/tree2324.nex",
schema="nexus")
Adds multiple structures from one or more external file sources to the collection.
| Parameters: |
|
|---|
Returns a dictionary with keys being sets of split bitmasks and values being the frequency of occurrence of trees represented by those split bitmask sets in the collection.
Returns a TreeList instance containing the reconstructed tree topologies (i.e. Tree instances with no edge weights) in the collection, with the frequency added as an attributed.
| Parameters: |
|
|---|
Collects information regarding splits over multiple trees.
Collapse edges on tree that have support less than indicated by min_freq.
Returns a consensus tree from splits in self.
| Parameters: |
|
|---|---|
| Returns: | t (consensus tree) |
Counts splits in this tree and add to totals. tree must be decorated with splits, and no attempt is made to normalize taxa.
| Parameters: |
|
|---|
Calculates the (log) product of the support of the splits of the tree, where the support is given by the proportional frequency of the split in the current split distribution.
The tree that has the highest product of split support out of a sample of trees corresponds to the “maximum credibility tree” for that sample. This can also be referred to as the “maximum clade credibility tree”, though this latter term is sometimes use for the tree that has the highest sum of split support (see SplitDistribution.sum_of_split_support_on_tree).
| Parameters: |
|
|---|---|
| Returns: | s (numeric) – The log product of the support of the splits of the tree. |
“Normalizes” split, by ensuring that the least-significant bit is always 1 (used on unrooted trees to establish split identity independent of rotation).
| Parameters: | bitmask (integer) – Split bitmask hash to be normalized. |
|---|---|
| Returns: | h (integer) – Normalized split bitmask. |
Returns iterator over support values for the splits of a given tree, where the support value is given by the proportional frequency of the split in the current split distribution.
| Parameters: |
|
|---|---|
| Returns: | s (list of floats) – List of values for splits in the tree corresponding to the proportional frequency that the split is found in the current distribution. |
Calculates the sum of the support of the splits of the tree, where the support is given by the proportional frequency of the split in the current distribtion.
| Parameters: |
|
|---|---|
| Returns: | s (numeric) – The sum of the support of the splits of the tree. |
Summarizes support of splits/edges/node on tree.
| Parameters: |
|
|---|
See SplitDistributionSummarizer.configure for configuration options.
Configure rendition/mark-up.
| Parameters: |
|
|---|