Table of Contents

Module: Pattern Bio/Prosite/Pattern.py
Imported modules   
from Bio import Seq, Alphabet
import re
import string
Functions   
_verify_test
compile
find_terms
pattern_mapping
prosite_to_grouped_re
prosite_to_re
verify_pattern
  _verify_test 
_verify_test ( infile )

verify the patterns from a Prosite file handle

  compile 
compile ( pattern )

Exceptions   
TypeError, "not a legal prosite pattern"
  find_terms 
find_terms ( pattern )

This does not verify the pattern is correct - invalid patterns can be converted!

Exceptions   
TypeError, "[<] only allowed for first term (%s)" % repr( term )
TypeError, "[>] only allowed for last term (%s)" % repr( term )
TypeError, "not a Prosite term (%s)" % repr( term )
TypeError, "not a prosite pattern - needs a final '.'"
TypeError, "not a prosite term (%s)" % repr( term )
  pattern_mapping 
pattern_mapping ( prosite,  mapping )

  prosite_to_grouped_re 
prosite_to_grouped_re ( pattern )

convert a valid Prosite pattern into an re with groups for each term

This does not verify the pattern is correct - invalid patterns can be converted!

  prosite_to_re 
prosite_to_re ( pattern )

convert a valid Prosite pattern into an re string

This does not verify that the pattern is correct - invalid patterns can be converted!

  verify_pattern 
verify_pattern ( pattern )

returns 1 if the Prosite pattern is syntactically correct, else 0

This verifies the pattern is correct.

Classes   
Prosite
PrositeAlphabet

Both the Prosite pattern and match result act like sequences.

PrositeMatch

Results of a Prosite match. Wrapper to the re.MatchObj, but returns

PrositeTerm

Elements of a Prosite pattern


Table of Contents

This document was automatically generated on Mon Jul 1 12:02:53 2002 by HappyDoc version 2.0.1