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

Source Code for Module Bio.Phylo.CDAO

 1  # Copyright (C) 2013 by Ben Morris (ben@bendmorris.com) 
 2  # based on code by Eric Talevich (eric.talevich@gmail.com) 
 3  # This code is part of the Biopython distribution and governed by its 
 4  # license. Please see the LICENSE file that should have been included 
 5  # as part of this package. 
 6   
 7  """Classes corresponding to CDAO trees. 
 8   
 9  See classes in `Bio.Nexus`: Trees.Tree, Trees.NodeData, and Nodes.Chain. 
10  """ 
11  __docformat__ = "restructuredtext en" 
12   
13  from Bio.Phylo import BaseTree 
14   
15   
16 -class Tree(BaseTree.Tree):
17 """CDAO 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 # a list of (predicate, object) pairs, containing additional triples 24 # using this tree as subject 25 self.attributes = []
26 27
28 -class Clade(BaseTree.Clade):
29 """CDAO Clade (sub-tree) object.""" 30
31 - def __init__(self, branch_length=1.0, name=None, clades=None, 32 confidence=None, comment=None):
33 BaseTree.Clade.__init__(self, branch_length=branch_length, 34 name=name, clades=clades, confidence=confidence) 35 self.comment = comment 36 # a list of (predicate, object) pairs, containing additional triples 37 # using this clade as subject 38 self.attributes = [] 39 self.tu_attributes = [] 40 self.edge_attributes = []
41