Bio::DB::EUtilities
epost
Summary
Bio::DB::EUtilities::epost - posting IDs on the remote NCBI server for batch
retrieval and chained queries
Package variables
No package variables defined.
Included modules
Inherit
Synopsis
my $epost = Bio::DB::EUtilities->new(
-eutil => 'epost',
-id => \@ids,
-db => 'protein',
);
$epost->get_response;
Description
WARNING: Please do
NOT spam the Entrez web server with multiple requests.
The EUtility EPost is used to post a list of primary IDs to the NCBI EUtilities
server for retrieval by
EFetch or for using in
futher searches using
ELink or
ESearch. The data is posted using:
$epost->get_response;
When not used in void context, this will also return a
HTTP::Response object for further processing. This is not
necessary, as any posts made will automatically generate a
Cookie,
which can be used to retrieve the posted information using
EFetch.
Using EPost is recommended for retrieving large lists of primary IDs and is
capable, when used repeatedly and in combination with EFetch, of retrieving
thousands of database entries.
The following are a general list of parameters that can be used to take
advantage of EPost. Up-to-date help for EPost is available at this URL
(the information below is a summary of the options found there):
http://eutils.ncbi.nlm.nih.gov/entrez/query/static/epost_help.html
db
The name of an Entrez database available through EUtilities.
id
a list of primary ID's
Below are a list of IDs which can be used with EPost:
PMID (pubmed),
MEDLINE UI (NIH MedLine),
MIM number (omim),
GI number (nucleotide, protein),
MMDB-ID (structure),
TAXID (taxonomy)
Methods
Methods description
Title : parse_response Usage : $db->_parse_response($content) Function: parse out response for cookie Returns : empty Args : none Throws : 'unparseable output exception' |
Methods code
sub _initialize
{ my ($self, @args) = @_;
$self->SUPER::_initialize(@args);
$self->_eutil($EUTIL);
$self->retmode($RETMODE);} |
sub parse_response
{ my $self = shift;
my $response = shift if @_;
if (!$response || !($response->isa("HTTP::Response"))) {
$self->throw("Need HTTP::Response object");
}
my $xs = XML::Simple->new();
my $simple = $xs->XMLin($response->content);
if ($simple->{ERROR}) {
$self->throw("NCBI epost nonrecoverable error: ".$simple->{ERROR});
}
if ($simple->{InvalidIdList}) {
$self->warn("NCBI epost error: Invalid ID List".$simple->{InvalidIdList});
}
my $db = $self->db;
my $webenv = $simple->{WebEnv};
my $querykey = $simple->{QueryKey};
my $cookie = Bio::DB::EUtilities::Cookie->new(-webenv => $webenv,
-querykey => $querykey,
-eutil => 'epost',
-database => $db,
);
$self->add_cookie($cookie);
return $response;} |
General documentation
User feedback is an integral part of the
evolution of this and other Bioperl modules. Send
your comments and suggestions preferably to one
of the Bioperl mailing lists. Your participation
is much appreciated.
bioperl-l@lists.open-bio.org - General discussion
http://www.bioperl.org/wiki/Mailing_lists - About the mailing lists
Report bugs to the Bioperl bug tracking system to
help us keep track the bugs and their resolution.
Bug reports can be submitted via the web.
http://bugzilla.open-bio.org/
Email cjfields at uiuc dot edu
The rest of the documentation details each of the
object methods. Internal methods are usually
preceded with a _