Quantcast
Channel: Post Feed
Viewing all articles
Browse latest Browse all 41826

Help In Standaloneblast Bioperl

$
0
0

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, available 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


Viewing all articles
Browse latest Browse all 41826

Trending Articles