Back to index

python-biopython  1.60
Public Member Functions | Public Attributes | Static Public Attributes
Bio.Phylo.PhyloXML.Events Class Reference
Inheritance diagram for Bio.Phylo.PhyloXML.Events:
Inheritance graph
[legend]
Collaboration diagram for Bio.Phylo.PhyloXML.Events:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def items
def keys
def values
def __len__
def __getitem__
def __setitem__
def __delitem__
def __iter__
def __contains__
def __repr__

Public Attributes

 type
 duplications
 speciations
 losses
 confidence

Static Public Attributes

tuple ok_type

Detailed Description

Events at the root node of a clade (e.g. one gene duplication).

All attributes are set to None by default, but this object can also be
treated as a dictionary, in which case None values are treated as missing
keys and deleting a key resets that attribute's value back to None.

Definition at line 745 of file PhyloXML.py.


Constructor & Destructor Documentation

def Bio.Phylo.PhyloXML.Events.__init__ (   self,
  type = None,
  duplications = None,
  speciations = None,
  losses = None,
  confidence = None 
)

Definition at line 756 of file PhyloXML.py.

00756 
00757             losses=None, confidence=None):
00758         _check_str(type, self.ok_type.__contains__)
00759         self.type = type
00760         self.duplications = duplications
00761         self.speciations = speciations
00762         self.losses = losses
00763         self.confidence = confidence

Here is the call graph for this function:


Member Function Documentation

def Bio.Phylo.PhyloXML.Events.__contains__ (   self,
  key 
)

Definition at line 793 of file PhyloXML.py.

00793 
00794     def __contains__(self, key):
00795         return (hasattr(self, key) and getattr(self, key) is not None)
00796 

def Bio.Phylo.PhyloXML.Events.__delitem__ (   self,
  key 
)

Definition at line 787 of file PhyloXML.py.

00787 
00788     def __delitem__(self, key):
00789         setattr(self, key, None)

def Bio.Phylo.PhyloXML.Events.__getitem__ (   self,
  key 
)

Definition at line 776 of file PhyloXML.py.

00776 
00777     def __getitem__(self, key):
00778         if not hasattr(self, key):
00779             raise KeyError(key)
00780         val = getattr(self, key)
00781         if val is None:
00782             raise KeyError("%s has not been set in this object" % repr(key))
00783         return val

Here is the caller graph for this function:

Definition at line 790 of file PhyloXML.py.

00790 
00791     def __iter__(self):
00792         return iter(self.keys())

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 773 of file PhyloXML.py.

00773 
00774     def __len__(self):
00775         return len(self.values())

Here is the call graph for this function:

def Bio.Phylo.BaseTree.TreeElement.__repr__ (   self) [inherited]
Show this object's constructor with its primitive arguments.

Definition at line 216 of file BaseTree.py.

00216 
00217     def __repr__(self):
00218         """Show this object's constructor with its primitive arguments."""
00219         def pair_as_kwarg_string(key, val):
00220             if isinstance(val, basestring):
00221                 return "%s='%s'" % (key, _sugar.trim_str(unicode(val)))
00222             return "%s=%s" % (key, val)
00223         return u'%s(%s)' % (self.__class__.__name__,
00224                             ', '.join(pair_as_kwarg_string(key, val)
00225                                   for key, val in self.__dict__.iteritems()
00226                                   if val is not None and
00227                                   type(val) in (str, int, float, bool, unicode)
00228                                   ))

def Bio.Phylo.PhyloXML.Events.__setitem__ (   self,
  key,
  val 
)

Definition at line 784 of file PhyloXML.py.

00784 
00785     def __setitem__(self, key, val):
00786         setattr(self, key, val)

Definition at line 764 of file PhyloXML.py.

00764 
00765     def items(self):
00766         return [(k, v) for k, v in self.__dict__.iteritems() if v is not None]

Here is the caller graph for this function:

Definition at line 767 of file PhyloXML.py.

00767 
00768     def keys(self):
00769         return [k for k, v in self.__dict__.iteritems() if v is not None]

Here is the caller graph for this function:

Definition at line 770 of file PhyloXML.py.

00770 
00771     def values(self):
00772         return [v for v in self.__dict__.itervalues() if v is not None]

Here is the caller graph for this function:


Member Data Documentation

Definition at line 762 of file PhyloXML.py.

Definition at line 759 of file PhyloXML.py.

Definition at line 761 of file PhyloXML.py.

Initial value:
set(('transfer', 'fusion', 'speciation_or_duplication', 'other',
                    'mixed', 'unassigned'))

Definition at line 752 of file PhyloXML.py.

Definition at line 760 of file PhyloXML.py.

Definition at line 758 of file PhyloXML.py.


The documentation for this class was generated from the following file: