GBrowse
view release on metacpan or search on metacpan
bin/gbrowse_netinstall.pl view on Meta::CPAN
print STDERR "Adding needed PPM repositories. This may take a while....\n";
for my $name (keys %REPOSITORIES) {
next if $repository{$name};
system("ppm rep add $name $REPOSITORIES{$name}");
}
}
sub find_bioperl_ppm {
print STDERR "Finding most recent bioperl...";
open S,"ppm search bioperl |" or die "Couldn't open ppm for listing: $!";
local $/ = ''; # paragraph mode
my ($blessed_one,$blessed_version);
my $best = 0;
while (<S>) {
chomp;
my ($number) = /^(\d+): bioperl/m;
my ($version) = /^\s+Version: (.+)/m;
my ($repository) = /^\s+Repo: (.+)/m;
my $multiplier = 10000000;
my $magnitude = 0;
# this dumb thing converts 1.5.1 into a real number
bin/gbrowse_netinstall2.pl view on Meta::CPAN
print STDERR "Adding needed PPM repositories. This may take a while....\n";
for my $name (keys %REPOSITORIES) {
next if $repository{$name};
system("ppm rep add $name $REPOSITORIES{$name}");
}
}
sub find_bioperl_ppm {
print STDERR "Finding most recent bioperl...";
open S,"ppm search bioperl |" or die "Couldn't open ppm for listing: $!";
local $/ = ''; # paragraph mode
my ($blessed_one,$blessed_version);
my $best = 0;
while (<S>) {
chomp;
my ($number) = /^(\d+): bioperl/m;
my ($version) = /^\s+Version: (.+)/m;
my ($repository) = /^\s+Repo: (.+)/m;
my $multiplier = 10000000;
my $magnitude = 0;
# this dumb thing converts 1.5.1 into a real number
bin/scan_gbrowse.pl view on Meta::CPAN
if (is_error($response)) {
die "Could not scan $url. Status code was $response";
}
open my $fh,'<',$dest or die "Could not open $dest: $!";
open my $out,'>',$cache or die "Could not open $cache for writing: $!";
my ($hostname) = $url =~ /^\w+:\/\/([^\/]+)/;
(my $colon_escape = $url) =~ s/:/\\:/g;
# paragraph mode to read stanzas
local $/ = '';
while (<$fh>) {
my ($label,$rest) = /\[([^\]]+)\]\s+(.+)/s;
my $remote = "$url?gbgff=1;s=1;t=$label;segment=\$segment";
chomp($rest);
print $out <<END;
[${hostname}_${source}_${label}]
remote feature = $remote
category = Tracks from $colon_escape
$rest
cgi-bin/das view on Meta::CPAN
};
return $result;
}
sub hash_sofile {
my $self = shift;
my ($so_file,$so_hash) = @_;
my %hash;
tie %hash,'DB_File',$so_hash,Fcntl->O_CREAT|Fcntl->O_RDWR,0666,$DB_File::DB_HASH or return;
open my $f,$so_file or return;
local $/ = ''; # paragraph mode
while (<$f>) {
next unless /\[Term\]/;
my ($id) = /^id: +(SO:\d+)/m;
my ($name) = /^name: (.+)/m;
my @synonyms = /^synonym: "(.+)"/mg;
$hash{lc $_} = $id foreach ($name,@synonyms);
}
}
sub types {
( run in 0.421 second using v1.01-cache-2.11-cpan-49f99fa48dc )