From: martinahansen Date: Mon, 22 Mar 2010 08:11:37 +0000 (+0000) Subject: fixing ladder bug in BGB X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a88148521c3f2e2f1b28dd6b27b371bbe55c0df8;p=biopieces.git fixing ladder bug in BGB git-svn-id: http://biopieces.googlecode.com/svn/trunk@937 74ccb610-7750-0410-82ae-013aeee3265d --- diff --git a/code_perl/Maasha/BGB/Track.pm b/code_perl/Maasha/BGB/Track.pm index ef99f42..a4f8c90 100644 --- a/code_perl/Maasha/BGB/Track.pm +++ b/code_perl/Maasha/BGB/Track.pm @@ -370,13 +370,13 @@ sub track_linear $x1 = sprintf( "%.0f", ( $entry->[ S_BEG ] - $beg ) * $factor ); $x2 = $x1 + $w; - $x1 = 0 if $x1 < 0; - $x2 = $cookie->{ 'IMG_WIDTH' } if $x2 > $cookie->{ 'IMG_WIDTH' }; - for ( $y_step = 0; $y_step < @ladder; $y_step++ ) { last if $x1 >= $ladder[ $y_step ] + 1; } + $x1 = 0 if $x1 < 0; + $x2 = $cookie->{ 'IMG_WIDTH' } if $x2 > $cookie->{ 'IMG_WIDTH' }; + $y1 = $cookie->{ 'TRACK_OFFSET' } + ( ( 1.1 + $cookie->{ 'FEAT_WIDTH' } ) * $y_step ); $y2 = $y1 + $cookie->{ 'FEAT_WIDTH' };