[Bioperl-l] remote db retrieval

Mikaela Ilinca Gabrielli MILG@lundbeck.com
Wed, 20 Nov 2002 14:20:30 +0100


Can somebody help me?
I'd like to retrieve sequences from a remote database in FASTA format. I
cannot find how to do so allthough there should be a simple way.

Here's my code:


#! /usr/bin/perl
use Bio::SeqIO;
use Bio::DB::RefSeq;


my @acc=('NP_061843.1', 'NP_110411.1', 'NP_072093.1');

foreach my $ACC(@acc){
my $fasta= GetSeqDB($ACC);
print "$fasta\n";
}


sub GetSeqDB{
        my $acc = $_[0];
        my $db = new Bio::DB::RefSeq(-format=>'fasta');
        $db->proxy(['http', 'ftp'],'http://fw.lundbeck.com:8080');
        $seq = $db->get_Seq_by_acc($acc);
	  return $seq->seq();
        }




--Thanks!
/Mikaela