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 """Initialize value of for the CDAO tree object.""" 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 """Initialize values for the CDAO Clade object.""" 34 BaseTree.Clade.__init__(self, branch_length=branch_length, 35 name=name, clades=clades, confidence=confidence) 36 self.comment = comment 37 # a list of (predicate, object) pairs, containing additional triples 38 # using this clade as subject 39 self.attributes = [] 40 self.tu_attributes = [] 41 self.edge_attributes = []
42