[Bioperl-l] Windows BLAST problems under Cygwin
Paul G Cantalupo
lupey+ at pitt.edu
Fri Apr 29 11:55:09 EDT 2005
It turns out that
1) Setting the TMPDIR environment variable as per INSTALL.WIN instructions
fixed my problem (export TMPDIR=c:/cygwin/tmp)
2) I have a serious error in my script. I am trying to BLASTP on a
nucleotide database (ecoli.nt)! Wow, I gotta wake up.
Now it seems everything is OK.
Thank you for your comments,
Paul
Paul Cantalupo
Research Specialist/Systems Programmer
559 Crawford Hall
Department of Biological Sciences
University of Pittsburgh
Pittsburgh, PA 15260
Work: 412-624-4687
Fax: 412-624-4759
Ask me about Toastmasters: www.toastmasters.org
Midday Club Treasurer
On Fri, 29 Apr 2005, Brian Osborne wrote:
> Paul,
>
> This is from the INSTALL.WIN file:
>
> Directory for temporary files
> =============================
>
> Set the environmental variable TMPDIR, programs like BLAST and
> clustalw need a place to create temporary files. E.g.:
>
> setenv TMPDIR e:/cygwin/tmp # csh, tcsh
> export TMPDIR=e:/cygwin/tmp # sh, bash
>
> Note that this is not the syntax that Cygwin understands, which would
> be something like "/cygdrive/e/cygwin/tmp", but this is the syntax
> that a Perl module expects on Windows.
>
> If this variable is not set correctly you'll see errors like this
> when you run Bio::Tools::Run::StandAloneBlast:
>
> ------------- EXCEPTION: Bio::Root::Exception -------------
> MSG: Could not open /tmp/gXkwEbrL0a: No such file or directory
> STACK: Error::throw
>
>
> Brian O.
>
>
> -----Original Message-----
> From: bioperl-l-bounces at portal.open-bio.org
> [mailto:bioperl-l-bounces at portal.open-bio.org]On Behalf Of Jason Stajich
> Sent: Friday, April 29, 2005 10:05 AM
> To: Paul Cantalupo
> Cc: bioperl-l at bioperl.org
> Subject: Re: [Bioperl-l] Windows BLAST problems under Cygwin
>
>
> blast may have crashed because you didn't set the BLASTDIR - notice
> your path to the ecoli db is /ecoli.nt which is probably incorrect.
>
> You can vary which dir it uses for tempfiles by setting TEMPDIR
> environment variable.
> --
> Jason Stajich
> jason.stajich at duke.edu
> http://www.duke.edu/~jes12/
>
> On Apr 29, 2005, at 9:25 AM, Paul Cantalupo wrote:
>
> > 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
> >
> >
> >
> >
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l at portal.open-bio.org
> > http://portal.open-bio.org/mailman/listinfo/bioperl-l
> >
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>
>
>
> _______________________________________________
> 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