[Bioperl-l] Re: Running BLAST locally
Simon Chan
schan@xenongenetics.com
Wed, 23 Jan 2002 14:01:44 -0800
Hi All,
*** Jason, thanks. Your sugggestion worked!
So here's the code I've got:
my $factory = Bio::Tools::Run::StandAloneBlast->new ( database => 'refseq', program => 'blastn');
my $seq_in = Bio::SeqIO->new ( -file => 'inputfilename', -format => 'fasta');
my $seq = $seq_in->next_seq();
my $blast_report = $factory->blastall($seq);
So now, I want to parse it. I'm using BPlite.pm. From the docs, this is how we use BPlite:
my $report = Bio::Tools::BPlite->new (-fh => \*STDIN);
So $blast_report contains the BLAST output in object form. How would you pass $blast_report into BPlite? I've tried outputting
$blast_report into a file using SeqIO and then inputting it into BPlite -file => "filename" (I know, that's a pretty odd way
of doing it ;-) and I've also tried using a filehandle to read in value like so:
open (INPUT, "<filename");
my $report = Bio::Tools::BPlite->new (-fh => \*INPUT);
So how would the non-rookie bio-perl users pass $blast_report into BPlite? :-) The Pasteur tutorial is very good at showing rookies how to use modules, however, it doesn't spend too much time explaining them.
Once again, many thanks, All.
#############################################