[Bioperl-l] Windows BLAST problems under Cygwin

Paul Cantalupo lupey+ at pitt.edu
Fri Apr 29 09:25:00 EDT 2005


Hello,

I am running BioPerl 1.4 on Windows 2000 under Cygwin (therefore, I use 
Perl that comes with Cygwin; not Windows Perl). I am trying to run a 
standalone blast. I installed the Windows version of BLAST as 
recommended by the BioPerl installation instructions. My script (see 
localblast.pl below) takes an input sequence file (see test.fa below) 
and performs a blastp. By running the script with the following command 
line, I get the this error:

$ localblast.pl test.fa
[NULL_Caption] FATAL ERROR: blast: Unable to open input file /tmp/4lkjmTjRio

------------- EXCEPTION  -------------
MSG: blastall call crashed: 256 /usr/local/blast/blastall -p  blastp  -d 
  "/ecoli.nt"  -i
/tmp/4lkjmTjRio  -o  /tmp/llctIvZlC6

STACK Bio::Tools::Run::StandAloneBlast::_runblast 
/usr/lib/perl5/site_perl/5.8/Bio/Tools/Ru
n/StandAloneBlast.pm:732
STACK Bio::Tools::Run::StandAloneBlast::_generic_local_blast 
/usr/lib/perl5/site_perl/5.8/B
io/Tools/Run/StandAloneBlast.pm:680
STACK Bio::Tools::Run::StandAloneBlast::blastall 
/usr/lib/perl5/site_perl/5.8/Bio/Tools/Run
/StandAloneBlast.pm:536
STACK toplevel ./localblast.pl:17

--------------------------------------


Notice that blast is unable to open the input file /tmp/4lkjmTjRio 
(which the library StandAloneBlast created). Next, I tried to run 
blastall directly from the commandline, with a file in the /tmp 
directory but it gave me the same error: 'unable to open input file'. 
But blastall does execute properly I use an input file that is in the 
current directory (using a relative path name in the -i option). But if 
I set the -i option to any absolute reference for a file like 
/home/lupey/fasta.fa, it fails and the error is the same: 'Unable to 
open input file'.

So, why does BioPerl suggest using the Windows version of Blast if it 
can't open files using absolute references to files especially when the 
StandAloneBlast library places the inputfile in the /tmp directory? What 
solution can I employ to fix this?

Thank you,

Paul



#localblast.pl

#!/usr/bin/perl

use strict;
use Bio::SeqIO;
use Bio::Tools::Run::StandAloneBlast;

my $Seq_in = Bio::SeqIO->new (-file => $ARGV[0], -format => 'fasta');
my $query = $Seq_in->next_seq();

my $factory = Bio::Tools::Run::StandAloneBlast->new('program'  => 'blastp',
                                                  'database' => 'ecoli.nt',
                                                  _READMETHOD => "Blast"
                                                  );
my $blast_report = $factory->blastall($query);
my $result = $blast_report->next_result;

while( my $hit = $result->next_hit()) {
    print "\thit name: ", $hit->name(), " significance: ", 
$hit->significance(), "\n";}



test.fa:
 >Test
AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC
TTCTGAACTGGTTACCTGCCGTGAGTAAATTAAAATTTTATTGACTTAGGTCACTAAATACTTTAACCAA
TATAGGCATAGCGCACAGACAGATAAAAATTACAGAGTACACAACATCCATGAAACGCATTAGCACCACC
ATTACCACCACCATCACCATTACCACAGGTAACGGTGCGGGCTGACGCGTACAGGAAACACAGAAAAAAG
CCCGCACCTGACAGTGCGGGCTTTTTTTTTCGACCAAAGGTAACGAGGTAACAACCATGCGAGTGTTGAA
GTTCGGCGGTACATCAGTGGCAAATGCAGAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCAATGCC
AGGCAGGGGCAGGTGGCCACCGTCCTCTCTGCCCCCGCCAAAATCACCAACCACCTGGTGGCGATGATTG
AAAAAACCATTAGCGGCCAGGATGCTTTACCCAATATCAGCGATGCCGAACGTATTTTTGCCGAACTTTT






More information about the Bioperl-l mailing list