Package Bio :: Package Motif :: Module Thresholds :: Class ScoreDistribution
[hide private]
[frames] | no frames]

Class ScoreDistribution

source code

object --+
         |
        ScoreDistribution

Class representing approximate score distribution for a given motif.

Utilizes a dynamic programming approch to calculate the distribution of
scores with a predefined precision. Provides a number of methods for calculating
thresholds for motif occurences.

Instance Methods [hide private]
 
__init__(self, motif, precision=1000)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_index_diff(self, x, y=0.0) source code
 
_add(self, i, j) source code
 
modify(self, scores, mo_probs, bg_probs) source code
 
threshold_fpr(self, fpr)
Approximate the log-odds threshold which makes the type I error (false positive rate).
source code
 
threshold_fnr(self, fnr)
Approximate the log-odds threshold which makes the type II error (false negative rate).
source code
 
threshold_balanced(self, rate_proportion=1.0, return_rate=False)
Approximate the log-odds threshold which makes FNR equal to FPR times rate_proportion
source code
 
threshold_patser(self)
Threshold selection mimicking the behaviour of patser (Hertz, Stormo 1999) software.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, motif, precision=1000)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

threshold_patser(self)

source code 
Threshold selection mimicking the behaviour of patser (Hertz, Stormo 1999) software.

It selects such a threshold that the log(fpr)=-ic(M)
note: the actual patser software uses natural logarithms instead of log_2, so the numbers
are not directly comparable.