SuperTreeSupport

by Tobias Hill, implementing methods by Mark Wilkinson

class SuperTreeSupport(supertree, inputTrees)[source]

Supertree support measures

Super tree support can be used to calculate a number of support measures for a set of trees and a supertree. The measures can be at split level and placed on the supertree for image production or at tree level with a number of summary measures.

The support of the input trees for a supertree is measured by counting the number of input trees that support(S), conflict(Q), permits(P) or are relevant(R) with the splits in the supertree.

Supply a supertree and the input trees used to create it. Filenames or trees will do. A single supertree and a list of input trees.

For example:

sts = SuperTreeSupport('supertree.nex', 'input.nex')

or:

read('input.nex')
inputTrees = var.trees
sts = SuperTreeSupport('supertree.nex', inputTrees)

sts.doSaveDecoratedTree = True
sts.decoratedFilename='mytree.nex'
sts.doSaveIndexTree=False
sts.indexFilename='mytreeIndex.nex'
sts.csvFilename='mytreeIndex.csv'
sts.doDrawTree=True
sts.verbose=1

sts.superTreeSupport()

After completing the analysis there are a number of placeholders that allows access to the resulting data:

sts.decoratedSuperTree
sts.indexSuperTree
sts.csvList
sts.T, no. of input trees;
sts.L, no. of leaves;
sts.C, coverage (average proportion of leaves in the input tree);
sts.mean, mean taxon overlap among input trees
sts.median, median taxon overlap among input trees
sts.SC, number of supertree clades;
sts.U, no. of unsupported supertree clades;
sts.UC, no. of unsupported supertree clades that conflict with at least one input tree;
sts.UCC, no. of unsupported clades conflicting with all relevant input trees;
sts.QS, average qualitative support for supertree clades. Figures in parentheses are ranges.
sts.S, average support
sts.P, average permitted
sts.Q, average conflict
sts.R, average relevance
sts.V, average V for supertree clades V = (s minus q)/(s + q)
sts.VV, V+ = (s - q + p)/(s + q + p)
sts.Vv, V minus = (s - q - p)/(s + q + p)
sts.wV, wV = (ws minus q)/(ws + q)
sts.wVV, wVV = (ws minus q +wp)/(ws + q + wp)
sts.wVv, wVv = (ws minus q minus wp)/(ws + q + wp)

These can be used for further analysis.

Examples of support, conflict, relevance and permission:

Support:

supertree:

         +--------1:A
+--------5:100
|        +--------2:B
0
|--------3:C
|
+--------4:D

input tree:

         +--------1:A
+--------5:100
|        +--------2:B
0
|--------3:C

Conflict:

supertree:

         +--------1:A
+--------5:100
|        +--------2:B
0
|--------3:C
|
+--------4:D


input tree:

         +--------1:A
+--------5:100
|        +--------2:C
0
|--------3:B
|
+--------4:D

Relevance, i.e an input tree split that is irrelevant to the supertree split:

supertree:

         +--------1:A
+--------7:50
|        +--------2:B
|
|--------3:C
0
|--------4:D
|
|--------5:E
|
+--------6:F

input tree:

         +--------1:E
+--------7:50
|        +--------2:F
|
|--------3:C
0
|--------4:D
|
|--------5:A

Permission, i.e. an input trees split that permits the supertree split but does not support it:

supertree:

         +--------1:A
+--------7:50
|        +--------2:B
|
|--------3:C
0
|--------4:D
|
|--------5:E
|
+--------6:F

input tree:

         +--------1:A
+--------7:50
|        +--------2:B
|        |
0        |--------3:C
|
|--------4:D
|
|--------5:E

The analysed supertree can be decorated in three different ways.

  1. V = (s minus q)/(s + q) in standard mode, i.e. values between 0 - 100.

  2. V = (s minus q)/(s + q) in supertree mode, i.e. values between -1 - 1

  3. With indices that can be correlated to a csv file holding the support values. This allows for further analysis of the support values and post mapping to the tree.

buildDecoratedTree(supertreeSplits, supertreeDict)[source]
popcount(n, bitkeys)[source]
popcountLimit(n, limit)[source]
printReducedOutput(printInstructions=False)[source]
printSplitList(list, bitkeys)[source]
saveIndexTree(supertreeSplits, supertreeDict)[source]
superTreeSupport()[source]

Perform analyses on a number of input trees and the resulting supertree.