BioPerl

 view release on metacpan or  search on metacpan

Bio/Event/EventHandlerI.pm  view on Meta::CPAN

120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
=head2 SAX methods
 
=cut
 
=head2 start_document
 
 Title   : start_document
 Usage   : $resultObj = $parser->start_document();
 Function: Receive notification of the beginning of a document (the
           input file of a parser). The parser will invoke this method
           only once, before any other event callbacks.
 
           Usually, a handler will reset any internal state structures
           when this method is called.
 
 Returns : none
 Args    : none
 
 
=cut

scripts/DB/bp_biofetch_genbank_proxy.pl  view on Meta::CPAN

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
use constant CACHE_LOCATION => '/usr/tmp/dbfetch_cache';
use constant MAX_SIZE   => 100_000_000;  # 100 megs, roughly
use constant CACHE_DEPTH => 4;
use constant EXPIRATION => "1 week";
use constant PURGE      => "1 hour";
 
%MAPPING = (genbank => {db=>'nucleotide',
                        rettype => 'gb'},
            genpep  => {db=>'protein',
                        rettype => 'gp'});
# we're doing everything in callbacks, so initialize globals.
$BUFFER = '';
%GOT    = ();
 
print header('text/plain');
 
param() or print_usage();
 
my $db     = param('db');
my $style  = param('style');
my $format = param('format');



( run in 0.259 second using v1.01-cache-2.11-cpan-4e96b696675 )