bioperl / bioperl-live-redmine

Legacy tickets migrated from the OBF Redmine issue tracker: http://redmine.open-bio.org
0 stars 0 forks source link

get_tiled_alns() skips first HSP #79

Open cjfields opened 8 years ago

cjfields commented 8 years ago

Author Name: Julin Maloof (Julin Maloof) Original Redmine Issue: 3070, https://redmine.open-bio.org/issues/3070 Original Date: 2010-04-28 Original Assignee: Bioperl Guts


Bio::Search::Tiling::MapTiling get_tiled_alns() leaves out one HSP from the alignment if there are more than one HSP per hit. As far as I can tell it is the first HSP that gets omitted. If there is only one HSP in a hit then it is included.

Steps to reproduce: run the attached script “demo_get_tiled_alns.pl” having the file “demoBlastout.xml” in the same directory.

Actual results: The blast file has a single result, single hit, with two hsps. The tiling that is produced contains both HSPs but only the second one (second one in the blast file) is included in the alignment.

Expected results: both HSPs should be included in the alignment

version: from bio-live. Tiling module updated on March 04, 2010

cjfields commented 8 years ago

Original Redmine Comment Author Name: Julin Maloof Original Date: 2010-04-28T21:38:51Z


Created an attachment (id=1494) script to demonstrate bug

use the attached script and data file to demonstrate the bug

cjfields commented 8 years ago

Original Redmine Comment Author Name: Julin Maloof Original Date: 2010-04-28T21:39:54Z


Created an attachment (id=1495) blast file for demonstrating the bug

use this in conjunction with attachment 1494

cjfields commented 8 years ago

Original Redmine Comment Author Name: Mark A. Jensen Original Date: 2010-04-28T23:22:14Z


Ahh…I think I see what’s happening. I don’t think this is a bug per se, but maybe the behavior Julin wants is something that can be added. In the module, a tiling is defined as a minimal set of overlapping hsps, so if you have

qry ****************
1   --------
2      ---------
3        ----------

then the minimal set of overlapping hsps covering qry is {1,3}, and 2 is left out. There can be other tilings possible; these can be stepped through and alignments derived from them by doing

while ( $t = $tiling->next_tiling ) {
  push @alns, $tiling->get_tiled_alns($type, $context, $t);
}

However, what Julin really wants is an alignment containing {1,2,3}, correctly lined up. Is that right? MAJ

cjfields commented 8 years ago

Original Redmine Comment Author Name: Julin Maloof Original Date: 2010-04-29T01:03:09Z


I don’t think that is what is happening; I would be OK in the situation that you describe. I don’t care about all of the HSPs, just having alignments of all of the sequence space that is covered by an HSP. In your example the alignment containing 1 and 3 would be great. The bheavior that I am seeing can be described as follows:

qry ********************
    1---
    2                   ----

Only 1, but not 2 is returned in the alignment array. I would expect two alignments to be returned.

Another example (not included in my demo but I can send it if you would like).

qry ***********************************************
    1---
    2            ----
    3                  -----   
    4                           ------
    5                                                 -----
    6                                                                    ----

Here I would expect four alignments to be returned:containing HSPs {1}, {2,3,4 (tiled)} , {5}, and {6}, but only 3 alignments are currently returned; no alignment with HSP 1 would be returned.

Does that make sense?

(In reply to comment #3)

Ahh…I think I see what’s happening. I don’t think this is a bug per se, but maybe the behavior Julin wants is something that can be added. In the module, a tiling is defined as a minimal set of overlapping hsps, so if you have

qry **** 1 ———— 2 ————- 3 —————

then the minimal set of overlapping hsps covering qry is {1,3}, and 2 is left out. There can be other tilings possible; these can be stepped through and alignments derived from them by doing

while ( $t = $tiling->next_tiling ) { push @alns, $tiling->get_tiled_alns($type, $context, $t); }

However, what Julin really wants is an alignment containing {1,2,3}, correctly lined up. Is that right? MAJ