http://www.perlmonks.org?node_id=1052113

GeneticistDrew has asked for the wisdom of the Perl Monks concerning the following question:

Hello all, I started to use Perl a couple a days ago and would like to ask my first question... I have been using BioPerl and all seems to be OK, however I cannot use StandAloneBlast. I've followed "http://www.bioperl.org/wiki/HOWTO:Beginners" down to BLAST, which I have installed as instructed on "http://www.ncbi.nlm.nih.gov/books/NBK52637/" but this is where the problems begin. To put it simply, I don’t know how to use/install NCBI Blast for use with BioPerl. I put a sequence database "Anopheles-gambiae-PEST_TRANSCRIPTS_AgamP3.7.fa" into the “db” folder of “blast-2.2.28+”. I then attempted to use the BLAST tool to find a specific DNA sequence within my database, as instructed on the bioperl beginners page.

#!/bin/perl -w use warnings; use Bio::Seq; use Bio::Tools::Run::StandAloneBlast; $blast_obj = Bio::Tools::Run::StandAloneBlast->new(-program => 'blast +n', -database => 'Anopheles-gambiae-PEST_TRANSCRIPTS_AgamP3.7.fa'); $seq_obj = Bio::Seq->new(-id =>"AGAP007280_query", -seq =>"TCTCGAGATG +GCGAACCTGCTGCAGGGGTTCAGCGAGATGGGTCCAGCCAAAGAGAAGACGACGCCACAGTATGAGG") +; $report_obj = $blast_obj->blastall($seq_obj); $result_obj = $report_obj->next_result; print $result_obj->num_hits;

The output is as follows:

Replacement list is longer than search list at C:/Dwimperl/perl/site/l +ib/Bio/Ran ge.pm line 251. Use of uninitialized value $_[0] in string eq at C:/Dwimperl/perl/lib/ +File/Spec/ Win32.pm line 152. --------------------- WARNING --------------------- MSG: cannot find path to blastall --------------------------------------------------- Can't call method "next_result" on an undefined value at bioperl_blast +2.pl line 12.

I don't know how to define the path to blastall, which for the moment is probably the biggest issue. I’m not sure if I have been very clear, but I’m very new to this… thanks in advance!