[Bioperl-guts-l] bioperl-live/Bio/Tools/EUtilities History.pm, 1.2, 1.3 Info.pm, 1.2, 1.3 Link.pm, 1.2, 1.3 Query.pm, 1.2, 1.3 Summary.pm, 1.2, 1.3

Christopher John Fields cjfields at dev.open-bio.org
Mon Jun 25 15:06:43 EDT 2007


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

Modified Files:
	History.pm Info.pm Link.pm Query.pm Summary.pm 
Log Message:
Implement eutils callbacks, iterator generation, lazy parsing.  Need to make seekable iterators (for rewind()) and clean up POD.

Index: History.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/Tools/EUtilities/History.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** History.pm	25 Jun 2007 03:43:29 -0000	1.2
--- History.pm	25 Jun 2007 19:06:41 -0000	1.3
***************
*** 135,139 ****
      my ($self, $simple) = @_;
      map { $self->{'_'.lc $_} = $simple->{$_} } keys %$simple;
-     $self->{'_parsed'} = 1;
  }
  
--- 135,138 ----

Index: Info.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/Tools/EUtilities/Info.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Info.pm	25 Jun 2007 03:43:29 -0000	1.2
--- Info.pm	25 Jun 2007 19:06:41 -0000	1.3
***************
*** 181,185 ****
          map { $self->{'_'.lc $_} = $simple->{$_} unless ref $simple->{$_}} keys %$simple;
      }
-     $self->{'_parsed'} = 1;
  }
  
--- 181,184 ----

Index: Summary.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/Tools/EUtilities/Summary.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Summary.pm	25 Jun 2007 03:43:29 -0000	1.2
--- Summary.pm	25 Jun 2007 19:06:41 -0000	1.3
***************
*** 100,106 ****
                                                                -verbose => $self->verbose);
          $ds->_add_data($docsum);
!         push @{ $self->{'_docsums'} }, $ds; 
      }
-     $self->{'_parsed'} = 1;
  }
  
--- 100,109 ----
                                                                -verbose => $self->verbose);
          $ds->_add_data($docsum);
!         if ($self->is_lazy) {
!             return $ds
!         } else {
!             push @{ $self->{'_docsums'} }, $ds;
!         }
      }
  }
  

Index: Link.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/Tools/EUtilities/Link.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Link.pm	25 Jun 2007 03:43:29 -0000	1.2
--- Link.pm	25 Jun 2007 19:06:41 -0000	1.3
***************
*** 83,118 ****
      my ($self, $data) = @_;
      # divide up per linkset
!     if (exists $data->{LinkSet}) {
!         for my $ls (@{ $data->{LinkSet} }) {
!             my $subclass;
!             # caching for efficiency; no need to recheck
!             if (!exists $self->{'_subclass_type'}) {
!                 ($subclass) = grep { exists $ls->{$_} } qw(LinkSetDb LinkSetDbHistory IdUrlList IdCheckList);
!                 $subclass ||= 'NoLinks';
!                 $self->{'_subclass_type'} = $subclass; 
!             } else {
!                 $subclass = $self->{'_subclass_type'};
!             }
!             # split these up by ID, since using correspondence() clobbers them...
!             if ($subclass eq 'IdUrlList' || $subclass eq 'IdCheckList') {
!                 my $list = $subclass eq 'IdUrlList' ? 'IdUrlSet' :
!                     $subclass eq 'IdCheckList' && exists $ls->{$subclass}->{IdLinkSet} ? 'IdLinkSet' :
!                     'Id';
!                 $ls->{$subclass} = $ls->{$subclass}->{$list};
              }
!             # divide up linkset per link
!             for my $ls_sub (@{ $ls->{$subclass} }) {
!                 for my $key (qw(WebEnv DbFrom IdList)) {
!                     $ls_sub->{$key} = $ls->{$key} if exists $ls->{$key};
!                 }
!                 my $obj = Bio::Tools::EUtilities::Link::LinkSet->new(-eutil => 'elink',
!                                                         -datatype => $SUBCLASS{$subclass},
!                                                         -verbose => $self->verbose);
!                 $obj->_add_data($ls_sub);
                  push @{$self->{'_linksets'}}, $obj;
              }
          }
      }
-     $self->{'_parsed'} = 1;
  }
  
--- 83,123 ----
      my ($self, $data) = @_;
      # divide up per linkset
!     if (!exists $data->{LinkSet}) {
!         $self->warn("No linksets returned");
!         return;
!     }
!     for my $ls (@{ $data->{LinkSet} }) {
!         my $subclass;
!         # caching for efficiency; no need to recheck
!         if (!exists $self->{'_subclass_type'}) {
!             ($subclass) = grep { exists $ls->{$_} } qw(LinkSetDb LinkSetDbHistory IdUrlList IdCheckList);
!             $subclass ||= 'NoLinks';
!             $self->{'_subclass_type'} = $subclass; 
!         } else {
!             $subclass = $self->{'_subclass_type'};
!         }
!         # split these up by ID, since using correspondence() clobbers them...
!         if ($subclass eq 'IdUrlList' || $subclass eq 'IdCheckList') {
!             my $list = $subclass eq 'IdUrlList' ? 'IdUrlSet' :
!                 $subclass eq 'IdCheckList' && exists $ls->{$subclass}->{IdLinkSet} ? 'IdLinkSet' :
!                 'Id';
!             $ls->{$subclass} = $ls->{$subclass}->{$list};
!         }
!         # divide up linkset per link
!         for my $ls_sub (@{ $ls->{$subclass} }) {
!             for my $key (qw(WebEnv DbFrom IdList)) {
!                 $ls_sub->{$key} = $ls->{$key} if exists $ls->{$key};
              }
!             my $obj = Bio::Tools::EUtilities::Link::LinkSet->new(-eutil => 'elink',
!                                                     -datatype => $SUBCLASS{$subclass},
!                                                     -verbose => $self->verbose);
!             $obj->_add_data($ls_sub);
!             if ($self->is_lazy) {
!                 return $obj
!             } else {
                  push @{$self->{'_linksets'}}, $obj;
              }
          }
      }
  }
  

Index: Query.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/Tools/EUtilities/Query.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Query.pm	25 Jun 2007 03:43:29 -0000	1.2
--- Query.pm	25 Jun 2007 19:06:41 -0000	1.3
***************
*** 125,129 ****
          $self->{'_'.lc $key} = $qdata->{$key};
      }
-     $self->{'_parsed'} = 1;
  }
  
--- 125,128 ----



More information about the Bioperl-guts-l mailing list