[Bioperl-l] BioFetch: Adding databases

Samuel GRANJEAUD - IR/IFR137 granjeau at tagc.univ-mrs.fr
Thu Dec 21 11:14:25 UTC 2006


Hello!

I needed to query the Unisave database at EBI. Up to date, the only way 
to access it is the dbfetch web service 
(http://www.ebi.ac.uk/cgi-bin/dbfetch). This database is not yet defined 
in the BioFetch package 
(http://doc.bioperl.org/bioperl-live/Bio/DB/BioFetch.html). I wrote 
these few lines to make it work, but I don't think it fits a good 
programming practice. May be it makes sense to defined a method to add 
databases to FORMATMAP, in order to follow the dbfetch service evolutions.

Cheers,
--Samuel

use Bio::DB::BioFetch;
$Bio::DB::BioFetch::FORMATMAP{unisave} = {
default   => 'swiss',
swissprot => 'swiss',
fasta     => 'fasta',
namespace => 'unisave',
};
my $bf = new Bio::DB::BioFetch(-db=>'unisave');
my $seq = $bf->get_Seq_by_id('LAM1_MOUSE'); 

print $seq->display_id();
print $seq->seq();




More information about the Bioperl-l mailing list