[Bioperl-l] (no subject)

Peter Schattner schattner@alum.mit.edu
Tue, 12 Jun 2001 16:51:36 -0700


Parminder Kang wrote:

> so far i have this
>
> use Bio::Tools::Run::StandAloneBlast();
> @params = ('program'=> 'blastn',
>           'database' => 'gpcr_nt.fasta');
> my $factory = Bio::Tools::Run::StandAloneBlast->new(@params);
>
> my $input = Bio::Seq->new('-id'=>"test query",
>                        '-seq' =>"atggagcccaagcaaggaattctaaggg");
> my $blast_report = $factory->blastall($input);
>
> while(my $sbjct = $blast_report->nextSbjct) {
>    # print "$sbjct"
> My problem is that when now I print the $sbjct, I only get Hash references.
>

Try

$sbjct->name();

to get the name of the hit and similar methods documented in
Bio::Tools::BPlite::Sbjct to get other properties.;


> If you have
> examples scripts that would be helpful too. Also is this the best way to run
> the local blast.

StandAloneBlast should work fine for your needs as best I can tell.  I'd
recommend looking at examples/StandAloneBlast.pl, bptutorial.pl  - test 8 and
t/StandAloneBlast.t for sample working code.

Good luck.

Peter