[Bioperl-l] Barry's challenge

Barry Moore bmoore at genetics.utah.edu
Fri Nov 11 18:41:17 EST 2005


Jay-

Blast is actually a collection of programs and blastall runs them all,
so for each invocation of blastall you need to tell it which program you
want to run.  In this case you are "blasting" a protein sequence, so you
want to run blastp therefore your parameters should include program =>
'blastp' (of course you wouldn't know that since it wasn't in the
documentation).

BTW, I'm not sure what's going on with these environment variables, but
in my hands setting BLASTDIR, and BLASTDATADIR don't seem to help.  What
works for me is 1) make sure the blast executables are in your path, 2)
set BLASTDB to the location of your database, and BLASTMAT to the
location of your matrix files which will be BLOSUM62.  For my
installation the last two are both /usr/local/share/blast-2.1.1/data.
>From your script I'm guessing that yours is
/Users/jhannah/src/blast-2.2.12/data/.  Those are the two environment
variables that the blast executable wants set, and I'm sure that they
used to be documented in the blast docs as such, but now all I see in
their docs is reference to a ncbi.rc file which for me and others I've
talked to doesn't appear to do it's job.  I'd love to hear what I'm
missing here if someone else wants to chime in and set me straight on
all of this, but that's what works for me right now.

BTW, if you are going to get into Blast and sequence alignment, and you
if you like O'Reilly books (and what perl hacker doesn't) you might want
to have a look at the O'Reilly book on BLAST
(http://www.oreilly.com/catalog/blast/index.html).  It may be
particularly helpful since it has a nice concise section on theory -
both biological and computational behind blast sequence alignments.

Barry

> -----Original Message-----
> From: bioperl-l-bounces at portal.open-bio.org [mailto:bioperl-l-
> bounces at portal.open-bio.org] On Behalf Of Jay Hannah
> Sent: Friday, November 11, 2005 11:11 AM
> To: bioperl-l at bioperl.org
> Subject: Re: [Bioperl-l] Barry's challenge
> 
> 
> On Nov 11, 2005, at 7:01 AM, Aaron J. Mackey wrote:
> > barry.txt is not in FASTA format, it's in raw format
> 
> Thanks!
> 
> On to the next challenge... My program is now:
> 
> $ cat j.pl
> use Bio::Tools::Run::StandAloneBlast;
> $ENV{BLASTDIR} = '';
> @params = ('database' => 'nr.00','outfile' => 'j.out');
> $factory = Bio::Tools::Run::StandAloneBlast->new(@params);
> $str = Bio::SeqIO->new(-file=>'barry.txt', -format => 'raw' );
> $input = $str->next_seq();
> $input2 = $str->next_seq();
> $blast_report = $factory->blastall($input);
> 
> 
> 
> When I run it it outputs:
> 
> $ perl j.pl
> 
> -------------------- WARNING ---------------------
> MSG: cannot find path to blastall
> ---------------------------------------------------
> 
> 
> 
> But I think that's a red herring because when I run around in the
> debugger I see
> 
> ================
> [NULL_Caption] ERROR: Program Name was not given an argument
> 
> ------------- EXCEPTION  -------------
> MSG: blastall call crashed: 256
> /Users/jhannah/src/blast-2.2.12/bin/blastall -d  "/nr.00"  -i
> /tmp/KvbADjsmeq  -o  j.out
> 
> STACK Bio::Tools::Run::StandAloneBlast::_runblast
> /Library/Perl/5.8.1/Bio/Tools/Run/StandAloneBlast.pm:759
> STACK Bio::Tools::Run::StandAloneBlast::_generic_local_blast
> /Library/Perl/5.8.1/Bio/Tools/Run/StandAloneBlast.pm:706
> STACK Bio::Tools::Run::StandAloneBlast::blastall
> /Library/Perl/5.8.1/Bio/Tools/Run/StandAloneBlast.pm:557
> STACK toplevel j.pl:8
> 
> --------------------------------------
> 
> Bio::Root::Root::throw('Bio::Tools::Run::
> StandAloneBlast=HASH(0xb7cc34)','blastall call crashed: 256
> /Users/jhannah/src/blast-2.2.12/bi...') called at
> /Library/Perl/5.8.1/Bio/Tools/Run/StandAloneBlast.pm line 759
> 
> Bio::Tools::Run::StandAloneBlast::_runblast('Bio::Tools::Run::
> StandAloneBlast=HASH(0xb7cc34)','blastall',' -d  "/nr.00"  -i
> /tmp/KvbADjsmeq  -o  j.out ') called at
> /Library/Perl/5.8.1/Bio/Tools/Run/StandAloneBlast.pm line 706
> 
> Bio::Tools::Run::StandAloneBlast::_generic_local_blast('Bio::Tools::
> Run::StandAloneBlast=HASH(0xb7cc34)','blastall','Bio::
> Seq=HASH(0xb81924)','undef') called at
> /Library/Perl/5.8.1/Bio/Tools/Run/StandAloneBlast.pm line 557
> 
> Bio::Tools::Run::StandAloneBlast::blastall('Bio::Tools::Run::
> StandAloneBlast=HASH(0xb7cc34)','Bio::Seq=HASH(0xb81924)') called at
> j.pl line 8
> scalar context return from CODE(0x96981c): ''
> ================
> 
> 
> 
> So I've hit my first bioperl bug, right? The output is the wrong
error,
> yes? Should I submit a patch? To where? This mailing list?
> 
> I see that Bio/Tools/Run/StandAloneBlast.pm is calling
> 
>     $self->throw("$executable call crashed: $? $commandstring\n")
> 
> which lives down in Bio/Root/Root.pm. Is there a primer (from a user's
> perspective) on how I'm supposed to activate debugging/tracing? If
not,
> should I try to figure it out and write one? Into
> Bio::Tools::Run::StandAloneBlast or somewhere more general purpose?
> 
> Thanks all,
> 
> j
> BioNewb
> 
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l



More information about the Bioperl-l mailing list