Package Bio :: Package AlignAce :: Module Motif :: Class Motif
[show private | hide private]
[frames | no frames]

Type Motif

object --+
         |
        Motif


A class representing sequence motifs.
Method Summary
  __init__(self)
  __str__(self)
string representation of motif
  add_instance(self, instance)
adds new instance to the motif
  pwm(self)
returns the PWM computed for the set of instances
  read(self, stream)
reads the motif from the stream
  score_hit(self, sequence, position, normalized, masked)
give the pwm score for a given position
  search_instances(self, sequence)
a generator function, returning found positions of instances of the motif in a given sequence
  search_pwm(self, sequence, threshold, normalized, masked)
a generator function, returning found hits in a given sequence with the pwm score higher than the threshold
  set_mask(self, mask)
sets the mask for the motif
  sim(self, motif, masked)
return the similarity score for the given motif against self.
  write(self, stream)
writes the motif to the stream
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value

Method Details

__str__(self)
(Informal representation operator)

string representation of motif
Overrides:
__builtin__.object.__str__

add_instance(self, instance)

adds new instance to the motif

pwm(self)

returns the PWM computed for the set of instances

read(self, stream)

reads the motif from the stream

the self.alphabet variable must be set before

score_hit(self, sequence, position, normalized=1, masked=0)

give the pwm score for a given position

search_instances(self, sequence)

a generator function, returning found positions of instances of the motif in a given sequence

search_pwm(self, sequence, threshold=0.0, normalized=1, masked=1)

a generator function, returning found hits in a given sequence with the pwm score higher than the threshold

set_mask(self, mask)

sets the mask for the motif

The mask should be a string containing asterisks in the position of significant columns and spaces in other columns

sim(self, motif, masked=0)

return the similarity score for the given motif against self.

We use the Pearson's correlation of the respective probabilities. If the motifs have different length or mask raise the ValueError.

write(self, stream)

writes the motif to the stream

Generated by Epydoc 2.1 on Sat Jul 16 15:49:04 2005 http://epydoc.sf.net