~ubuntu-branches/ubuntu/vivid/bioperl/vivid

« back to all changes in this revision

Viewing changes to Bio/Search/SearchUtils.pm

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2011-06-17 13:51:18 UTC
  • mfrom: (3.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20110617135118-hncy38e0134j8oi5
Tags: 1.6.901-1
* New upstream release.
* Point debian/watch to search.cpan.org.
* Build using dh and overrides:
  - Use Debhelper 8 (debian/rules, debian/control).
  - Simplified debian/rules.
* Split into libbio-perl-perl, as discussed with the Debian Perl team.
  (debian/control, debian/bioperl.install, debian libbio-perl-perl.install)
* debian/control:
  - Incremented Standards-Version to reflect conformance with Policy 3.9.2.
    No other changes needed.
  - Vcs-Browser URL made redirectable to viewvc.
  - Removed useless ‘svn’ in the Vcs-Svn URL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
133
133
    #$sbjct->verbose(1);  # to activate debugging
134
134
    $sbjct->tiled_hsps(1);
135
135
 
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);
140
141
 
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'));
151
152
 
152
153
        _adjust_length_aln($sbjct);
153
 
        return (1, 1);
 
154
        return (1, 1);
154
155
    } else {
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);
162
163
    }