Package Bio :: Package Phylo :: Module Newick
[hide private]
[frames] | no frames]

Source Code for Module Bio.Phylo.Newick

 1  # Copyright (C) 2009 by Eric Talevich (eric.talevich@gmail.com) 
 2  # This code is part of the Biopython distribution and governed by its 
 3  # license. Please see the LICENSE file that should have been included 
 4  # as part of this package. 
 5   
 6  """Classes corresponding to Newick trees, also used for Nexus trees. 
 7   
 8  See classes in `Bio.Nexus`: Trees.Tree, Trees.NodeData, and Nodes.Chain. 
 9  """ 
10   
11  __docformat__ = "restructuredtext en" 
12   
13  from Bio.Phylo import BaseTree 
14   
15   
16 -class Tree(BaseTree.Tree):
17 """Newick Tree object.""" 18
19 - def __init__(self, root=None, rooted=False, id=None, name=None, weight=1.0):
20 BaseTree.Tree.__init__(self, root=root or Clade(), 21 rooted=rooted, id=id, name=name) 22 self.weight = weight
23 24
25 -class Clade(BaseTree.Clade):
26 """Newick Clade (sub-tree) object.""" 27
28 - def __init__(self, branch_length=None, name=None, clades=None, 29 confidence=None, comment=None):
33