def RecupererPattern(ident):
    # la récupération des séquences à partir de la Base des données SwissProt
    handle = ExPASy.get_prosite_raw(ident)
    record = Prosite.read(handle)
    if record.type == 'PATTERN':
        return record.pattern
    elif record.type == 'MATRIX':
        print("L'identifiant que vous avez entré correspont à un profile !")
def RecupererPattern(ident):

    handle = ExPASy.get_prosite_raw(ident)
    record = Prosite.read(handle)
    if record.type == 'PATTERN':
        print("La forme régulière est: ", record.pattern)
        print("La traduction en Python est: ",
              traduireSequence(record.pattern))
    elif record.type == 'MATRIX':
        print("L'identifiant que vous avez entré correspont à un profile !")
Esempio n. 3
0
def get_documentation(accession):
    """
    get_documentation  function gets as arg :
        accesion (signature_ac example "PS00001" )
    returns 
        html file containing full documentaion 
    """

    handle_1 = ExPASy.get_prosite_raw(accession)
    records = Prosite.read(handle_1)
    handle_2 = ExPASy.get_prodoc_entry(records.pdoc)
    #record = Prodoc.read(handle_2)"
    html = handle_2.read()
    with open("my_prodoc_record.html", "w") as out_handle:
        out_handle.write(html)
Esempio n. 4
0
 def Prosite_Domain(self):
     from Bio import ExPASy
     from Bio.ExPASy import Prosite, ScanProsite
     try:
         handle = ScanProsite.scan(seq=self.__seq_input)
         result = ScanProsite.read(handle)
         if len(result) != 0:
             for res in range(len(result)):
                 prosite_acession = result[res]['signature_ac']
                 r = ExPASy.get_prosite_raw(prosite_acession)
                 html = Prosite.read(r)
                 r.close()
                 print('Foi encontrado um dominio %s.' % (html.name))
         else:
             print('Não foram encontradas correspondências.')
     except:
         print('A sequência fornecida não é uma sequência proteica.')
Esempio n. 5
0
 def test_prosite_raw(self):
     handle = ExPASy.get_prosite_raw("PS00001")
     record = Prosite.read(handle)
     handle.close()
     self.assertEqual(record.accession, "PS00001")
     self.assertEqual(record.name, "ASN_GLYCOSYLATION")
Esempio n. 6
0
 def test_prosite_raw(self):
     handle = ExPASy.get_prosite_raw('PS00001')
     record = Prosite.read(handle)
     handle.close()
     self.assertEqual(record.accession, 'PS00001')
     self.assertEqual(record.name, 'ASN_GLYCOSYLATION')
Esempio n. 7
0
 def test_prosite_raw(self):
     with ExPASy.get_prosite_raw("PS00001") as handle:
         record = Prosite.read(handle)
     self.assertEqual(record.accession, "PS00001")
     self.assertEqual(record.name, "ASN_GLYCOSYLATION")
from Bio.ExPASy import ScanProsite, Prosite, Prodoc
from Bio import ExPASy

# 在线浏览蛋白质序列
sequence = "MEHKEVVLLLLLFLKSGQGEPLDDYVNTQGASLFSVTKKQLGAGSIEECAAKCEEDEEFTCRAFQYHSKEQQCVIMAENRKSSIIIRMRDVVLFEKKVYLSECKTGNGKNYRGTMSKTKN"
handle = ScanProsite.scan(seq=sequence)
result = ScanProsite.read(handle)
print(result)

# 获取Prosite记录
handle = ExPASy.get_prosite_raw('PS00001')
record = Prosite.read(handle)
# record = Prodoc.read(handle)
print(record)