Back to index

python-biopython  1.60
Public Member Functions | Public Attributes
Bio.Search.HSP Class Reference
Inheritance diagram for Bio.Search.HSP:
Inheritance graph
[legend]
Collaboration diagram for Bio.Search.HSP:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def __len__
def __getattr__

Public Attributes

 algorithm
 info
 query
 subject
 homology
 length
 identical
 positives
 gaps

Detailed Description

Definition at line 104 of file Search.py.


Constructor & Destructor Documentation

def Bio.Search.HSP.__init__ (   self,
  query_seq,
  homology_seq,
  subject_seq,
  query_location,
  subject_location,
  query_name,
  subject_name,
  algorithm,
  info,
  homology_gaps = None 
)

Definition at line 119 of file Search.py.

00119 
00120                  ):
00121         assert len(query_seq) == len(homology_seq) == len(subject_seq), \
00122                (query_seq, homology_seq, subject_seq)
00123         self.algorithm = algorithm
00124 
00125         query_gaps = query_seq.count("-")
00126         subject_gaps = subject_seq.count("-")
00127         if homology_gaps is None:
00128             homology_gaps = query_gaps + subject_gaps
00129         self.info = info
00130 
00131         identical = info["identical"]
00132         # bioperl calls this 'conserved'
00133         positives = info.get("positives", identical)
00134         
00135         _SeqLength.__init__(self, len(query_seq), identical,
00136                             positives, homology_gaps)
00137 
00138         self.query = HSPSeq(name = query_name,
00139                             seq = query_seq,
00140                             location = query_location,
00141                             identical = identical,
00142                             positives = positives,
00143                             gaps = query_gaps)
00144 
00145         self.subject = HSPSeq(name = subject_name,
00146                               seq = subject_seq,
00147                               location = subject_location,
00148                               identical = identical,
00149                               positives = positives,
00150                               gaps = subject_gaps)
00151         self.homology = HomologySeq(seq = homology_seq,
00152                                     identical = identical,
00153                                     positives = positives,
00154                                     gaps = homology_gaps)

Member Function Documentation

def Bio.Search._SeqLength.__getattr__ (   self,
  name 
) [inherited]

Definition at line 83 of file Search.py.

00083 
00084     def __getattr__(self, name):
00085         if name == "frac_identical":
00086             return float(self.identical) / self.length
00087         elif name == "frac_positives":
00088             return float(self.positives) / self.length
00089         raise AttributeError(name)
00090 

def Bio.Search._SeqLength.__len__ (   self) [inherited]

Definition at line 81 of file Search.py.

00081 
00082     def __len__(self):
        return self.length

Member Data Documentation

Definition at line 122 of file Search.py.

Definition at line 80 of file Search.py.

Definition at line 150 of file Search.py.

Definition at line 78 of file Search.py.

Definition at line 128 of file Search.py.

Definition at line 77 of file Search.py.

Definition at line 79 of file Search.py.

Definition at line 137 of file Search.py.

Definition at line 144 of file Search.py.


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