[Bioperl-l] Hit length using length_aln()

Ken kjgraham@ucdavis.edu
Mon, 15 Jul 2002 10:40:08 -0700


Thanks for the quick replies, (sorry I haven't got back sooner but I went 
home early on Friday and tried to not even think about work ;)

The line: $hsp->hsp_length('total')  works.
This allows me to compare the Hit to a value that I am expecting to see.
And I was was able to create another bit of info that I'll want using the 
following:
my @hsp_s = $hit->hsps();
my $lenAll = $hit->length('total');
foreach my $hsp (@hsp_s){
	$hsps_len_test += $hsp->length();
}
print "Ratio of hsps to hit: $hsps_len_test/$lenAll\n";

OR, is there a better way to retieve the ratio (percent) of the entire hit to 
the query.
Thanks again,
Ken