Back to index

python-biopython  1.60
Public Member Functions | Public Attributes
Bio.Phylo.PhyloXML.ProteinDomain Class Reference
Inheritance diagram for Bio.Phylo.PhyloXML.ProteinDomain:
Inheritance graph
Collaboration diagram for Bio.Phylo.PhyloXML.ProteinDomain:
Collaboration graph

List of all members.

Public Member Functions

def __init__
def from_seqfeature
def to_seqfeature
def __repr__

Public Attributes


Detailed Description

Represents an individual domain in a domain architecture.

The locations use 0-based indexing, as most Python objects including
SeqFeature do, rather than the usual biological convention starting at 1.
This means the start and end attributes can be used directly as slice
indexes on Seq objects.

    start : non-negative integer
        start of the domain on the sequence, using 0-based indexing
    end : non-negative integer
        end of the domain on the sequence
    confidence : float
        can be used to store e.g. E-values
    id : string
        unique identifier/name

Definition at line 924 of file

Constructor & Destructor Documentation

def Bio.Phylo.PhyloXML.ProteinDomain.__init__ (   self,
  confidence = None,
  id = None 

Definition at line 943 of file

00944     def __init__(self, value, start, end, confidence=None, id=None):
00945         self.value = value
00946         self.start = start
00947         self.end = end
00948         self.confidence = confidence
00949 = id

Member Function Documentation

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

Definition at line 216 of file

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                                   ))

Definition at line 951 of file

00952     def from_seqfeature(cls, feat):
00953         return ProteinDomain(,
00954                 feat.location.nofuzzy_start,
00955                 feat.location.nofuzzy_end,
00956                 confidence=feat.qualifiers.get('confidence'))

Definition at line 957 of file

00958     def to_seqfeature(self):
00959         feat = SeqFeature(location=FeatureLocation(self.start, self.end),
00960                           id=self.value)
00961         if hasattr(self, 'confidence'):
00962             feat.qualifiers['confidence'] = self.confidence
00963         return feat

Member Data Documentation

Definition at line 947 of file

Definition at line 946 of file

Definition at line 948 of file

Definition at line 945 of file

Definition at line 944 of file

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