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   
12  from Bio.Phylo import BaseTree 
13   
14   
15 -class Tree(BaseTree.Tree):
16 """CDAO Tree object.""" 17
18 - def __init__(self, root=None, rooted=False, id=None, name=None, weight=1.0):
19 BaseTree.Tree.__init__(self, root=root or Clade(), 20 rooted=rooted, id=id, name=name) 21 self.weight = weight 22 # a list of (predicate, object) pairs, containing additional triples 23 # using this tree as subject 24 self.attributes = []
25 26
27 -class Clade(BaseTree.Clade):
28 """CDAO Clade (sub-tree) object.""" 29
30 - def __init__(self, branch_length=1.0, name=None, clades=None, 31 confidence=None, comment=None):
32 BaseTree.Clade.__init__(self, branch_length=branch_length, 33 name=name, clades=clades, confidence=confidence) 34 self.comment = comment 35 # a list of (predicate, object) pairs, containing additional triples 36 # using this clade as subject 37 self.attributes = [] 38 self.tu_attributes = [] 39 self.edge_attributes = []
40