tree::Node Class Reference
List of all members.
Detailed Description
Node is the smallest unit of definition for a tree.
A Node is linked to its father-Node and its children-Nodes: it defines
a sub-tree for which it is the root. All connected Nodes (including
leaves and root) make up for the whole tree.
Member Function Documentation
def tree::Node::__getitem__ |
( |
|
self, |
|
|
|
n | |
|
) |
| | |
Return the Node with this name.
def tree::Node::__init__ |
( |
|
self, |
|
|
|
kw | |
|
) |
| | |
Create a Node.
Keyword argument to build directly the Node from a Newick string:
[newick=string].
Examples of Newick format:
* '(Bovine:0.69395,(Gibbon:0.36079,(Orang:0.33636,(Gorilla:0.17147,(Chimp:0.19268,Human:0.11927):0.08386):0.06124):0.15057):0.54939,Mouse:1.21460):0.10;'
* '((A:0.1,B:0.2,C:0.1)ABCnode:0.2,(D:0.4,E:0.1)99:0.1);'
Note that bracked delimited nested and unnested comments are ignored.
def tree::Node::__str__ |
( |
|
self |
) |
|
Return printable string in Newick format of the sub-tree
defined by the Node.
def tree::Node::label |
( |
|
self |
) |
|
def tree::Node::lg |
( |
|
self |
) |
|
Return the length of the edge to the father.
def tree::Node::nb_children |
( |
|
self |
) |
|
Return the number of children.
def tree::Node::pop |
( |
|
self, |
|
|
|
n | |
|
) |
| | |
Return the Node with this name, and removes it from the tree.
def tree::Node::read_nf |
( |
|
self, |
|
|
|
a | |
|
) |
| | |
Read the $1 file containing a unique tree in Newick format
and builds the Node from it.
def tree::Node::sequence |
( |
|
self |
) |
|
Return the Sequence of the Node.
def tree::Node::set_lg |
( |
|
self, |
|
|
|
l | |
|
) |
| | |
Set the length of the edge to the father to $2 if it is >=0.
def tree::Node::write_fasta |
( |
|
self, |
|
|
|
a, |
|
|
|
kw | |
|
) |
| | |
Write the Node in FASTA format in $1 file.
Keyword argument to determine whether 'append' or 'write' (overwrites)
mode is turned on: [mode=string].
def tree::Node::write_matrix |
( |
|
self, |
|
|
|
a, |
|
|
|
kw | |
|
) |
| | |
Write the Node in simple format in $1 file.
Keyword argument to determine whether 'append' or 'write' (overwrites)
mode is turned on: [mode=string].
def tree::Node::write_newick |
( |
|
self, |
|
|
|
a, |
|
|
|
kw | |
|
) |
| | |
Write the Node in Newick format in $1 file.
Keyword argument to determine whether 'append' or 'write' (overwrites)
mode is turned on: [mode=string].
def tree::Node::write_phylip |
( |
|
self, |
|
|
|
a, |
|
|
|
kw | |
|
) |
| | |
Write the Node in Phylip format in $1 file.
Keyword argument to determine whether 'append' or 'write' (overwrites)
mode is turned on: [mode=string].
The documentation for this class was generated from the following file: