[Bioperl-l] blastall problem

David Messina dmessina at wustl.edu
Wed Apr 4 19:42:43 UTC 2007


The code snippet worked fine for me. I believe the problem is that  
'result/fasta.faa' is not getting passed to your code properly. You  
might try specifying a complete path to your input and output file --  
relative paths, especially through a web app, can be tricky.

> when i paste the protein sequence into the textarea of my html page  
> and save
> the same as 'result/fasta.faa', so that the above script would do  
> the blast,

I'm not sure from what you wrote -- did you try running your script  
on the command line (having created 'result/fasta.faa' manually  
first)? If that is working for you, then the problem is with getting  
the data from the webpage into the script, not with the blasting part.

Dave

This is what I did:

  % ls test.pl testp*
test.pl       testp.fa

% formatdb -i testp.fa

% ls test.pl testp*
test.pl       testp.fa      testp.fa.phr  testp.fa.pin  testp.fa.psq

% perl test.pl testp.fa
%  head -10 out.blast
BLASTP 2.2.10 [Oct-19-2004]


Reference: Altschul, Stephen F., Thomas L. Madden, Alejandro A.  
Schaffer,
Jinghui Zhang, Zheng Zhang, Webb Miller, and David J. Lipman (1997),
"Gapped BLAST and PSI-BLAST: a new generation of protein database search
programs",  Nucleic Acids Res. 25:3389-3402.

Query= gi|64654269|gb|AAH96193.1| HOXB1 protein [Homo sapiens]
          (235 letters)


Your code: I changed only the input filename and the input database  
name, and saved the script as test.pl
-----------------------
#!/usr/bin/perl

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

my $Seq_in = Bio::SeqIO->new (-file => $ARGV[0], '-format' =>
'Fasta');
my $queryin = $Seq_in->next_seq();
my $factory = Bio::Tools::Run::StandAloneBlast->new('program'  =>  
'blastp',
                                                  'database' =>
'testp.fa',
                                                  _READMETHOD => 'Blast'
                                                   );
$factory->outfile("out.blast");
my $blastreport = $factory->blastall($queryin);
------------------------------------------------------------------------ 
-----------



More information about the Bioperl-l mailing list