Bio::DB::EUtilities epost
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
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
Bio::DB::EUtilities::Cookie
XML::Simple
Inherit
Bio::DB::EUtilities
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
_initialize
No description
Code
parse_responseDescriptionCode
Methods description
parse_responsecode    nextTop
 Title   : parse_response
Usage : $db->_parse_response($content)
Function: parse out response for cookie
Returns : empty
Args : none
Throws : 'unparseable output exception'
Methods code
_initializedescriptionprevnextTop
sub _initialize {
    my ($self, @args) = @_;
    $self->SUPER::_initialize(@args);
    # set by default
$self->_eutil($EUTIL); $self->retmode($RETMODE);
}
parse_responsedescriptionprevnextTop
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);
    #$self->debug("Response dumper:\n".Dumper($simple));
# check for errors
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
FEEDBACKTop
Mailing ListsTop
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
Reporting BugsTop
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/
AUTHOR Top
Email cjfields at uiuc dot edu
APPENDIXTop
The rest of the documentation details each of the
object methods. Internal methods are usually
preceded with a _