Exemplo n.º 1
0
 def __init__(self, s=None, ps=None):
     if isinstance(s, basestring):
         self.sequence = Seq(s)
     else:
         self.sequence = s
     self.prosite = ExPASy.get_prosite_raw(ps)
     self.record = Prosite.read(self.prosite)
     self.pat = pa.compile(self.record.pattern)
     self.regexp = re.compile(pa.prosite_to_re(self.record.pattern))
Exemplo n.º 2
0
tests = [ 'ps00107.txt',
          'ps00159.txt',
          'ps00165.txt',
          'ps00432.txt',
          'ps00488.txt',
          'ps00546.txt' ]

def print_list( list ):
    for item in list:
        print( '    ' + str( item ) )

for test in tests:
    print "testing %s" % test
    datafile = os.path.join( 'Prosite', test )
    src_handle = open(datafile)
    data = Prosite.read(src_handle)
    print data.name
    print data.type
    print data.accession
    print data.created
    print data.data_update
    print data.info_update
#    print data.data_info
    print data.pdoc
    print data.description
    print data.pattern
    print data.matrix
    print data.rules
    print data.nr_sp_release
    print data.nr_sp_seqs
    print data.cc_taxo_range
Exemplo n.º 3
0
import os
from Bio import Prosite

tests = ["ps00107.txt", "ps00159.txt", "ps00165.txt", "ps00432.txt", "ps00488.txt", "ps00546.txt"]


def print_list(list):
    for item in list:
        print ("    " + str(item))


for test in tests:
    print "testing %s" % test
    datafile = os.path.join("Prosite", test)
    src_handle = open(datafile)
    data = Prosite.read(src_handle)
    print data.name
    print data.type
    print data.accession
    print data.created
    print data.data_update
    print data.info_update
    #    print data.data_info
    print data.pdoc
    print data.description
    print data.pattern
    print data.matrix
    print data.rules
    print data.nr_sp_release
    print data.nr_sp_seqs
    print data.cc_taxo_range