Hi, I am new to bioperl. I have been trying to run blast, I get my blast output, I am not sure, how to use $factory in bioperl
I have blast installed and has been added to my PATH variable.
use Bio::SeqIO
use Bio::Tools::Run::StandAloneBlast
@params=(-p=>'blastn',-d=>'swissprot',-o=>'output');
my $in = Bio::SeqIO->new(-format=>'fasta',-file=>$fasta,);
`makeblastdb -in $fasta -dbtype 'nucl' -out $fasta`;
@params = (program => 'blastn', database => $fasta);
my $factory=Bio::Tools::Run::StandAloneBlast->new(@params);
my $result = $factory->(`blastn -query $fasta -db $fasta -out 'query_vs'` );
I do get file.
I am not sure, if I am doing it correctly or not. Definitely doing wrong, as I am getting below error:
Not a CODE reference at ./bio.pl line 56, <GEN0> line 38.
Running on command line was different but doing blast from Bio Perl is not at all getting into my head.
I have browsed few examples, Standalone Blast 2 Short Sequences on biostars, but looks like I have been missing key concept.
If I do not use $factory and run the command on backticks, it is the same on commant line, what difference does factory make?
Any guidance shall be highly appreciated.
OS: Ubuntu 12.04
IDE: Komodo
@Fwip Thank you pointing out the error. I got it worked with standAloneBlastPlus module.
Glad you got it working! I was hoping to write out a more detailed guide, but was pressed for time.