[Bioperl-l] not specifying some parameters to reset_parameters (Bio::DB::EUtilities)

Peng Yu pengyu.ut at gmail.com
Sat Jun 5 15:44:43 UTC 2010


The following problem generate exceptions, because certain parameters
are not passed to reset_parameters. However, I think that it is
reasonable to avoid setting any parameters that have already been set
using new(). If my understand is correct, I'd suggest that
reset_parameters should only take parameters that need to be reset but
not to take parameters that don't have be reset.



#!/usr/bin/env perl

use strict;
use warnings;

use Bio::DB::EUtilities;

my $factory = Bio::DB::EUtilities->new(-eutil => 'esearch',
  -db => 'protein',
  -term => 'BRCA1 AND human',
  -email => 'mymail at foo.bar',
);

print "get_retmax(): ",$factory->get_retmax(),"\n";
my $count=$factory->get_count;
print "count: ",$count,"\n";

$factory->reset_parameters(-eutil => 'esearch',
#  -db => 'protein',
#  -term => 'BRCA1 AND human',
#  -email => 'mymail at foo.bar',
  -retmax => $count
);

print "get_retmax(): ",$factory->get_retmax(),"\n";


-- 
Regards,
Peng



More information about the Bioperl-l mailing list