Subject: | problem with get_Stream_by_acc |
Date: | Mon, 8 Jul 2013 16:42:24 -0400 |
To: | bug-bioperl [...] rt.cpan.org |
From: | Mark Nadel <nadel [...] nabsys.com> |
I wrote a script using get_Seq_by_acc, but it invariably eventually
generated a problem (probably with the server) and terminated. I created a
variant using get_Stream_by_acc in hopes of mitigating this problem.
However, this time I only seem to get the first value back and an error
free termination. I'm sure I'm doing something very simple that is wrong.
Here is the code:
use strict;
use Bio::DB::EUtilities;
use Bio::DB::GenBank;
my $factory = Bio::DB::EUtilities->new(-eutil => 'esearch',
-db => 'nucleotide',
-term => 'RPCI-11[]',
-email => 'nadel@nabsys.com',
-retmax => 1000000, # enter max number to be
returned
);
my @ids = $factory->get_ids;
print join(',',@ids), "\n";
foreach my $id (@ids) {$id = "$id"} ;
$factory = Bio::DB::EUtilities->new(-eutil => 'efetch',
-db => 'nucleotide',
-id => \@ids,
-email => 'nadel@nabsys.com',
-rettype => 'acc');
my @accs = split(m{\n},$factory->get_Response->content);
print join(',',@accs), "\n";
my @gets = @accs[0..10];
foreach my $get (@gets){
$get = "$get";
}
print "\n";
print join(',',@gets), "\n";
my $ll = $#gets+1;
print "\nThe length of gets is $ll\n";
my $db = Bio::DB::GenBank->new();
my $seqs=$db->get_Stream_by_acc(@gets);
while( my $clone = $seqs->next_seq ) {
my $d = $clone->desc();
my $len = $clone->length();
print "AAAAA\t$len\t$d\n";
I am running perl 5, version 12, subversion 3 (v5.12.3) built for
darwin-multi-2level on a mac running 10.7.5.
Any suggestions would be greatly appreciated.
Thanks in advance,
Mark Nadel
--
*Mark Nadel*
*Principal Scientist
*
Nabsys Inc.
60 Clifford Street
Providence, RI 02903
Phone 401-276-9100 x204
Fax 401-276-9122
Message body is not shown because it is too large.