133
133
#$sbjct->verbose(1); # to activate debugging
134
134
$sbjct->tiled_hsps(1);
136
if( $sbjct->num_hsps == 0 || $sbjct->n == 0 ) {
136
# changed to not rely on n() (which is unreliable here) --cjfields 4/6/10
137
if( $sbjct->num_hsps == 0) {
137
138
#print STDERR "_tile_hsps(): no hsps, nothing to tile! (", $sbjct->num_hsps, ")\n";
138
139
_warn_about_no_hsps($sbjct);
139
140
return (undef, undef);
141
} elsif( $sbjct->n == 1 or $sbjct->num_hsps == 1) {
142
} elsif($sbjct->num_hsps == 1) {
142
143
## Simple summation scheme. Valid if there is only one HSP.
143
#print STDERR "_tile_hsps(): single HSP, easy stats.\n";
144
my $hsp = $sbjct->hsp;
145
$sbjct->length_aln('query', $hsp->length('query'));
146
$sbjct->length_aln('hit', $hsp->length('sbjct'));
147
$sbjct->length_aln('total', $hsp->length('total'));
148
$sbjct->matches( $hsp->matches() );
149
$sbjct->gaps('query', $hsp->gaps('query'));
150
$sbjct->gaps('sbjct', $hsp->gaps('sbjct'));
144
#print STDERR "_tile_hsps(): single HSP, easy stats.\n";
145
my $hsp = $sbjct->hsp;
146
$sbjct->length_aln('query', $hsp->length('query'));
147
$sbjct->length_aln('hit', $hsp->length('sbjct'));
148
$sbjct->length_aln('total', $hsp->length('total'));
149
$sbjct->matches( $hsp->matches() );
150
$sbjct->gaps('query', $hsp->gaps('query'));
151
$sbjct->gaps('sbjct', $hsp->gaps('sbjct'));
152
153
_adjust_length_aln($sbjct);
155
#print STDERR "Sbjct: _tile_hsps: summing multiple HSPs\n";
156
$sbjct->length_aln('query', 0);
157
$sbjct->length_aln('sbjct', 0);
158
$sbjct->length_aln('total', 0);
159
$sbjct->matches( 0, 0);
156
#print STDERR "Sbjct: _tile_hsps: summing multiple HSPs\n";
157
$sbjct->length_aln('query', 0);
158
$sbjct->length_aln('sbjct', 0);
159
$sbjct->length_aln('total', 0);
160
$sbjct->matches( 0, 0);
160
161
$sbjct->gaps('query', 0);
161
162
$sbjct->gaps('hit', 0);