[Bioperl-l] searchIO parse
Andrew Hynes
Andrew.Hynes@ogs.co.uk
Thu, 25 Apr 2002 10:59:54 +0100
Hi Liu,
You need to set '_READMETHOD' => 'Blast' in your @params and you can then
call methods directly on your $blast_report object.
# Set blast params
my @params = (
'database' => $blast_index,
'program' => $blast_prog ,
'_READMETHOD' => 'Blast'
);
# Create blast factory object
my $factory = Bio::Tools::Run::StandAloneBlast->new(@params);
# Create seq object
my $input = Bio::Seq -> new ('-id' => "test_query", '-seq' => $query);
# Kick off blast job.
my $blast_report = $factory->blastall($input);
# Parse the report
my $result = $blast_report->next_result;
while( my $hit = $result->next_hit) {
print "Hit Name: ", $hit->name, "\n";
print "Hit Significance: ", $hit->significance, "\n";
}
See also
http://www.pasteur.fr/recherche/unites/sis/formation/bioperl/2eme_journee-1.
0.html#blast-parse
......
my @params=('program' => 'blastn', 'database' => $db);
my $factory = Bio::Tools::Run::StandAloneBlast->new(@params);
my $input = Bio::Seq -> new ('-id' => "test_query", '-seq' => $query);
my $blast_report =$factory->blastall($input);
my $searchio= new Bio::SearchIO('format' => 'blast', '-file'
=>$blast_report);
......
**********************************************************************
The information transmitted by this email is private and
confidential and is intended for the use of the intended
recipients specified therein.
If you are neither an intended recipient nor an employee
or agent responsible for delivery to an intended recipient,
you should be aware that any dissemination, distribution
or copying of this communication is strictly prohibited.
If you received this communication in error, please
notify us immediately.
**********************************************************************