[Bioperl-l] Determining strand orientation from bl2seq report

Dave Arenillas dave@cmmt.ubc.ca
Fri Jan 24 01:39:25 EST 2003

I'm trying to figure out if there is any way to determine the strand 
orientation (Plus / Plus or Plus / Minus) of an HSP from the blast report 
created by running bl2seq.

my @params = ('program' => 'blastn',
                'outfile' => "$BlastFile");
my $factory = Bio::Tools::Run::StandAloneBlast->new(@params);
my $report = $factory->bl2seq($seq1, $seq2);

while (my $hsp = $report->next_feature) {
	# get orientation info from $hsp???

Apparently Bio::Tools::BPlite::HSP objects have no methods to return this 
information. I (incorrectly) assumed that I could test
$hsp->hit->start > $hsp->hit->end
but start is always less than end even for Plus / Minus orientation.

I then attempted to create a SearchIO object and use this to parse the blast 
report, for ex.
my $searchio = new Bio::SearchIO( -format => 'blast',
                        -file   => "$BlastFile" );

while (my $result = $searchio->next_result) {
	# Results in the error below
        while (my $hit = $result->next_hit) {
                while (my $hsp = $hit->next_hsp) {

However, this produced the following error:
------------ EXCEPTION  -------------
MSG: no data for midline Lambda     K      H
STACK Bio::SearchIO::blast::next_result 

Is the report produced by bl2seq some kind of simplified blast report which 
SearchIO cannot parse? Is there any other way of determining HSP strand 


More information about the Bioperl-l mailing list