[Bioperl-l] problem setting mismatch penalty in StandAloneBlast.pm without setting quiet()

Scott Markel smarkel at scitegic.com
Mon Jul 19 18:17:30 EDT 2004


Jason,

Thanks for the quick reply.  Your method replacement nicely
took care of my problem.

Scott

Jason Stajich wrote:

> Oops quiet and q are being stored in the same slot.
> 
> Try adding this in your code (before a factory is instantiated).
> 
> sub Bio::Tools::Run::StandAloneBlast::quiet {
>     my $self = shift;
>     return $self->{'_quiet'} = shift if @_;
>     return $self->{'_quiet'};
> }
> 
> I've added this change in CVS and a test in StandAloneBlast.t
> 
> -jason
> On Mon, 19 Jul 2004, Scott Markel wrote:
> 
> 
>>I'm using BioPerl 1.4 on a Windows XP box.  When I set the
>>mismatch penalty for blastn, I get both the "-q" command line
>>option, which I want, and errors getting redirected to /dev/null,
>>which I don't want.  The problem seems to be the following
>>line in Bio::Tools::Run::StandAloneBlast's _setparams():
>>
>>   if ($self->quiet()) { $param_string .= '  2>/dev/null';}
>>
>>A constructor call
>>
>>   $factory = Bio::Tools::Run::StandAloneBlast->new(@params);
>>
>>followed by either $factory->q(-3) or $factory->quiet(-3)
>>both result in "-q -3" being added to the command line *and*
>>"  2>/dev/null" being appended to the command line.
>>
>>I've tried calling $factory->verbose() with verbosity values
>>of -1, 0, 1, and 2, but this didn't get rid of the /dev/null
>>redirection.
>>
>>How do I set the mismatch value without tripping $self->quiet()
>>in StandAloneBlast.pm?
>>
>>Scott
>>
>>
> 
> 
> --
> Jason Stajich
> Duke University
> jason at cgt.mc.duke.edu
> 

-- 
Scott Markel, Ph.D.
Principal Bioinformatics Architect  email:  smarkel at scitegic.com
SciTegic Inc.                       mobile: +1 858 205 3653
9665 Chesapeake Drive, Suite 401    voice:  +1 858 279 8800, ext. 253
San Diego, CA 92123                 fax:    +1 858 279 8804
USA                                 web:    http://www.scitegic.com



More information about the Bioperl-l mailing list