cjfields@pyrimidine:~/tests/eutils$ cat efetch.pl
#!/usr/bin/perl
use strict;
use warnings;
use Bio::DB::EUtilities;
my @ids = qw(4826782 157749793);
my $factory = Bio::DB::EUtilities->new(-eutil => 'epost',
-email => 'pat.boutet@gmail.com',
-db => 'protein',
-id => \@ids,
-keep_histories => 1);
my $count = scalar(@ids);
print $count."\n";;
# get history from queue
my $hist = $factory->next_History || die 'No history data returned';
print "History returned\n";
$factory->set_parameters(-eutil => 'esummary',
-history => $hist);
$factory->print_all;
cjfields@pyrimidine:~/tests/eutils$ perl efetch.pl
2
History returned
EUtil :esummary
DB :protein
UID :4826782
Caption :NP_004965
Title :potassium voltage-gated channel subfamily A member 2 [Homo sapiens]
Extra :gi|4826782|ref|NP_004965.1|[4826782]
Gi :4826782
CreateDate :1999/05/14
UpdateDate :2010/03/04
Flags :512
TaxId :9606
Length :499
Status :live
ReplacedBy
Comment
UID :157749793
Caption :XP_001678610
Title :Hypothetical protein CBG00686 [Caenorhabditis briggsae AF16]
Extra :gi|157749793|ref|XP_001678610.1|[157749793]
Gi :157749793
CreateDate :2007/09/30
UpdateDate :2008/04/03
Flags :512
TaxId :473542
Length :775
Status :suppressed
ReplacedBy
Comment : This whole-genome-shotgun scaffold was removed because it has been
:superceded by a new assembly of the genome.