[Bioperl-guts-l] bioperl-live/Bio/DB/EUtilities efetch.pm, 1.4, 1.5 einfo.pm, 1.5, 1.6 elink.pm, 1.17, 1.18 epost.pm, 1.5, 1.6

Christopher John Fields cjfields at dev.open-bio.org
Wed Jul 19 17:54:50 EDT 2006


Update of /home/repository/bioperl/bioperl-live/Bio/DB/EUtilities
In directory dev.open-bio.org:/tmp/cvs-serv11397/Bio/DB/EUtilities

Modified Files:
	efetch.pm einfo.pm elink.pm epost.pm 
Log Message:
Implement delay policy; POD updates

Index: elink.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/DB/EUtilities/elink.pm,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** elink.pm	18 Jul 2006 04:41:44 -0000	1.17
--- elink.pm	19 Jul 2006 21:54:48 -0000	1.18
***************
*** 259,270 ****
  The most complicated sitation comes when using multiple ID groups (see below).
  This requires that each ID group have a separate set of data (a linkset), each
! with potential multiple databases, multiple IDs, and so on.  In order to retrieve
! data from these, you B<MUST> use the following:
  
  
  
  
- As each ELink database search can encompass more than one
- queried database, ELinkData objects 
  
  For more information, see the POD documentation for
--- 259,270 ----
  The most complicated sitation comes when using multiple ID groups (see below).
  This requires that each ID group have a separate set of data (a linkset), each
! with potential multiple databases, multiple IDs, and so on.  Linkset data is
! stored in a special object
! (L<Bio::DB::EUtilities::ElinkData|Bio::DB::EUtilities::ElinkData>).
  
+ In order to retrieve data from these objects, you B<MUST> use the following:
  
  
  
  
  For more information, see the POD documentation for
***************
*** 509,513 ****
          for my $linkset (@{ $simple->{LinkSet} }) {
              my $linkobj = Bio::DB::EUtilities::ElinkData->new
!                                 (
                                   -command =>$cmd);
              $linkobj->_add_set($linkset);
--- 509,513 ----
          for my $linkset (@{ $simple->{LinkSet} }) {
              my $linkobj = Bio::DB::EUtilities::ElinkData->new
!                                 (-verbose => $self->verbose,
                                   -command =>$cmd);
              $linkobj->_add_set($linkset);

Index: einfo.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/DB/EUtilities/einfo.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** einfo.pm	17 Jul 2006 21:56:29 -0000	1.5
--- einfo.pm	19 Jul 2006 21:54:48 -0000	1.6
***************
*** 28,32 ****
  =head1 DESCRIPTION
  
! L<Bio::DB::EUtilities::einfo|Bio::DB::EUtilities::einfo> queries provide
  information about NCBI databases.  At this time no data is postprocessed
  for further information; this is currently implemented to complete access
--- 28,32 ----
  =head1 DESCRIPTION
  
! L<EInfo|Bio::DB::EUtilities::einfo> queries provide
  information about NCBI databases.  At this time no data is postprocessed
  for further information; this is currently implemented to complete access
***************
*** 93,97 ****
  use Bio::DB::EUtilities;
  use XML::Simple;
! use Data::Dumper;
  
  use vars qw(@ISA $EUTIL);
--- 93,97 ----
  use Bio::DB::EUtilities;
  use XML::Simple;
! #use Data::Dumper;
  
  use vars qw(@ISA $EUTIL);
***************
*** 189,197 ****
      $self->throw('No data') if (!$data || !$key);
      my $info_key = '_einfo_'.lc($key);
      $self->{$info_key} = $data;
      return;
! }
!     
!     
  
  1;
--- 189,196 ----
      $self->throw('No data') if (!$data || !$key);
      my $info_key = '_einfo_'.lc($key);
+     # fix to make a deep copy of data
      $self->{$info_key} = $data;
      return;
! }    
  
  1;

Index: epost.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/DB/EUtilities/epost.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** epost.pm	18 Jul 2006 04:41:44 -0000	1.5
--- epost.pm	19 Jul 2006 21:54:48 -0000	1.6
***************
*** 15,24 ****
  =head1 NAME
  
! Bio::DB::EUtilities::epost
  
  =head1 SYNOPSIS
  
  =head1 DESCRIPTION
  
  =head1 FEEDBACK
  
--- 15,78 ----
  =head1 NAME
  
! Bio::DB::EUtilities::epost - posting IDs on the remote NCBI server for batch
! retrieval and chained queries
  
  =head1 SYNOPSIS
  
