[Bioperl-l] EUtilities term handling

Chris Fields cjfields at uiuc.edu
Thu Oct 5 21:50:11 UTC 2006


I have the parameters all set up as get/sets at this point, but I'm  
open to suggestions on that.  Note in the BEGIN block the heredoc eval 
{} block.  Yes, nasty I know, but I hate AUTOLOAD.  It works as a  
quick way of getting parameter get/sets up-and-running.  I plan on  
making those explicit get/sets as soon as I can then sorting out  
particular ones to the various eutil modules where they are primarily  

Long story short, every parameter is a get/set at this time  
(including term()).  The common ones needed for most EUtilities are  
initialized in the parent EUtilities::_initialize(), and eutil- 
specific parameters are initialized in the individual eutil plugins.   
Each eutil plugin only sets whatever parameters may be needed for  
operation (though you could circumvent that, since all of them are  
inherited via EUtilities).

We could always simplify it to accept simple key-value pairs, but get/ 
sets (at least to me) allow more flexibility as long as you remember  
which parameters are set and to what.


On Oct 5, 2006, at 4:24 PM, Sendu Bala wrote:

> Chris Fields wrote:
>> I have corrected the EUtilities POD to reflect that all text input  
>> needs to be raw as URI encoding is done in the module, which  
>> should work (I think).  I plan on committing it tonight.  It also  
>> indicates that EUtilities search queries need to be made as if  
>> they are regular Entrez queries.  Would that be sufficient?
> You may not even need to mention anything about URI encoding, which  
> might frighten some people. Something as simple as:
> =head1 SYNOPSIS
> use Bio::DB::EUtilities;
>   my $esearch = Bio::DB::EUtilities->new(-eutil      => 'esearch',
>                                          -db         => 'pubmed',
>                                          -term       => 'hutP AND  
> xyz',
> ...
> and/or some POD for the new() method:
> =head2 new
>  Title   : new
> ...
>  Args    : -eutil => ...
>            -db    => ...
>            -term  => string, an entrez-style query
> =cut
> would get the point across, I think.
> BTW, can the term string be supplied anywhere else other than new 
> ()? It doesn't matter at all if it can't, I'm just idly wondering  
> if I missed anything.

Christopher Fields
Postdoctoral Researcher
Lab of Dr. Robert Switzer
Dept of Biochemistry
University of Illinois Urbana-Champaign

More information about the Bioperl-l mailing list