File: comparison

package info (click to toggle)
libbio-das-lite-perl 2.11-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 468 kB
  • sloc: xml: 1,299; perl: 1,152; makefile: 31
file content (34 lines) | stat: -rwxr-xr-x 906 bytes parent folder | download | duplicates (4)
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
#!/usr/local/bin/perl -wT
#########
# This script needs to have Bio:Das and Bio::Das::Lite installed, or be started with:
# perl -I/path/to/bio-das -I/path/to/bio-daslite
#
use strict;
use Bio::Das;
use Bio::Das::Lite;
use Benchmark;
use Data::Dumper;
#$Bio::Das::Lite::DEBUG = 1;

use vars qw($SOURCES);
$SOURCES  = [qw(http://servlet.sanger.ac.uk/das/ensembl1834
	        http://das.sanger.ac.uk/das/spectral35)];

#########
# Build some random segments
#
my @segments = ();
for (my $chr=1;$chr<=20;$chr++) {
  my $rnd = int(rand(100000000));
  push @segments, "$chr:$rnd,@{[$rnd+1000000]}";
}

my $biodas     = Bio::Das->new();
my $biodaslite = Bio::Das::Lite->new({'dsn' => $SOURCES, 'caching' => 0});

timethese(
	  5, {
	      "Bio::Das"     => sub { $biodas->features(-dsn => $SOURCES, -segment => \@segments); },
	      "Bio::Das::Lite" => sub { $biodaslite->features(\@segments); },
	     },
	 );