File: treeanc.rst

package info (click to toggle)
python-treetime 0.11.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 21,316 kB
  • sloc: python: 8,437; sh: 124; makefile: 49
file content (62 lines) | stat: -rw-r--r-- 2,128 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
***************************
TreeAnc class documentation
***************************

This is the core class of the TreeTime module. It stores the phylogenetic tree and implements the basic algorithms for sequence manipulation, sequence reconstruction, and branch length optimization.

The tree is stored as Bio.Phylo object. In order to facilitate the tree operations, each node of the tree is decorated with additional attributes which are set during the tree preparation. These attributes need to be updated after tree modifications. The sequences are also attached to the tree nodes. In order to save memory, the sequences are stored in the compressed form. The TreeAnc class implements methods to compress and decompress sequences.

The main purpose of the TreeAnc class is to implement standard algorithms for ancestral sequence reconstruction.
Both marginal and joint maximum likelihood reconstructions are possible.
The marginal reconstructions computes the entire distribution of the states at a given node after tracing out states at all other nodes.

The `example scripts <https://github.com/neherlab/treetime/blob/master/examples/ancestral_inference.py>`_ illustrate how to instantiate TreeAnc objects.


TreeAnc Constructor
===================

.. autoclass:: treetime.TreeAnc
    :members: __init__

TreeAnc methods
===============

Basic functions, utilities, properties
--------------------------------------

.. automethod:: treetime.TreeAnc.prepare_tree

.. automethod:: treetime.TreeAnc.prune_short_branches

.. automethod:: treetime.TreeAnc.set_gtr

.. automethod:: treetime.TreeAnc.logger

.. automethod:: treetime.TreeAnc.aln()

.. automethod:: treetime.TreeAnc.gtr()

.. automethod:: treetime.TreeAnc.tree()

.. automethod:: treetime.TreeAnc.leaves_lookup()


Ancestral reconstruction and tree optimization
----------------------------------------------

.. automethod:: treetime.TreeAnc.infer_ancestral_sequences

.. automethod:: treetime.TreeAnc.sequence_LH

.. automethod:: treetime.TreeAnc.optimize_tree

.. automethod:: treetime.TreeAnc.infer_gtr

.. automethod:: treetime.TreeAnc.get_tree_dict