[Bioperl-l] orientation of HSPs

Gregory Carl Kettler gckettle@midway.uchicago.edu
Tue, 31 Jul 2001 10:15:18 -0500 (CDT)


I've been using the BPlite parser along with GD::Graph to plot the
locations of BLAST hits on very long DNA sequences, and recently thought I
might want to know the orientations of these hits.  
If there is a hit to the reverse compliment of the database
sequence (i.e. the opposite strand), this is reflected in the BLAST output
by an alignment diagram that shows sbjct start > sbjct end.  
I had hoped this would be reflected by the truth of the Perl code:
$hsp->subject->start > $hsp->subject->end
but that seems not to be the case.  It looks like it's always rearranged 
so start < end.  Is there a better way to get the information I need?  If
not, where do I go in the source code to prevent that rearrangement?

		Greg Kettler
	Student of Biology and Computer Science
		University of Chicago
"Of course, if you're writing the code to control a cruise missile, you
may not actually need an explicit loop exit.  The loop will be terminated
automatically at the appropriate moment."    --Programming Perl, 3rd Ed.