File: swissprot.py

package info (click to toggle)
python-biopython 1.42-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 17,584 kB
  • ctags: 12,272
  • sloc: python: 80,461; xml: 13,834; ansic: 7,902; cpp: 1,855; sql: 1,144; makefile: 203
file content (37 lines) | stat: -rw-r--r-- 1,127 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Copyright 2002 by Jeffrey Chang.  All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license.  Please see the LICENSE file that should have been included
# as part of this package.

from Bio.config.DBRegistry import CGIDB, DBGroup
from _support import *

swissprot_expasy_cgi = CGIDB(
    name="swissprot-expasy-cgi",
    doc="Retrieve a swiss-prot entry by ID from ExPASy.",
    cgi="http://www.expasy.ch/cgi-bin/get-sprot-raw.pl",
    delay=5.0,
    timeout=10,
    params=[],
    key="",
    failure_cases=[(blank_expr, "no results")]
    )

swissprot_usmirror_cgi = CGIDB(
    name="swissprot-usmirror-cgi",
    doc="Retrieve a swiss-prot entry by ID from the US mirror.",
    cgi="http://us.expasy.org/cgi-bin/get-sprot-raw.pl",
    delay=5.0,
    timeout=10,
    params=[],
    key="",
    failure_cases=[(blank_expr, "no results")]
    )

swissprot = DBGroup(
    name="swissprot",
    behavior="serial",
    doc="Retrieve a swiss-prot entry by ID.  Will try different servers until one works.",
    )
swissprot.add(swissprot_expasy_cgi)
swissprot.add(swissprot_usmirror_cgi)