Back to index

python-biopython  1.60
Public Member Functions | Public Attributes | Static Public Attributes
Bio.Wise.dnal.Statistics Class Reference
Collaboration diagram for Bio.Wise.dnal.Statistics:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def identity_fraction
def __str__

Public Attributes

 matches
 mismatches
 gaps
 extensions
 score
 coords

Static Public Attributes

string header = "identity_fraction\tmatches\tmismatches\tgaps\textensions"

Detailed Description

Calculate statistics from an ALB report

Definition at line 71 of file dnal.py.


Constructor & Destructor Documentation

def Bio.Wise.dnal.Statistics.__init__ (   self,
  filename,
  match,
  mismatch,
  gap,
  extension 
)

Definition at line 75 of file dnal.py.

00075 
00076     def __init__(self, filename, match, mismatch, gap, extension):
00077         self.matches = _fgrep_count('"SEQUENCE" %s' % match, filename)
00078         self.mismatches = _fgrep_count('"SEQUENCE" %s' % mismatch, filename)
00079         self.gaps = _fgrep_count('"INSERT" %s' % gap, filename)
00080 
00081         if gap == extension:
00082             self.extensions = 0
00083         else:
00084             self.extensions = _fgrep_count('"INSERT" %s' % extension, filename)
00085             
00086         self.score = (match*self.matches +
00087                       mismatch*self.mismatches +
00088                       gap*self.gaps +
00089                       extension*self.extensions)
00090 
00091         if _any([self.matches, self.mismatches, self.gaps, self.extensions]):
00092             self.coords = _get_coords(filename)
00093         else:
00094             self.coords = [(0, 0), (0,0)]


Member Function Documentation

Definition at line 100 of file dnal.py.

00100 
00101     def __str__(self):
00102         return "\t".join([str(x) for x in (self.identity_fraction(), self.matches, self.mismatches, self.gaps, self.extensions)])

Here is the call graph for this function:

Definition at line 95 of file dnal.py.

00095 
00096     def identity_fraction(self):
00097         return self.matches/(self.matches+self.mismatches)

Here is the caller graph for this function:


Member Data Documentation

Definition at line 91 of file dnal.py.

Definition at line 81 of file dnal.py.

Definition at line 78 of file dnal.py.

string Bio.Wise.dnal.Statistics.header = "identity_fraction\tmatches\tmismatches\tgaps\textensions" [static]

Definition at line 98 of file dnal.py.

Definition at line 76 of file dnal.py.

Definition at line 77 of file dnal.py.

Definition at line 85 of file dnal.py.


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