Package Bio :: Package Prosite :: Module Pattern :: Class PrositeMatch
[show private | hide private]
[frames | no frames]

Class PrositeMatch


Method Summary
  __init__(self, prosite, seq, match)
  __getitem__(self, i)
  __getslice__(self, i, j)
  __len__(self)
  __repr__(self)
  __str__(self)
  end(self, g)
  group(self, *groups)
  groups(self, default)
  mapped_pattern(self)
returns the specific Prosite pattern used to find this sequence
  mapping(self)
return a list of numbers mapping to items of the original pattern
  span(self, g)
  start(self, g)

Method Details

mapped_pattern(self)

returns the specific Prosite pattern used to find this sequence
>>> p = Prosite.compile("[AP](2,3)-D.")
>>> m = p.search(Seq.Seq("PAD"))
>>> mapping = m.mapping()
>>> mapped = m.mapped_pattern()
>>> print str(m[1]), str(p[mapping[1]]), str(mapped[1])
P [AP](2,3) [AP]

>>> print str(mapped)
[AP]-[AP]-D.

>>>
Note that the original term includes the count, while the mapped pattern does the expansion.

mapping(self)

return a list of numbers mapping to items of the original pattern

For example, if the Prosite pattern is "[AP](2)-D." matched against "PAD", then the mapping is [1, 1, 2], meaning the first character of the match ("P") is from the first Prosite group ("[AP]"), as is the second letter ("A"). The 3rd letter ("D") is mapped to group 2 of the pattern.

Generated by Epydoc 2.1 on Wed Jan 31 09:58:02 2007 http://epydoc.sf.net