Biskit :: Hmmer :: HmmerProfile :: Class HmmerProfile
[hide private]
[frames] | no frames]

Class HmmerProfile

source code


Get the hmm profile with name hmmName from hmm databse (using the program hmmfetch).

Instance Methods [hide private]
  __init__(self, hmmName, hmmdb, **kw)
dict parse_result(self)
Extract some information about the profile as well as the match state emmission scores.
array( len_seq x 20 ), array( 1 x 20 ) hmmEmm2Prob(self, nullEmm, emmScore)
Convert HMM profile emmisiion scores into emmission probabilities
float entropy(self, emmProb, nullProb)
calculate entropy for normalized probabilities scaled by aa freq.
  cleanup(self)
Clean up after external program has finished (failed or not).
  fail(self)
Called if external program failed, override!
  finish(self)
Overrides Executor method

Method Details [hide private]

__init__(self, hmmName, hmmdb, **kw)
(Constructor)

source code 
Parameters:
  • hmmName (str) - hmm profile name
  • hmmdb (str) - Pfam hmm database

parse_result(self)

source code 

Extract some information about the profile as well as the match state emmission scores. Keys of the returned dictionary:
 'AA', 'name', 'NrSeq', 'emmScore', 'accession',
 'maxAllScale', 'seqNr', 'profLength', 'ent', 'absSum'
Returns: dict
dictionary with warious information about the profile

hmmEmm2Prob(self, nullEmm, emmScore)

source code 

Convert HMM profile emmisiion scores into emmission probabilities
Parameters:
  • nullEmm (array) - null scores
  • emmScore (array) - emmission scores
Returns: array( len_seq x 20 ), array( 1 x 20 )
null and emmission probabilities, for each amino acid in each position

entropy(self, emmProb, nullProb)

source code 

calculate entropy for normalized probabilities scaled by aa freq. emmProb & nullProb is shape 1,len(alphabet)
Parameters:
  • emmProb (array) - emmission probabilities
  • nullProb (array) - null probabilities
Returns: float
entropy value

cleanup(self)

source code 

Clean up after external program has finished (failed or not). Override, but call in child method!

fail(self)

source code 

Called if external program failed, override!

finish(self)

source code 

Overrides Executor method