+     my $epost = Bio::DB::EUtilities->new(
+                                           -eutil    => 'epost',
+                                           -id       => \@ids,
+                                           -db       => 'protein',
+                                           );
+     
+     $epost->get_response;
+ 
  =head1 DESCRIPTION
  
+ B<WARNING>: Please do B<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 L<EFetch:Bio::DB::EUtilities::efetch> or for using in
+ futher searches using L<ELink|Bio::DB::EUtilities::elink> or
+ L<ESearch|Bio::DB::EUtilities::esearch>.  The data is posted using:
+ 
+     $epost->get_response;
+ 
+ When not used in void context, this will also return a
+ L<HTTP::Response|HTTP::Response> object for further processing.  This is not
+ necessary, as any posts made will automatically generate a
+ L<Cookie|Bio::DB::EUtilities::Cookie>,
+ which can be used to retrieve the posted information using
+ L<EFetch|Bio::DB::EUtilities::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.  
+ 
+ =head2 Parameters
+ 
+ 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
+ 
+ =over 3
+ 
+ =item C<db>
+ 
+ The name of an Entrez database available through EUtilities. 
+ 
+ =item C<id>
+ 
+ a list of primary ID's
+ 
+ Below are a list of IDs which can be used with EPost:
+ 
+ B<PMID> (pubmed), <MEDLINE UI> (NIH MedLine), B<MIM number> (omim),
+ B<GI number> (nucleotide, protein), <MMDB-ID> (structure),B<TAXID> (taxonomy)
+ 
+ =back
+ 
  =head1 FEEDBACK
  
***************
*** 62,66 ****
  use Bio::DB::EUtilities::Cookie;
  use XML::Simple;
! use Data::Dumper;
  
  use vars qw(@ISA $EUTIL $RETMODE);
--- 116,120 ----
  use Bio::DB::EUtilities::Cookie;
  use XML::Simple;
! #use Data::Dumper;
  
  use vars qw(@ISA $EUTIL $RETMODE);
***************
*** 101,105 ****
      my $xs = XML::Simple->new();
      my $simple = $xs->XMLin($response->content);
!     $self->debug("Response dumper:\n".Dumper($simple));
      # check for errors
      if ($simple->{ERROR}) {
--- 155,159 ----
      my $xs = XML::Simple->new();
      my $simple = $xs->XMLin($response->content);
!     #$self->debug("Response dumper:\n".Dumper($simple));
      # check for errors
      if ($simple->{ERROR}) {

Index: efetch.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/DB/EUtilities/efetch.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** efetch.pm	17 Jul 2006 04:29:10 -0000	1.4
--- efetch.pm	19 Jul 2006 21:54:48 -0000	1.5
***************
*** 19,24 ****
--- 19,56 ----
  =head1 SYNOPSIS
  
+ my $efetch = Bio::DB::EUtilities->new(
+                                       -verbose => 1,
+                                       -cookie   => $esearch->next_cookie,
+                                       -retmax   => $retmax,
+                                       -rettype  => 'fasta'
+                                       );
+ 
+ print $efetch->get_response->content;
+ 
  =head1 DESCRIPTION
  
+ L<EFetch|Bio::DB::EUtilities::efetch> retrieve data records from a list of ID's
+ from the user environment.  This can be accomplished directly (using C<id>) or
+ indirectly (by using a L<Cookie|Bio::DB::EUtilities::Cookie>.
+ 
+ =head2 Parameters
+ 
+ The following are a general list of parameters that can be used to take
+ advantage of EFetch.  Up-to-date help for EFetch 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/efetch_help.html
+ 
+ =over 3
+ 
+ =item C<db>
+ 
+ Database parameter.  This should be set at all times; the only exception is
+ when setting a C<cookie>.
+ 
+ others to follow...
+ 
+ =back
+ 
  =head1 FEEDBACK
  
***************
*** 81,85 ****
      $datetype ||= 'mdat';
      $self->datetype($datetype) if $datetype;
!     $retstart       && $self->retstart($retstart);
      $retmax         && $self->retmax($retmax);
      $rettype        && $self->rettype($rettype);
--- 113,117 ----
      $datetype ||= 'mdat';
      $self->datetype($datetype) if $datetype;
!     defined($retstart)       && $self->retstart($retstart);
      $retmax         && $self->retmax($retmax);
      $rettype        && $self->rettype($rettype);



More information about the Bioperl-guts-l mailing list