]> git.donarmstrong.com Git - biopieces.git/commitdiff
fixed speed issue with track_ruler in BGB
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 27 Apr 2010 06:46:10 +0000 (06:46 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 27 Apr 2010 06:46:10 +0000 (06:46 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@950 74ccb610-7750-0410-82ae-013aeee3265d

code_perl/Maasha/BGB/Track.pm

index 15e2ba554d73f29d76abd59e2d4aa6f2e8f732e9..a21fa4e416b3d090936b57ac9dc24861a7491fc3 100644 (file)
@@ -116,8 +116,10 @@ sub track_ruler
         $step *= 5;
     }
 
-    for ( $i = $beg; $i < $end; $i++ ) {   # TODO: this loop is slow!
-        last if ( ( $i % $step ) == 0 );
+    $i = 0;
+
+    while ( $i <= $beg ) {
+        $i += $step;
     }
 
     while ( $i < $end )