[Bioperl-l] Batch retrieval of seq from swiss-prot

Harish S harish85_bt at yahoo.com
Wed Oct 12 14:02:00 EDT 2005


Hi gurus,
I am a newbie to this grp using bioperl version 1.5.0.
Like i am trying to retrieve a list of swiss prot seqs
from swiss prot.The file sample1.eco has one
swiss-prot id per line.
The code:
----
open(SEQID,'sample1.eco') || die 'Cannot open
file',$!;
@seqids=<SEQID>;
for ($i=0;$i<@seqids;$i++)
{
use Bio::DB::SwissProt;
$database= new Bio::DB::SwissProt;
$seq = $database->get_Seq_by_id($seqids[$i]);
print $seq->seq(), "\n\n";
}
----
works out, but this takes a long time...as it is
retrieving one by one.

so i tried to use get_Stream_by_batch but it gave me
an error saying its deprecated and suggested me to use
get_Stream_by_id.

So tried this out..
----
open(SEQID,'sample1.eco') || die 'Cannot open
file',$!;
@seqids=<SEQID>;
$ref=\@seqids;
for ($i=0;$i<@seqids;$i++)
{
use Bio::DB::SwissProt;
$database= new Bio::DB::SwissProt;
$seq = $database->get_Stream_by_id($ref);
print $seq->seq(), "\n\n";
}
----
but this gave me an error saying 
Can't locate object method "seq" via package
"Bio::SeqIO::swiss"

How do i proceed...?
Thanks in Advance.

 HARISH.S




	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


More information about the Bioperl-l mailing list