]> git.donarmstrong.com Git - biopieces.git/commitdiff
fixing ladder bug in BGB
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Mon, 22 Mar 2010 08:11:37 +0000 (08:11 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Mon, 22 Mar 2010 08:11:37 +0000 (08:11 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@937 74ccb610-7750-0410-82ae-013aeee3265d

code_perl/Maasha/BGB/Track.pm

index ef99f42de27ebbca71deaaf30afa371b79d16775..a4f8c90c3ef95adc07ea5d866abef4b467bd3be8 100644 (file)
@@ -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' };