[Bioperl-l] [rt.cpan.org #36480] Bug in Bio::Search::SearchUtils.pm

Cédric Cabau via RT bug-bioperl at rt.cpan.org
Thu Jun 5 16:01:13 UTC 2008


Thu Jun 05 12:01:11 2008: Request 36480 was acted upon.
Transaction: Ticket created by Cedric.Cabau at tours.inra.fr
       Queue: bioperl
     Subject: Bug in Bio::Search::SearchUtils.pm
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: Cedric.Cabau at tours.inra.fr
      Status: new
 Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=36480 >


BioPerl version: bioperl-1.5.2_102
Module: Bio::Search::SearchUtils.pm
OS: CentOS Linux version 2.6.18-53.1.14.el5 (gcc version 4.1.2 20070626 (Red
Hat 4.1.2-14))
Perl: v5.8.8 built for x86_64-linux-thread-multi

Bug description:

Methods tile_hsps looks (among other things) if alignment is ambiguous.
Inside loop foreach $hsp ( $sbjct->hsps() ) { at line 177, methods $qoverlap
= &_adjust_contigs() (line 200) and $soverlap = &_adjust_contigs() (line
206) are used to know if current HSP overlap previous ones on query and on
subject. The problem is that in this loop, only the result of the last
comparison which means the last HSP with previous ones is kept in variables
$qoverlap and $soverlap.

After the loop, we found (line 299):

if($qoverlap) {
  if($soverlap) { $sbjct->ambiguous_aln('qs'); }
  else { $sbjct->ambiguous_aln('q');  }
}
elsif($soverlap) { 
  $sbjct->ambiguous_aln('s'); 
}

Only the result of the last comparison is stored in $sbjct and method
ambiguous_aln from module Bio::Search::Hit::GenericHit will return wrong
value if the alignment presents overlapping HSPs but last HSP not overlap
with previous ones.

To solve this bug, I just modify in line 200:

$qoverlap = &_adjust_contigs('query', $hsp, $qstart, $qstop, \@qcontigs,
$max_overlap, $frame, $qstrand);

by

$qoverlap += &_adjust_contigs('query', $hsp, $qstart, $qstop, \@qcontigs,
$max_overlap, $frame, $qstrand);

and in line 206:

$soverlap = &_adjust_contigs('sbjct', $hsp, $sstart, $sstop, \@scontigs,
$max_overlap, $frame, $sstrand);

by

$soverlap += &_adjust_contigs('sbjct', $hsp, $sstart, $sstop, \@scontigs,
$max_overlap, $frame, $sstrand);

to keep trace of overlaps in the whole HSPs screening process.

Regards,

Cedric

--

+---------------------------------------------------------------+
| Cédric Cabau                  INRA - SIGENAE - URA            |
| Tel : 02.47.42.75.42          Fax : 02.47.42.77.78            |
| http://www.sigenae.org        INRA - UR 83 - 37380 Nouzilly   |
+---------------------------------------------------------------+



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.open-bio.org/pipermail/bioperl-l/attachments/20080605/0979a9c4/attachment-0004.html>


More information about the Bioperl-l mailing list