Package Bio :: Package dbdefs :: Module embl
[hide private]
[frames] | no frames]

Source Code for Module Bio.dbdefs.embl

 1  # Copyright 2002 by Jeffrey Chang.  All rights reserved. 
 2  # This code is part of the Biopython distribution and governed by its 
 3  # license.  Please see the LICENSE file that should have been included 
 4  # as part of this package. 
 5   
 6  from Bio.config.DBRegistry import CGIDB, DBGroup 
 7  from _support import * 
 8   
 9  embl_xembl_cgi = CGIDB( 
10      name="embl-xembl-cgi", 
11      doc="Query XEMBL for EMBL sequence data in XML format.", 
12      cgi="http://www.ebi.ac.uk/cgi-bin/xembl/XEMBL.pl", 
13      url="http://www.ebi.ac.uk/xembl/", 
14      delay=5.0, 
15      params=[("format", "Bsml")], 
16      key="id", 
17      failure_cases=[(has_str("NOT EXIST"), "id does not exist")], 
18      ) 
19   
20  embl_dbfetch_cgi = CGIDB( 
21      name="embl-dbfetch-cgi", 
22      cgi="http://www.ebi.ac.uk/cgi-bin/dbfetch", 
23      url="http://www.ebi.ac.uk/cgi-bin/dbfetch", 
24      doc="dbfetch provides EMBL, Genbank, and SWALL sequences", 
25      delay=5.0, 
26      params=[("db", "embl"), 
27              ("style", "raw"), 
28              ("format", "embl"), 
29              ], 
30      key="id", 
31      failure_cases=[(has_str("not found in database"), "id does not exist")] 
32      ) 
33   
34  embl_ebi_cgi = CGIDB( 
35      name="embl-ebi-cgi", 
36      cgi="http://www.ebi.ac.uk/cgi-bin/emblfetch", 
37      url="http://www.ebi.ac.uk/cgi-bin/emblfetch", 
38      doc="Retrieve many kinds of sequences from EBI", 
39      delay=5.0, 
40      params=[("db", "EMBL"), 
41              ("format", "default"),   # also Fasta, bsml, agave available 
42              ("style", "raw") 
43              ], 
44      key="id", 
45      failure_cases=[(blank_expr, "No results returned")] 
46      ) 
47   
48  embl = DBGroup( 
49      name="embl", 
50      behavior="serial", 
51  ##    cache="XXX" 
52      ) 
53  embl.add(embl_dbfetch_cgi) 
54  embl.add(embl_ebi_cgi) 
55   
56  embl_xml = DBGroup( 
57          name = "embl-xml", 
58          behavior = "serial") 
59   
60  embl_fast = DBGroup( 
61      name="embl-fast", 
62      behavior="concurrent", 
63      ) 
64  embl_fast.add(embl_dbfetch_cgi) 
65  embl_fast.add(embl_ebi_cgi) 
66