|
/ mabslib / Matrix.py / Matrix
represents a binding site matrix
|
Methods
|
|
|
|
drawWeights
|
drawWeights ( self )
draws the matrix
|
|
|
positiveWeights
|
positiveWeights ( self )
Update weights for higher order markov background.
Update weights only for positive probability.
Background is taken care elsewhere
|
|
|
setBG
|
setBG ( self, seq )
Sets the 0-order background frequences from and example sequence.
|
|
|
getName
|
getName ( self )
Gives the name of this matrix
|
|
|
draw
|
draw ( self )
draws the matrix
|
|
|
setBGfreq
|
setBGfreq (
self,
a,
c,
g,
t,
)
Sets 0-order background.
The parameters are frequences of a,c,g and t in the background sequence
|
|
|
__init__
|
__init__ ( self, filename )
reads matrix from file
|
|
|
setPseudoCount
|
setPseudoCount ( self, pcount=1.0 )
Sets the amount of pseudocount
|
|
|
initWeights
|
initWeights ( self )
Helper to initialize the matrix weights for 0- or higher order background models
|
|
|
setMarkovBackground
|
setMarkovBackground ( self, bg )
Set a markov Background.
Markov background of k-order is represented as counts of (k+1)-grams
in the background sequence
|
|
|
match
|
match ( self, sequence )
matches matrix on sequence DOES NOT CURRENTLY WORK
|
|
|
getTFBSbyAbsolute
|
getTFBSbyAbsolute (
self,
sequence,
cutoff,
)
Returns the hits that are better than cutoff
|
|
|
trivialWeights
|
trivialWeights ( self )
Update weights according to 0-order background
|
|
|
__len__
|
__len__ ( self )
Return the number of columns in this matrix
|
|
|
getTFBSbyRatio
|
getTFBSbyRatio (
self,
sequence,
minscore_percent=0.1,
)
returns the hits, which are better then log2(minscore_percent*maxprod)
These are possible Transcription Factor Binding Sites. The formula is equal
to log2(minscore_percent)+maxscore
|
|
|