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

Class PrositeMatch

source code

Instance Methods [hide private]
 
__init__(self, prosite, seq, match) source code
 
__repr__(self) source code
 
__str__(self) source code
 
__len__(self) source code
 
__getitem__(self, i) source code
 
__getslice__(self, i, j) source code
 
mapping(self)
return a list of numbers mapping to items of the original pattern
source code
 
mapped_pattern(self)
returns the specific Prosite pattern used to find this sequence
source code
 
start(self, g=0) source code
 
end(self, g=0) source code
 
span(self, g) source code
 
groups(self, default=None) source code
 
group(self, *groups) source code
Method Details [hide private]

mapping(self)

source code 

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.

mapped_pattern(self)

source code 

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.